These are chat archives for inuitwallet/ALP-Server

25th
Apr 2016
Cybnate
@Cybnate
Apr 25 2016 06:48
When server is started. Does it only show this:
16-04-25 08:43:53 - INFO - load pool config
16-04-25 08:43:53 - INFO - load exchanges config(s)
16-04-25 08:43:53 - INFO - configure database schema
Nothing appears after that. Is that supposed to be?
Still not getting the server running in a way it should
Oh yeah, good morning :-)
Extract above is from alp.log
Cybnate
@Cybnate
Apr 25 2016 06:54
Another question: Is all http traffic dealt with in the pool_server.py?
Or is there supposed to run a separate http server?
ngnix is running, should that be it?
Cybnate
@Cybnate
Apr 25 2016 07:00
Hmm, only domain name in config. Let's see what happen when I add the server name in alp.conf (in etc/nginx/conf.d)
inuitwallet
@inuitwallet
Apr 25 2016 07:01
Morning Cybnate. alp.log should be constantly streaming. information like the price feed status and which users are submitting. It stopping where ti has would indicate an eeror to me.
do you have the latest code?
you can go to /home/alp/code and do a git pull to update
This message was deleted
you could run python pool_server.py directly and see if any other errors come out of it.
Cybnate
@Cybnate
Apr 25 2016 07:02
Nginx give a 502 bad gateway
ok
inuitwallet
@inuitwallet
Apr 25 2016 07:03
with regards the http question. the stack is that Bottle.py runs and executres the code. Above that is Guncorn which starts multiple pool workers to handle multiple threaded connections.
nginx sits above that and forwards port 80 traffic to gunicorn.
what did you set as server_name:?
Cybnate
@Cybnate
Apr 25 2016 07:03
nbt2.liquidbits.net
running it directly gives an error re bottle in line 8 ImportErro: No module named bottle
Cybnate
@Cybnate
Apr 25 2016 07:11
Just did git pull, and restart. Appears not to be the problem. There is something weird in the http config, but I can't get my hand on it. Opened all ports in the firewall, walked through all config. Will have a look at gunicorn
Hmm, gunicorn log is not showing recent activity. Apparently it ran once on 28 March, after that no log entries. How to start this manually? Looks like something is not running
inuitwallet
@inuitwallet
Apr 25 2016 07:15
so gunicorn only comes into play when it's being run from supervisor.
Cybnate
@Cybnate
Apr 25 2016 07:15
Ahh, and supervisor doesn't work well at all since the beginning.
inuitwallet
@inuitwallet
Apr 25 2016 07:15
the bottle import error looks like you're not using the virtualenvironment properly
what errrors do you get from supervisor?
I thought it was all working.
what does sudo supervisorctl status show?
Cybnate
@Cybnate
Apr 25 2016 07:16
No errors, the tasks crash. When started manually no problem. Always postgesql and ALP I need to start manually
I don't have supervisor starting gunicorn. I don't know unicorn. Does it need to be started?
I have 4 tasks running in supervisor
ALP, nginx, nud and postgresql
inuitwallet
@inuitwallet
Apr 25 2016 07:19
the command that superviso4r uses to start alp first calls gunicorn to wrap the alp software.
it's all in /etc/supervisor/conf.d/alp.conf
Cybnate
@Cybnate
Apr 25 2016 07:20
So when I start ALP it should be all fine
inuitwallet
@inuitwallet
Apr 25 2016 07:20
yup
Cybnate
@Cybnate
Apr 25 2016 07:21
And still it doesn't work, having a 502
inuitwallet
@inuitwallet
Apr 25 2016 07:23
would indicate that the alp software is crsashing.
try sudo supervisorctl stop alp
then as the alp user go to /home/alp/code
then run ve/bin/python pool_server.py
(the ve/bin/python uses the virtual environment which has all the python dependencies installed)
Cybnate
@Cybnate
Apr 25 2016 07:25
Ignoring you for a second ;-)
2016/04/25 09:09:31 [error] 1713#0: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 121.98.173.25, server: nbt2.liquidbits.net, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:3333/", host: "nbt2.liquidbits.net"
The above is in an error.log from nginx
inuitwallet
@inuitwallet
Apr 25 2016 07:25
no worries. :) yup. shows that nginx tried to make the proxy connection to alp/gunicorn but didn;t get a response
Cybnate
@Cybnate
Apr 25 2016 07:26
:-( Will try yours then
Permission error, sounds familiair....
line 30
inuitwallet
@inuitwallet
Apr 25 2016 07:29
line 30 of what?
Cybnate
@Cybnate
Apr 25 2016 07:29
IOError: 13 Permission denied
pool_server.py
/home/alp/code/logs/server-1461569302.log
You probably don't remember that I'm also getting permission error with postgresql when it is started at boot time.
inuitwallet
@inuitwallet
Apr 25 2016 07:30
what does ls -la /home/alp/code return?
Cybnate
@Cybnate
Apr 25 2016 07:30
It only starts manually with supervisorctl
all files owned by alp except pool_server.py
is owned by root
inuitwallet
@inuitwallet
Apr 25 2016 07:32
ah, that;s interesting. Let me just check the nupool server
Cybnate
@Cybnate
Apr 25 2016 07:32
the Pyc is own ed by alp oddly
inuitwallet
@inuitwallet
Apr 25 2016 07:33
onnupool, everythign is owned by alp.
try changing the ownership. you;'ll need to be a sudo user.
sudo chown -R alp: /home/alp
Cybnate
@Cybnate
Apr 25 2016 07:34
Ok, done, restart the lot?
inuitwallet
@inuitwallet
Apr 25 2016 07:35
give it a go
Cybnate
@Cybnate
Apr 25 2016 07:35
Only alp
inuitwallet
@inuitwallet
Apr 25 2016 07:35
I thinki so at the moment
Cybnate
@Cybnate
Apr 25 2016 07:36
Restarted ALP, still 502
will stop it and start manually
Same error as above in line 30, permission denied
to log file
Logs are all owned by ALP
Cybnate
@Cybnate
Apr 25 2016 07:42
I'm running under my own user Cybnate, is that the problem? Should I sudo ALP?
inuitwallet
@inuitwallet
Apr 25 2016 07:42
yeah. that'll do it.
Cybnate
@Cybnate
Apr 25 2016 07:45
Right, that works. However outpu shows nothing more than what I found in log file. 3x info no errors
Still nginx bad gateway 502
inuitwallet
@inuitwallet
Apr 25 2016 07:46
and postgres is running ok?
Cybnate
@Cybnate
Apr 25 2016 07:47
database system is ready to accept connection. Yes apparently
inuitwallet
@inuitwallet
Apr 25 2016 07:47
very weird.
I'm planning on doing some work on ALP this evening to alter the price feed logic. I'll see if I can replicate and fix this issue then.
Cybnate
@Cybnate
Apr 25 2016 07:48
Yes, indeed. I spend sveral hours on this. It is weird that it doesn't start properly with supervisorctl. It appears to me there is an issue with ownerships or rights
inuitwallet
@inuitwallet
Apr 25 2016 07:48
it does seem that way. I'll go thorugh the ansile setup again and see.
Cybnate
@Cybnate
Apr 25 2016 07:49
Ok, will call it a day here
Thanks for helping to try solve this puzzle
nginx access log sees my attempts and yours I think from yesterday MSIE 10 Windows NT 6.2 :-) So it is something in between.
inuitwallet
@inuitwallet
Apr 25 2016 08:07
yup. my guess is alp fails to start. seems like it's got to a point and then is just waiting for something to happen
I don;t think that was me yesterday by the way :)