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

Nginx 504 gateway timeout #5

Open
markland556 opened this issue Nov 7, 2022 · 15 comments
Open

Nginx 504 gateway timeout #5

markland556 opened this issue Nov 7, 2022 · 15 comments

Comments

@markland556
Copy link

markland556 commented Nov 7, 2022

Have been trying to troubleshoot to the best of my abilities with no luck. Fresh docker container built and always get 504 bad gateway. Seems like it can not connect to gunicorn web service. Not sure what to try next.

2022-11-07 02:00:33,036 CRIT Supervisor running as root (no user in config file)
2022-11-07 02:00:33,036 INFO Included extra file "/etc/supervisor/conf.d/hashcat_wpa.conf" during parsing
2022-11-07 02:00:33,063 INFO RPC interface 'supervisor' initialized
2022-11-07 02:00:33,063 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2022-11-07 02:00:33,064 INFO supervisord started with pid 7
2022-11-07 02:00:34,071 INFO spawned: 'nginx' with pid 10
2022-11-07 02:00:34,076 INFO spawned: 'gunicorn' with pid 11
2022-11-07 02:00:34,081 INFO spawned: 'hashcat-brain' with pid 12
2022-11-07 02:00:34,106 INFO success: nginx entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2022-11-07 02:00:35,630 INFO success: hashcat-brain entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-11-07 02:00:36,632 INFO success: gunicorn entered RUNNING state, process has stayed up for > than 2 seconds (startsecs)
@markland556 markland556 changed the title Nginx 504 bad gateway Nginx 504 gateway timeout Nov 7, 2022
@dizcza
Copy link
Owner

dizcza commented Nov 7, 2022

Please share the content of the following files:

  • /root/hashcat-wpa-server/logs/supervisor/nginx_stdout.log
  • /root/hashcat-wpa-server/logs/supervisor/nginx_stderr.log
  • /root/hashcat-wpa-server/logs/supervisor/gunicorn_stdout.log
  • /root/hashcat-wpa-server/logs/supervisor/gunicorn_stderr.log

@markland556
Copy link
Author

markland556 commented Nov 7, 2022

nginx_stdout.log -Empty
nginx_stderr.log - Empty
gunicorn_stdout.log - Empty
gunicorn_stderr.log :

[2022-11-07 14:29:54 +0000] [11] [CRITICAL] WORKER TIMEOUT (pid:2953)
[2022-11-07 14:29:54 +0000] [2953] [INFO] Worker exiting (pid: 2953)
[2022-11-07 14:29:55 +0000] [2957] [INFO] Booting worker with pid: 2957
[2022-11-07 14:30:25 +0000] [11] [CRITICAL] WORKER TIMEOUT (pid:2957)
[2022-11-07 14:30:25 +0000] [2957] [INFO] Worker exiting (pid: 2957)
[2022-11-07 14:30:25 +0000] [2961] [INFO] Booting worker with pid: 2961
[2022-11-07 14:30:55 +0000] [11] [CRITICAL] WORKER TIMEOUT (pid:2961)
[2022-11-07 14:30:55 +0000] [2961] [INFO] Worker exiting (pid: 2961)
[2022-11-07 14:30:55 +0000] [2965] [INFO] Booting worker with pid: 2965
[2022-11-07 14:31:26 +0000] [11] [CRITICAL] WORKER TIMEOUT (pid:2965)
[2022-11-07 14:31:26 +0000] [2965] [INFO] Worker exiting (pid: 2965)
[2022-11-07 14:31:26 +0000] [2968] [INFO] Booting worker with

@dizcza
Copy link
Owner

dizcza commented Nov 8, 2022

All right, so the workers are killed as soon as they are spawned by gunicorn. It doesn't tell us why though.

I noticed that the Dockerfile is outdated (in 3 months, gosh) and yet another apt package has been removed/changed/etc. So I need to invest time into the issue.

In the meanwhile, consider creating a separate Python env locally (on host), running pip install -r requirements.txt and then launching gunicorn from the project root directory:

gunicorn app:app --bind localhost:8000

Navigate to localhost:8000.

Consider also a command line interface described in Readme.

@dizcza dizcza closed this as completed in 9548cd4 Jan 12, 2023
@dizcza
Copy link
Owner

dizcza commented Jan 12, 2023

Sorry for taking this so long. I've been occupied by survival tasks.

I've made a fix, available on master (a few hours and will be available on the Dockerhub as well).

Please check if this works for you. I've tested the docker images locally.

Feel free to reopen the issue if the problem still persists.

@markland556
Copy link
Author

The same issue remains.

@dizcza
Copy link
Owner

dizcza commented Jan 14, 2023

@markland556 please tell me the branch (tag) you're using. Is it the latest or pocl?

@markland556
Copy link
Author

markland556 commented Jan 14, 2023 via email

@dizcza
Copy link
Owner

dizcza commented Jan 14, 2023

Malformed response.

Write again.

@markland556
Copy link
Author

Using Latest

@dizcza
Copy link
Owner

dizcza commented Jan 17, 2023

Are you sure you've updated the dizcza/hashcat-wpa-server:latest from the Dockerhub repository? You can simply check the python version:

  • if it's 3.9, you're using the old image
  • if it's 3.8, you've updated the image to the most recent one (I've downgraded the python version)

@dizcza dizcza reopened this Jan 17, 2023
@dizcza
Copy link
Owner

dizcza commented Jan 17, 2023

And also I assume you have a GPU on the machine from which you start the dizcza/hashcat-wpa-server:latest image. It won't work for machines without GPUs.

@dizcza
Copy link
Owner

dizcza commented Jan 17, 2023

Please check if other branches (tags) work for you:

  • dizcza/hashcat-wpa-server:intel-cpu will work on your PC or laptop but will probably not work on cloud services
  • dizcza/hashcat-wpa-server:pocl should work on any machine

@markland556
Copy link
Author

Verified Python version is 3.8 for gpu version. Tried both cpu and pocl version with same 504 gateway issue.

@dizcza
Copy link
Owner

dizcza commented Jan 21, 2023

Are you launching the docker image on your host machine or on web services like AWS?

@markland556
Copy link
Author

markland556 commented Jan 22, 2023

This is docker running on a Ubuntu VM on a Proxmox hypervisor. It worked at one point in the past, But i think everything was redone at some point and havent had it working since.
Even in the Ubuntu VM if i go to localhost:9111 is still gives the same error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants