Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

502 Bad Gateway following instructions #1313

Closed
2 tasks done
DPMakerQB opened this issue Dec 19, 2021 · 7 comments
Closed
2 tasks done

502 Bad Gateway following instructions #1313

DPMakerQB opened this issue Dec 19, 2021 · 7 comments
Labels
question This is more a question for the support than an issue.

Comments

@DPMakerQB
Copy link

Describe the issue

Hey there! I followed steps 1-3 on the official documentation, and it leads me to a 502 Bad Gateway error.
https://docs.weblate.org/en/latest/admin/install/docker.html

In the logs I see:
nginx stderr | 2021/12/19 00:28:14 [crit] 254#254: *5 connect() to unix:/run/gunicorn/app/weblate/socket failed (2: No such file or directory) while connecting to upstream, client: 127.0.0.1, server: , request: "GET /healthz/ HTTP/1.1", upstream: "http://unix:/run/gunicorn/app/weblate/socket:/healthz/", host: "localhost:8080"

I already tried

  • I've read and searched the documentation.
  • I've searched for similar issues in this repository.

Steps to reproduce the behavior

Follow the instructions on the documentation page.

Expected behavior

For me to be able to connect to the website successfully.

Screenshots

No response

Exception traceback

No response

How do you run Weblate?

Docker container

Weblate versions

No response

Weblate deploy checks

No response

Additional context

No response

@nijel
Copy link
Member

nijel commented Dec 19, 2021

Anything else in the logs? Especially some errors from gunicorn?

@nijel nijel transferred this issue from WeblateOrg/weblate Dec 19, 2021
@nijel nijel added the question This is more a question for the support than an issue. label Dec 19, 2021
@github-actions
Copy link

This issue looks more like a support question than an issue. We strive to answer these reasonably fast, but purchasing the support subscription is not only more responsible and faster for your business but also makes Weblate stronger.

In case your question is already answered, making a donation is the right way to say thank you!

@TheAssassin
Copy link

@DPMakerQB you should post your Docker logs, I could imagine you're affected by #1314 as well.

@DPMakerQB
Copy link
Author

@nijel

Anything else in the logs? Especially some errors from gunicorn?

Here, I left docker running for a bit and here is what it is spitting out, from the start:

