I m trying to deploy RASA X on my server as per guideline given at Docker Compose Installation .
But after installation when hit to server it showing 502 Bad Gateway
as shown in screen schoot below:
Error log for rasa/nginx
is as follow:
nginx_1 | 2021/01/14 13:09:30 [error] 19#19: *1 connect() failed (111: Connection refused) while connecting to upstream, client: xxx.xxx.xxx.255, server: , request: "GET / HTTP/1.1", upstream: "http://192.168.176.6:5002/", host: "xxx.xxx.xxx.155:8080"
nginx_1 | 43.239.112.255 - - [14/Jan/2021:13:09:30 +0000] "GET / HTTP/1.1" 502 150 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:84.0) Gecko/20100101 Firefox/84.0"
nginx_1 | 2021/01/14 13:09:30 [error] 19#19: *3 connect() failed (111: Connection refused) while connecting to upstream, client: xxx.xxx.xxx.255, server: , request: "GET /favicon.ico HTTP/1.1", upstream: "http://192.168.176.6:5002/favicon.ico", host: "xxx.xxx.xxx.155:8080", referrer: "http://xxx.xxx.xxx.155:8080/"
nginx_1 | 43.239.112.255 - - [14/Jan/2021:13:09:30 +0000] "GET /favicon.ico HTTP/1.1" 502 150 "http://xxx.xxx.xxx.155:8080/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:84.0) Gecko/20100101 Firefox/84.0"
rctatman
(Rachael Tatman )
January 15, 2021, 10:34pm
2
It looks like there are a number of things that might cause that error, this post has a couple w/ thier fixes:
nginx, 502-error
@rctatman thank you for your reply.
It seem that the issue was with version.
When I changed version in .env
file from:
RASA_X_VERSION=0.35.0
RASA_VERSION=2.2.5
RASA_X_DEMO_VERSION=0.35.0
To:
RASA_X_VERSION=0.34.0
RASA_VERSION=2.1.2
RASA_X_DEMO_VERSION=0.34.0
Then I able to access Rasa X. Is there some other requirement for RASA X 0.35.0 and RASA 2.2.5 to work?
But now I am not able to train my model not even able to upload it.
After attempt to train or upload model, rasa-worker
and rasa-production
container keep on restarting.
How I can see the error? What can be the issue?
mprazz
(Mariana Prazeres)
January 21, 2021, 10:59am
4
The issue is that there were breaking changes between these versions, so downgrading will most likely cause problems for you.
I’d advise you to keep with the latest version and check the logs that come up when you do the installation for any issues that come up (and check the container logs, as well as any network settings you may have that may be running into nginx) – or alternatively do a fresh installation with the older versions directly.
Also, if you’d like to check logs for the workers, you can set them to debug mode by creating a docker-compose.override.yml
file and adding these entries:
rasa-production:
command: >
x
--no-prompt
--production
--config-endpoint http://rasa-x:5002/api/config?token=${RASA_X_TOKEN}
--port 5005
--jwt-method HS256
--jwt-secret ${JWT_SECRET}
--auth-token '${RASA_TOKEN}'
--cors "*"
--debug
rasa-worker:
command: >
x
--no-prompt
--production
--config-endpoint http://rasa-x:5002/api/config?token=${RASA_X_TOKEN}
--port 5005
--jwt-method HS256
--jwt-secret ${JWT_SECRET}
--auth-token '${RASA_TOKEN}'
--cors "*"
--debug
Finally, I can’t help noticing that you were trying to access the port 8080
, did you map this port directly on your configuration? Because the default port for accessing Rasa X is usually 5002
Hope this helps!
1 Like
Finally solved.
The issue was that my web server hardware was not meeting with TensorFlow library requirement.
I had change nginx port to 8080
directly in docker-compose.yml
file. As my 80 port
is already in use.
This error is caused when running: sudo docker-compose restart
How to fix this:
1, run: sudo docker-compose down
2, run: sudo docker-compose up -d