docker-ninjam's People
docker-ninjam's Issues
The command '/bin/sh -c go get github.com/ayvan/ninjam-chatbot [...] returned a non-zero code: 2
Hi, I'm attempting to install this on an EC2 instance. Running on Amazon Linux AMI (in case that makes a difference). I completed all the steps outlined in the README and it seems it chokes on step 5 building ninjam-server. Any ideas?
Step 1/21 : FROM builder as build-ninjamsrv
---> 4625c849f832
Step 2/21 : WORKDIR /
---> Running in 2e3fe0a1ef25
Removing intermediate container 2e3fe0a1ef25
---> 884ff3153006
Step 3/21 : RUN git clone https://github.com/justinfrankel/ninjam && git clone https://github.com/ayvan/ninjamcast && cd /ninjam/ninjam/server && make && cd /ninjamcast/ninjam/ninjamcast && make
---> Running in c4cdc5237b98
Cloning into 'ninjam'...
Cloning into 'ninjamcast'...
g++ -O2 -Wall -Wno-reorder -pthread -c -o ../../WDL/jnetlib/asyncdns.o ../../WDL/jnetlib/asyncdns.cpp
g++ -O2 -Wall -Wno-reorder -pthread -c -o ../../WDL/jnetlib/connection.o ../../WDL/jnetlib/connection.cpp
g++ -O2 -Wall -Wno-reorder -pthread -c -o ../../WDL/jnetlib/listen.o ../../WDL/jnetlib/listen.cpp
g++ -O2 -Wall -Wno-reorder -pthread -c -o ../../WDL/jnetlib/util.o ../../WDL/jnetlib/util.cpp
g++ -O2 -Wall -Wno-reorder -pthread -c -o ../../WDL/jnetlib/httpget.o ../../WDL/jnetlib/httpget.cpp
g++ -O2 -Wall -Wno-reorder -pthread -c -o ../../WDL/rng.o ../../WDL/rng.cpp
g++ -O2 -Wall -Wno-reorder -pthread -c -o ../../WDL/sha.o ../../WDL/sha.cpp
g++ -O2 -Wall -Wno-reorder -pthread -c -o ../mpb.o ../mpb.cpp
g++ -O2 -Wall -Wno-reorder -pthread -c -o ../netmsg.o ../netmsg.cpp
g++ -O2 -Wall -Wno-reorder -pthread -c -o usercon.o usercon.cpp
g++ -O2 -Wall -Wno-reorder -pthread -c -o ninjamsrv.o ninjamsrv.cpp
g++ -O2 -Wall -Wno-reorder -pthread -s -o ninjamsrv ../../WDL/jnetlib/asyncdns.o ../../WDL/jnetlib/connection.o ../../WDL/jnetlib/listen.o ../../WDL/jnetlib/util.o ../../WDL/jnetlib/httpget.o ../../WDL/rng.o ../../WDL/sha.o ../mpb.o ../netmsg.o usercon.o ninjamsrv.o
g++ -O2 -malign-double -s -c -o ../../WDL/jnetlib/asyncdns.o ../../WDL/jnetlib/asyncdns.cpp
g++ -O2 -malign-double -s -c -o ../../WDL/jnetlib/connection.o ../../WDL/jnetlib/connection.cpp
../../WDL/jnetlib/connection.cpp: In constructor 'JNL_Connection::JNL_Connection(JNL_IAsyncDNS*, int, int)':
../../WDL/jnetlib/connection.cpp:17:13: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
m_errorstr="";
^
../../WDL/jnetlib/connection.cpp: In member function 'virtual void JNL_Connection::connect(int, sockaddr_in*)':
../../WDL/jnetlib/connection.cpp:59:15: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
m_errorstr="invalid socket passed to connect";
^
../../WDL/jnetlib/connection.cpp: In member function 'virtual void JNL_Connection::connect(char*, int)':
../../WDL/jnetlib/connection.cpp:71:15: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
m_errorstr="creating socket";
^
../../WDL/jnetlib/connection.cpp:82:17: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
m_errorstr="empty hostname";
^
../../WDL/jnetlib/connection.cpp: In member function 'virtual void JNL_Connection::run(int, int, int*, int*)':
../../WDL/jnetlib/connection.cpp:134:21: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
m_errorstr="resolving hostname";
^
../../WDL/jnetlib/connection.cpp:145:19: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
m_errorstr="connecting to host";
^
../../WDL/jnetlib/connection.cpp:163:21: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
m_errorstr="connecting to host (calling select())";
^
../../WDL/jnetlib/connection.cpp:172:21: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
m_errorstr="connecting to host";
^
g++ -O2 -malign-double -s -c -o ../../WDL/jnetlib/listen.o ../../WDL/jnetlib/listen.cpp
g++ -O2 -malign-double -s -c -o ../../WDL/jnetlib/util.o ../../WDL/jnetlib/util.cpp
g++ -O2 -malign-double -s -c -o ../../WDL/jnetlib/httpget.o ../../WDL/jnetlib/httpget.cpp
In file included from ../../WDL/jnetlib/httpget.cpp:12:0:
../../WDL/jnetlib/httpget.h:57:76: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
virtual void connect(const char *url, int ver=0, char *requestmethod="GET")=0;
^
../../WDL/jnetlib/httpget.h:95:66: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
void connect(const char *url, int ver=0, char *requestmethod="GET");
^
../../WDL/jnetlib/httpget.h: In member function 'virtual int JNL_HTTPGet::content_length()':
../../WDL/jnetlib/httpget.h:113:62: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
int content_length() { char *p=getheader("content-length"); if (p) return atoi(p); return 0; }
^
../../WDL/jnetlib/httpget.cpp: In member function 'virtual void JNL_HTTPGet::connect(const char*, int, char*)':
../../WDL/jnetlib/httpget.cpp:147:28: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
seterrstr("invalid URL");
^
../../WDL/jnetlib/httpget.cpp:177:40: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
seterrstr("error allocating memory");
^
../../WDL/jnetlib/httpget.cpp:226:51: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
seterrstr("could not create connection object");
^
../../WDL/jnetlib/httpget.cpp: In member function 'virtual char* JNL_HTTPGet::getallheaders()':
../../WDL/jnetlib/httpget.cpp:283:15: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
else return "\0\0";
^
../../WDL/jnetlib/httpget.cpp: In member function 'virtual int JNL_HTTPGet::run()':
../../WDL/jnetlib/httpget.cpp:366:20: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
connect(p);
^
g++ -O2 -malign-double -s -c -o ../../WDL/lameencdec.o ../../WDL/lameencdec.cpp
g++ -O2 -malign-double -s -c -o ../../WDL/rng.o ../../WDL/rng.cpp
g++ -O2 -malign-double -s -c -o ../../WDL/sha.o ../../WDL/sha.cpp
g++ -O2 -malign-double -s -c -o ../mpb.o ../mpb.cpp
In file included from ../../WDL/jnetlib/jnetlib.h:43:0,
from ../netmsg.h:33,
from ../mpb.h:32,
from ../mpb.cpp:35:
../../WDL/jnetlib/httpget.h:57:76: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
virtual void connect(const char *url, int ver=0, char *requestmethod="GET")=0;
^
../../WDL/jnetlib/httpget.h:95:66: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
void connect(const char *url, int ver=0, char *requestmethod="GET");
^
../../WDL/jnetlib/httpget.h: In member function 'virtual int JNL_HTTPGet::content_length()':
../../WDL/jnetlib/httpget.h:113:62: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
int content_length() { char *p=getheader("content-length"); if (p) return atoi(p); return 0; }
^
../mpb.cpp: In member function 'Net_Message* mpb_chat_message::build()':
../mpb.cpp:883:16: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
if (!sp) sp="";
^
g++ -O2 -malign-double -s -c -o ../netmsg.o ../netmsg.cpp
In file included from ../../WDL/jnetlib/jnetlib.h:43:0,
from ../netmsg.h:33,
from ../netmsg.cpp:36:
../../WDL/jnetlib/httpget.h:57:76: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
virtual void connect(const char *url, int ver=0, char *requestmethod="GET")=0;
^
../../WDL/jnetlib/httpget.h:95:66: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
void connect(const char *url, int ver=0, char *requestmethod="GET");
^
../../WDL/jnetlib/httpget.h: In member function 'virtual int JNL_HTTPGet::content_length()':
../../WDL/jnetlib/httpget.h:113:62: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
int content_length() { char *p=getheader("content-length"); if (p) return atoi(p); return 0; }
^
g++ -O2 -malign-double -s -c -o ../njclient.o ../njclient.cpp
In file included from ../../WDL/jnetlib/jnetlib.h:43:0,
from ../njclient.h:71,
from ../njclient.cpp:29:
../../WDL/jnetlib/httpget.h:57:76: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
virtual void connect(const char *url, int ver=0, char *requestmethod="GET")=0;
^
../../WDL/jnetlib/httpget.h:95:66: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
void connect(const char *url, int ver=0, char *requestmethod="GET");
^
../../WDL/jnetlib/httpget.h: In member function 'virtual int JNL_HTTPGet::content_length()':
../../WDL/jnetlib/httpget.h:113:62: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
int content_length() { char *p=getheader("content-length"); if (p) return atoi(p); return 0; }
^
../njclient.cpp: In destructor 'NJClient::~NJClient()':
../njclient.cpp:460:21: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
writeLog("end\n");
^
../njclient.cpp: In member function 'int NJClient::Run()':
../njclient.cpp:816:28: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
if (!un) un="";
^
../njclient.cpp:817:30: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
if (!chn) chn="";
^
../njclient.cpp:1046:61: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
writeLog("local %s %d\n",guidstr,lc->channel_idx);
^
../njclient.cpp: In member function 'void NJClient::mixInChannel(bool, float, float, DecodeState*, float**, int, int, int, int, double)':
../njclient.cpp:1550:132: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long int' [-Wformat=]
sprintf(buf,"underrun %d at %d on %s, %d/%d samples\n",cnt++,ftell(chan->decode_fp),s,chan->decode_codec->m_samples_used,needed);
^
../njclient.cpp: In member function 'void NJClient::on_new_interval()':
../njclient.cpp:1566:73: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
writeLog("interval %d %.2f %d\n",m_loopcnt,GetActualBPM(),m_active_bpi);
^
../njclient.cpp:1614:91: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
writeLog("user %s \"%s\" %d \"%s\"\n",guidstr,user->name.Get(),ch,chan->name.Get());
^
g++ -O2 -malign-double -s -c -o ../njmisc.o ../njmisc.cpp
g++ -O2 -malign-double -s -c -o njcast.o njcast.cpp
In file included from ../../WDL/jnetlib/jnetlib.h:43:0,
from ../njclient.h:71,
from njcast.cpp:13:
../../WDL/jnetlib/httpget.h:57:76: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
virtual void connect(const char *url, int ver=0, char *requestmethod="GET")=0;
^
../../WDL/jnetlib/httpget.h:95:66: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
void connect(const char *url, int ver=0, char *requestmethod="GET");
^
../../WDL/jnetlib/httpget.h: In member function 'virtual int JNL_HTTPGet::content_length()':
../../WDL/jnetlib/httpget.h:113:62: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
int content_length() { char *p=getheader("content-length"); if (p) return atoi(p); return 0; }
^
njcast.cpp: In member function 'void NJCast::handleTitleSetting()':
njcast.cpp:274:21: warning: converting to non-pointer type 'char' from NULL [-Wconversion-null]
if (pt) *pt = NULL; // cut off @ip
^
njcast.cpp:295:36: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
titleset->connect(url.Get());
^
g++ -O2 -malign-double -s -c -o ninjamcast.o ninjamcast.cpp
In file included from ninjamcast.cpp:19:0:
../../WDL/lineparse.h: In member function 'char* LineParser::gettoken_str(int)':
../../WDL/lineparse.h:174:79: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
if (token < 0 || token >= m_nt || !m_tokens || !m_tokens[token]) return "";
^
In file included from ../../WDL/jnetlib/jnetlib.h:43:0,
from ../njclient.h:71,
from ninjamcast.cpp:21:
../../WDL/jnetlib/httpget.h: At global scope:
../../WDL/jnetlib/httpget.h:57:76: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
virtual void connect(const char *url, int ver=0, char *requestmethod="GET")=0;
^
../../WDL/jnetlib/httpget.h:95:66: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
void connect(const char *url, int ver=0, char *requestmethod="GET");
^
../../WDL/jnetlib/httpget.h: In member function 'virtual int JNL_HTTPGet::content_length()':
../../WDL/jnetlib/httpget.h:113:62: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
int content_length() { char *p=getheader("content-length"); if (p) return atoi(p); return 0; }
^
ninjamcast.cpp: In function 'int main(int, char**)':
ninjamcast.cpp:370:51: warning: format '%d' expects argument of type 'int', but argument 3 has type 'time_t {aka long int}' [-Wformat=]
sprintf(buf,"njsession_%d_%d",time(NULL),cnt);
^
g++ -O2 -malign-double -s -o ninjamcast ../../WDL/jnetlib/asyncdns.o ../../WDL/jnetlib/connection.o ../../WDL/jnetlib/listen.o ../../WDL/jnetlib/util.o ../../WDL/jnetlib/httpget.o ../../WDL/lameencdec.o ../../WDL/rng.o ../../WDL/sha.o ../mpb.o ../netmsg.o ../njclient.o ../njmisc.o njcast.o ninjamcast.o -lpthread -lncurses -lm -lasound -ldl -logg -lvorbis -lvorbisenc -lmp3lame
Removing intermediate container c4cdc5237b98
---> f83bef446710
Step 4/21 : FROM builder as build-ninjambots
---> 4625c849f832
Step 5/21 : RUN go get github.com/ayvan/ninjam-chatbot github.com/ayvan/ninjam-dj-bot && cd $GOPATH/src/github.com/ayvan/ninjam-chatbot && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo -ldflags "-s -w" -o /bin/ninjam-chatbot && cd $GOPATH/src/github.com/ayvan/ninjam-dj-bot && cp lv2host.yaml /etc/lv2host.yaml && cp lv2speech.yaml /etc/lv2speech.yaml && CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo -ldflags "-s -w" -o /bin/ninjam-dj-bot && cd $GOPATH/src/github.com/ayvan/ && rm -rf $GOPATH/src/
---> Running in f36b941d6e0a
# github.com/hajimehoshi/go-mp3/internal/frameheader
go/src/github.com/hajimehoshi/go-mp3/internal/frameheader/frameheader.go:55:16: invalid operation: 44100 >> f.LowSamplingFrequency() (shift count type int, must be unsigned integer)
go/src/github.com/hajimehoshi/go-mp3/internal/frameheader/frameheader.go:57:16: invalid operation: 48000 >> f.LowSamplingFrequency() (shift count type int, must be unsigned integer)
go/src/github.com/hajimehoshi/go-mp3/internal/frameheader/frameheader.go:59:16: invalid operation: 32000 >> f.LowSamplingFrequency() (shift count type int, must be unsigned integer)
go/src/github.com/hajimehoshi/go-mp3/internal/frameheader/frameheader.go:129:30: invalid operation: consts.GranulesMpeg1 >> f.LowSamplingFrequency() (shift count type int, must be unsigned integer)
go/src/github.com/hajimehoshi/go-mp3/internal/frameheader/frameheader.go:191:24: invalid operation: (144 * f.Bitrate() / f.SamplingFrequencyValue() + int(f.PaddingBit())) >> f.LowSamplingFrequency() (shift count type int, must be unsigned integer)
The command '/bin/sh -c go get github.com/ayvan/ninjam-chatbot github.com/ayvan/ninjam-dj-bot && cd $GOPATH/src/github.com/ayvan/ninjam-chatbot && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo -ldflags "-s -w" -o /bin/ninjam-chatbot && cd $GOPATH/src/github.com/ayvan/ninjam-dj-bot && cp lv2host.yaml /etc/lv2host.yaml && cp lv2speech.yaml /etc/lv2speech.yaml && CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo -ldflags "-s -w" -o /bin/ninjam-dj-bot && cd $GOPATH/src/github.com/ayvan/ && rm -rf $GOPATH/src/' returned a non-zero code: 2
letsencrypt.sh fails but letsencrypt-standalone.sh succeeds
I'm wondering what might cause letsencrypt.sh to fail. Could it be that certbot was unable to create a file in .wellknown/acme-challenge/
? When I was working through the initial setup, sudo cp -R ninjam-web /var/www/ninjam-web
failed because I did not have a /var/www/
. This is on a fresh Amazon Linux AMI. I'm not sure what the expectation is as I'm not very experienced with devops and linux in general. Learning.
From inside the container:
root@12345:/# /etc/ninjam/letsencrypt.sh
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator webroot, Installer None
Starting new HTTPS connection (1): acme-v02.api.letsencrypt.org
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for mydomain.com
http-01 challenge for www.mydomain.com
Using the webroot path /app/src/public for all unmatched domains.
Waiting for verification...
Cleaning up challenges
Failed authorization procedure. mydomain.com (http-01): urn:ietf:params:acme:error:connection :: The server could not connect to the client to verify the domain :: Fetching http://mydomain.com/.well-known/acme-challenge/zUX21CIZFhMEp3E3HrUXz10cZuS7cLkh7AATrWZHqzw: Connection refused, www.mydomain.com (http-01): urn:ietf:params:acme:error:connection :: The server could not connect to the client to verify the domain :: Fetching http://www.mydomain.com/.well-known/acme-challenge/_PEjA7U2KvIG0Gbpdu9LfnpYhluk7VXcffNlp39H7CA: Connection refused
IMPORTANT NOTES:
- The following errors were reported by the server:
Domain: mydomain.com
Type: connection
Detail: Fetching
http://mydomain.com/.well-known/acme-challenge/zUX21CIZFhMEp3E3HrUXz10cZuS7cLkh7AATrWZHqzw:
Connection refused
Domain: www.mydomain.com
Type: connection
Detail: Fetching
http://www.mydomain.com/.well-known/acme-challenge/_PEjA7U2KvIG0Gbpdu9LfnpYhluk7VXcffNlp39H7CA:
Connection refused
To fix these errors, please make sure that your domain name was
entered correctly and the DNS A/AAAA record(s) for that domain
contain(s) the right IP address. Additionally, please check that
your computer has a publicly routable IP address and that no
firewalls are preventing the server from communicating with the
client. If you're using the webroot plugin, you should also verify
that you are serving files from the webroot path you provided.
- Your account credentials have been saved in your Certbot
configuration directory at /etc/letsencrypt. You should make a
secure backup of this folder now. This configuration directory will
also contain certificates and private keys obtained by Certbot so
making regular backups of this folder is ideal.
cp: cannot stat '/etc/letsencrypt/live/mydomain.com/privkey.pem': No such file or directory
cp: cannot stat '/etc/letsencrypt/live/mydomain.com/fullchain.pem': No such file or directory
* Reloading nginx configuration nginx
root@12345:/# etc/ninjam/letsencrypt-standalone.sh
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator standalone, Installer None
Starting new HTTPS connection (1): acme-v02.api.letsencrypt.org
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for mydomain.com
http-01 challenge for www.mydomain.com
Waiting for verification...
Cleaning up challenges
IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/mydomain.com/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/mydomain.com/privkey.pem
Your cert will expire on 2020-10-11. To obtain a new or tweaked
version of this certificate in the future, simply run certbot
again. To non-interactively renew *all* of your certificates, run
"certbot renew"
- If you like Certbot, please consider supporting our work by:
Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
Donating to EFF: https://eff.org/donate-le
* Reloading nginx configuration nginx
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.