weblate_1   | Refreshing stats...
weblate_1   |
weblate_1   | 391 static files copied to '/app/cache/static'.
weblate_1   | Compressing... done
weblate_1   | Compressed 6 block(s) from 230 template(s) for 2 context(s).
weblate_1   | Creating user admin
weblate_1   | Auto-scaled to 2 processes, adjust by setting WEBLATE_WORKERS
weblate_1   | 2021-12-19 20:32:32,902 INFO Included extra file "/etc/supervisor/conf.d/celery-backup.conf" during parsing
weblate_1   | 2021-12-19 20:32:32,903 INFO Included extra file "/etc/supervisor/conf.d/celery-beat.conf" during parsing
weblate_1   | 2021-12-19 20:32:32,904 INFO Included extra file "/etc/supervisor/conf.d/celery-celery.conf" during parsing
weblate_1   | 2021-12-19 20:32:32,905 INFO Included extra file "/etc/supervisor/conf.d/celery-memory.conf" during parsing
weblate_1   | 2021-12-19 20:32:32,906 INFO Included extra file "/etc/supervisor/conf.d/celery-notify.conf" during parsing
weblate_1   | 2021-12-19 20:32:32,906 INFO Included extra file "/etc/supervisor/conf.d/celery-translate.conf" during parsing
weblate_1   | 2021-12-19 20:32:32,907 INFO Included extra file "/etc/supervisor/conf.d/check.conf" during parsing
weblate_1   | 2021-12-19 20:32:32,908 INFO Included extra file "/etc/supervisor/conf.d/web.conf" during parsing
weblate_1   | 2021-12-19 20:32:32,920 INFO RPC interface 'supervisor' initialized
weblate_1   | 2021-12-19 20:32:32,922 INFO supervisord started with pid 1
weblate_1   | 2021-12-19 20:32:33,927 INFO spawned: 'stdout' with pid 244
weblate_1   | 2021-12-19 20:32:33,932 INFO spawned: 'celery-backup' with pid 245
weblate_1   | 2021-12-19 20:32:33,953 INFO spawned: 'celery-beat' with pid 246
weblate_1   | 2021-12-19 20:32:33,966 INFO spawned: 'celery-celery' with pid 247
weblate_1   | 2021-12-19 20:32:33,984 INFO spawned: 'celery-memory' with pid 248
weblate_1   | 2021-12-19 20:32:34,021 INFO spawned: 'celery-notify' with pid 249
weblate_1   | 2021-12-19 20:32:34,036 INFO spawned: 'celery-translate' with pid 250
weblate_1   | 2021-12-19 20:32:34,093 INFO spawned: 'check' with pid 251
weblate_1   | 2021-12-19 20:32:34,125 INFO spawned: 'gunicorn' with pid 252
weblate_1   | 2021-12-19 20:32:34,131 INFO spawned: 'nginx' with pid 253
weblate_1   | 2021-12-19 20:32:35,385 INFO success: stdout entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
weblate_1   | 2021-12-19 20:32:35,386 INFO success: celery-backup entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
weblate_1   | 2021-12-19 20:32:35,387 INFO success: celery-beat entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
weblate_1   | 2021-12-19 20:32:35,388 INFO success: celery-celery entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
weblate_1   | 2021-12-19 20:32:35,389 INFO success: celery-memory entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
weblate_1   | 2021-12-19 20:32:35,389 INFO success: celery-notify entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
weblate_1   | 2021-12-19 20:32:35,390 INFO success: celery-translate entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
weblate_1   | 2021-12-19 20:32:35,390 INFO success: check entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
weblate_1   | 2021-12-19 20:32:35,391 INFO success: gunicorn entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
weblate_1   | 2021-12-19 20:32:35,391 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
weblate_1   | nginx stderr | 2021/12/19 20:32:34 [warn] 253#253: the "user" directive makes sense only if the master process runs with super-user privileges, ig                                                                       nored in /etc/nginx/nginx.conf:1
weblate_1   | nginx stderr | nginx: [warn] the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/ng                                                                       inx.conf:1
weblate_1   | celery-beat stdout | celery beat v5.2.1 (dawn-chorus) is starting.
weblate_1   | celery-beat stdout |
weblate_1   | nginx stderr | 2021/12/19 20:32:46 [crit] 254#254: *1 connect() to unix:/run/gunicorn/app/weblate/socket failed (2: No such file or directory) whi                                                                       le connecting to upstream, client: 127.0.0.1, server: , request: "GET /healthz/ HTTP/1.1", upstream: "http://unix:/run/gunicorn/app/weblate/socket:/healthz/", h                                                                       ost: "localhost:8080"
weblate_1   | nginx stdout | 127.0.0.1 - - [19/Dec/2021:20:32:46 +0000] "GET /healthz/ HTTP/1.1" 502 150 "-" "curl/7.74.0"
weblate_1   | 2021-12-19 20:33:04,480 INFO exited: celery-notify (terminated by SIGKILL; not expected)
weblate_1   | 2021-12-19 20:33:05,488 INFO spawned: 'celery-notify' with pid 288
weblate_1   | 2021-12-19 20:33:06,495 INFO success: celery-notify entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
weblate_1   | 2021-12-19 20:33:27,991 INFO exited: celery-backup (terminated by SIGKILL; not expected)
weblate_1   | 2021-12-19 20:33:28,136 INFO spawned: 'celery-backup' with pid 310
weblate_1   | 2021-12-19 20:33:29,242 INFO success: celery-backup entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
weblate_1   | nginx stderr | 2021/12/19 20:33:47 [crit] 254#254: *3 connect() to unix:/run/gunicorn/app/weblate/socket failed (2: No such file or directory) whi                                                                       le connecting to upstream, client: (MY_IP_ADDRESS), server: , request: "GET / HTTP/1.1", upstream: "http://unix:/run/gunicorn/app/weblate/socket:/", host: "transl                                                                       ate.queensbrothel.com"
weblate_1   | 2021-12-19 20:33:49,759 INFO exited: celery-memory (terminated by SIGKILL; not expected)
weblate_1   | nginx stdout | (MY_IP_ADDRESS) - - [19/Dec/2021:20:33:47 +0000] "GET / HTTP/1.1" 502 552 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/                                                                       537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36"
weblate_1   | 2021-12-19 20:33:49,815 INFO spawned: 'celery-memory' with pid 311
weblate_1   | 2021-12-19 20:33:50,839 INFO success: celery-memory entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
weblate_1   | 2021-12-19 20:33:56,915 INFO reaped unknown pid 306 (exit status 120)
weblate_1   | 2021-12-19 20:33:56,916 INFO reaped unknown pid 301 (exit status 120)
weblate_1   | nginx stderr | 2021/12/19 20:33:59 [crit] 254#254: *5 connect() to unix:/run/gunicorn/app/weblate/socket failed (2: No such file or directory) whi                                                                       le connecting to upstream, client: 127.0.0.1, server: , request: "GET /healthz/ HTTP/1.1", upstream: "http://unix:/run/gunicorn/app/weblate/socket:/healthz/", h                                                                       ost: "localhost:8080"
weblate_1   | nginx stdout | 127.0.0.1 - - [19/Dec/2021:20:33:59 +0000] "GET /healthz/ HTTP/1.1" 502 150 "-" "curl/7.74.0"
weblate_1   | 2021-12-19 20:34:42,165 INFO exited: celery-celery (terminated by SIGKILL; not expected)
weblate_1   | 2021-12-19 20:34:42,234 INFO spawned: 'celery-celery' with pid 365
weblate_1   | 2021-12-19 20:34:43,246 INFO success: celery-celery entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
weblate_1   | 2021-12-19 20:35:32,244 INFO exited: celery-translate (terminated by SIGKILL; not expected)
weblate_1   | 2021-12-19 20:35:33,257 INFO spawned: 'celery-translate' with pid 380
weblate_1   | 2021-12-19 20:35:34,270 INFO success: celery-translate entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
weblate_1   | nginx stdout | 185.180.143.147 - - [19/Dec/2021:20:35:46 +0000] "GET / HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.3                                                                       6 (KHTML, like Gecko) Chrome/66.0.3359.117 Safari/537.36"
weblate_1   | nginx stdout | 185.180.143.147 - - [19/Dec/2021:20:35:47 +0000] "\x16\x03\x01\x00\xB1\x01\x00\x00\xAD\x03\x03\x97!'\xA2\xCF\xDE\xC3f\xAC\xB2>z\x04                                                                       x#\xC8\xF1\x90\xB3\xD6\x19=\xE1\xCAo?\x80\xCDh@\x97Z\x00\x00V\xC0\x11\xC0\x07\xC0\x13\xC0\x09\xC0\x14\xC0" 400 150 "-" "-"
weblate_1   | 2021-12-19 20:35:53,419 INFO exited: celery-beat (terminated by SIGKILL; not expected)
weblate_1   | 2021-12-19 20:35:53,514 INFO spawned: 'celery-beat' with pid 382
weblate_1   | nginx stdout | 185.180.143.147 - - [19/Dec/2021:20:35:53 +0000] "SSH-2.0-Go" 400 150 "-" "-"
weblate_1   | 2021-12-19 20:35:54,544 INFO success: celery-beat entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
weblate_1   | nginx stdout | 185.180.143.147 - - [19/Dec/2021:20:35:59 +0000] "\x16\x03\x01\x00\x9A\x01\x00\x00\x96\x03\x03\xB0\x8Be\x11\xCF^\xCE{\xEB\xEB\x1B*                                                                        \xE7`\x22\x90\xFBCC;\x07\x05\xC7CH\xBF\x1C-\xAE6G\x00\x00\x1A\xC0/\xC0+\xC0\x11\xC0\x07\xC0\x13\xC0\x09\xC0\x14\xC0" 400 150 "-" "-"
weblate_1   | 2021-12-19 20:36:04,810 INFO exited: check (terminated by SIGKILL; not expected)
weblate_1   | nginx stdout | 185.180.143.147 - - [19/Dec/2021:20:36:04 +0000] "GET / HTTP/1.1 " 400 150 "-" "-"
cache_1     | 1:M 19 Dec 2021 20:36:13.087 * 100 changes in 300 seconds. Saving...
cache_1     | 1:M 19 Dec 2021 20:36:13.117 * Background saving started by pid 14
cache_1     | 14:C 19 Dec 2021 20:36:13.164 * DB saved on disk
cache_1     | 14:C 19 Dec 2021 20:36:13.185 * RDB: 0 MB of memory used by copy-on-write
cache_1     | 1:M 19 Dec 2021 20:36:13.242 * Background saving terminated with success
weblate_1   | nginx stderr | 2021/12/19 20:37:45 [error] 254#254: *15 upstream prematurely closed connection while reading response header from upstream, client                                                                       : 127.0.0.1, server: , request: "GET /healthz/ HTTP/1.1", upstream: "http://unix:/run/gunicorn/app/weblate/socket:/healthz/", host: "localhost:8080"
weblate_1   | nginx stdout | 127.0.0.1 - - [19/Dec/2021:20:37:45 +0000] "GET /healthz/ HTTP/1.1" 502 150 "-" "curl/7.74.0"
weblate_1   | celery-beat stdout | celery beat v5.2.1 (dawn-chorus) is starting.
weblate_1   | celery-beat stdout |
weblate_1   | nginx stderr | 2021/12/19 20:39:15 [error] 254#254: *18 upstream prematurely closed connection while reading response header from upstream, client: 77.94.17.68, server: , request: "GET http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css?ver=4.9.8 HTTP/1.1", upstream: "http://unix:/run/gunicorn/app/weblate/socket:/font-awesome/4.3.0/css/font-awesome.min.css?ver=4.9.8", host: "maxcdn.bootstrapcdn.com:80"
weblate_1   | nginx stdout | 77.94.17.68 - - [19/Dec/2021:20:39:15 +0000] "GET http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css?ver=4.9.8 HTTP/1.1" 502 552 "-" "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36"

