These are chat archives for allegro/ralph

1st
Mar 2018
damian1976
@damian1976
Mar 01 2018 08:05
yes
damian1976
@damian1976
Mar 01 2018 09:46
the only thing the nginx actually does is that it's a proxy for django (it redirects from 8000 to 443). That's all.
damian1976
@damian1976
Mar 01 2018 10:14
2018/03/01 09:49:24 [error] 30971#0: *1 connect() failed (111: Connection refused) while connecting to upstream, client: IP_ADDRESS, server: SERVER_NAME, request: "GET / HTTP/1.1", upstream: "SERVER_NAME:8000/", host: "SERVER_NAME"

It look like django dies after some time. ralph is visible under 'ps' command

ralph    31001     1  0 08:20 ?        00:00:01 /home/ralph/ralph_ng/bin/python /home/ralph/ralph_ng/bin/ralph runserver 0.0.0.0:8000

But when I'm trying to telnet localhost on the port 8000 I fail .
Then I have to kill ralph process and start it again (virtualenv has to be activated):

DJANGO_SETTINGS_MODULE=ralph.settings.local ralph runserver 0.0.0.0:8000 &
Arkadiusz Adamski
@ar4s
Mar 01 2018 13:31
@damian1976 you use proxy_pass in nginx?
server {
    listen 80;
    client_max_body_size 200M;
    server_name ralph.localhost;
    proxy_set_header Host ralph.localhost;

    location / {
      proxy_pass http://127.0.0.1:8003;
    }
}
I have something like above configuration to start Ralph on my local machine (through nginx ofc)
damian1976
@damian1976
Mar 01 2018 13:48
Yes , I use proxy_pass. I noticed I used dns name instead of IP. I read somewhere that I should try with IP and/or switch ipv6 off on the machine. I gave it a try already and currently waiting . Let's wait 1, 2 days to see what will happen. Are client_max_body_size 200M; and proxy_set_header Host ... necessary?
Arkadiusz Adamski
@ar4s
Mar 01 2018 14:56
Yes if you have DEBUG=False and then Host header must correspond to ALLOWED_HOSTS but
you have another problem