and as I was copy and pasting this, a random exception popped up:

Exception in thread Thread-10:
Traceback (most recent call last):
  File "urllib3/connectionpool.py", line 426, in _make_request
  File "<string>", line 3, in raise_from
  File "urllib3/connectionpool.py", line 421, in _make_request
  File "http/client.py", line 1344, in getresponse
  File "http/client.py", line 306, in begin
  File "http/client.py", line 267, in _read_status
  File "socket.py", line 589, in readinto
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "requests/adapters.py", line 449, in send
  File "urllib3/connectionpool.py", line 727, in urlopen
  File "urllib3/util/retry.py", line 403, in increment
  File "urllib3/packages/six.py", line 735, in reraise
  File "urllib3/connectionpool.py", line 677, in urlopen
  File "urllib3/connectionpool.py", line 428, in _make_request
  File "urllib3/connectionpool.py", line 336, in _raise_timeout
urllib3.exceptions.ReadTimeoutError: UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "threading.py", line 926, in _bootstrap_inner
  File "threading.py", line 870, in run
  File "compose/cli/log_printer.py", line 214, in watch_events
  File "compose/project.py", line 575, in yield_loop
  File "compose/project.py", line 543, in build_container_event
  File "compose/container.py", line 44, in from_id
  File "docker/utils/decorators.py", line 19, in wrapped
  File "docker/api/container.py", line 771, in inspect_container
  File "docker/utils/decorators.py", line 46, in inner
  File "docker/api/client.py", line 228, in _get
  File "requests/sessions.py", line 543, in get
  File "requests/sessions.py", line 530, in request
  File "requests/sessions.py", line 643, in send
  File "requests/adapters.py", line 529, in send
requests.exceptions.ReadTimeout: UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60)

But the docker container is still active, it did not crash.

@TheAssassin I'm afraid I don't see the same error message in my docker logs :(

@nijel
Copy link
Member

nijel commented Dec 20, 2021

INFO exited: celery-notify (terminated by SIGKILL; not expected)

There is definitely something wrong going on, the processes should not exit this way. Can you check kernel logs (dmesg) for out of memory killer?

@DPMakerQB
Copy link
Author

@nijel Hey there! Sorry about that, I did see a memory issue so I upgraded my DigitalOcean droplet and now it works. Thanks for your help!!

@github-actions
Copy link

The issue you have reported is now resolved. If you don’t feel it’s right, please follow its labels to get a clue for further steps.

  • In case you see a similar problem, please open a separate issue.
  • If you are happy with the outcome, don’t hesitate to support Weblate by making a donation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question This is more a question for the support than an issue.
Projects
None yet
Development

No branches or pull requests

3 participants