not found(deploying via digitalocean, nginx, ubuntu, Gunicorn ) - django

I tried to deploy Django via digitalocean, nginx, ubuntu, and Gunicorn.
I followed the tutorial that digitaloccean provided.
Everything was fine before the step of binding it with Gunicorn.
I was able to use the run "manage.py runserver 0.0.0.0:8000"and was able to see the website on port 8000 of the IP address;
however when I tried to run gunicorn --bind 0.0.0.0:8000 biostar.wsgi
(virtualcrew) corey#crew:~/digitalocceancrew/digitalcrew$ gunicorn --bind 0.0.0.0:8000 biostar.wsgi
[2021-06-23 12:55:36 +0000] [134047] [INFO] Starting gunicorn 20.1.0
[2021-06-23 12:55:36 +0000] [134047] [INFO] Listening at: http://0.0.0.0:8000 (134047)
[2021-06-23 12:55:36 +0000] [134047] [INFO] Using worker: sync
[2021-06-23 12:55:36 +0000] [134049] [INFO] Booting worker with pid: 134049
,and tried to connect to the IP address again, the 404 not found error occurred.output
But when I tried to run sudo gunicorn --bind 0.0.0.0:8000 biostar.wsgi
(virtualcrew) corey#crew:~/digitalocceancrew/digitalcrew$ sudo gunicorn --bind 0.0.0.0:8000 biostar.wsgi
[2021-06-23 12:54:09 +0000] [134021] [INFO] Starting gunicorn 20.0.4
[2021-06-23 12:54:09 +0000] [134021] [INFO] Listening at: http://0.0.0.0:8000 (134021)
[2021-06-23 12:54:09 +0000] [134021] [INFO] Using worker: sync
[2021-06-23 12:54:09 +0000] [134023] [INFO] Booting worker with pid: 134023
celery error No module named 'django'
[2021-06-23 12:54:09 +0000] [134023] [ERROR] Exception in worker process
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/gunicorn/arbiter.py", line 583, in spawn_worker
worker.init_process()
File "/usr/lib/python3/dist-packages/gunicorn/workers/base.py", line 119, in init_process
self.load_wsgi()
File "/usr/lib/python3/dist-packages/gunicorn/workers/base.py", line 144, in load_wsgi
self.wsgi = self.app.wsgi()
File "/usr/lib/python3/dist-packages/gunicorn/app/base.py", line 67, in wsgi
self.callable = self.load()
File "/usr/lib/python3/dist-packages/gunicorn/app/wsgiapp.py", line 49, in load
return self.load_wsgiapp()
File "/usr/lib/python3/dist-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp
return util.import_app(self.app_uri)
File "/usr/lib/python3/dist-packages/gunicorn/util.py", line 383, in import_app
mod = importlib.import_module(module)
File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/corey/digitalocceancrew/digitalcrew/biostar/wsgi.py", line 12, in <module>
from django.core.wsgi import get_wsgi_application
ModuleNotFoundError: No module named 'django'
[2021-06-23 12:54:09 +0000] [134023] [INFO] Worker exiting (pid: 134023)
[2021-06-23 12:54:09 +0000] [134021] [INFO] Shutting down: Master
[2021-06-23 12:54:09 +0000] [134021] [INFO] Reason: Worker failed to boot.
I also tried every port of the IP address but none of them worked.
This is the output of systemctl status gunicorn.service
● gunicorn.service - gunicorn daemon
Loaded: loaded (/etc/systemd/system/gunicorn.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2021-06-19 09:14:20 UTC; 4 days ago
TriggeredBy: ● gunicorn.socket
Main PID: 34545 (gunicorn)
Tasks: 4 (limit: 1136)
Memory: 111.6M
CGroup: /system.slice/gunicorn.service
├─34545 /home/corey/digitalocceancrew/virtualcrew/bin/python /home/corey/digitalocceancrew/virtualcrew/bin/gunicorn --access-logfile - --workers 3 --bind unix:/run/gunicorn.sock biostar.wsgi:application
├─34557 /home/corey/digitalocceancrew/virtualcrew/bin/python /home/corey/digitalocceancrew/virtualcrew/bin/gunicorn --access-logfile - --workers 3 --bind unix:/run/gunicorn.sock biostar.wsgi:application
├─34558 /home/corey/digitalocceancrew/virtualcrew/bin/python /home/corey/digitalocceancrew/virtualcrew/bin/gunicorn --access-logfile - --workers 3 --bind unix:/run/gunicorn.sock biostar.wsgi:application
└─34559 /home/corey/digitalocceancrew/virtualcrew/bin/python /home/corey/digitalocceancrew/virtualcrew/bin/gunicorn --access-logfile - --workers 3 --bind unix:/run/gunicorn.sock biostar.wsgi:application
Jun 23 11:59:20 crew gunicorn[34557]: WARNING 2021-06-23 07:59:20,623 log.log_response 224 Not Found: /.env
Jun 23 11:59:20 crew gunicorn[34557]: - - [23/Jun/2021:07:59:20 -0400] "GET /.env HTTP/1.0" 404 179 "-" "python-requests/2.25.1"
Jun 23 12:06:31 crew gunicorn[34558]: WARNING 2021-06-23 08:06:31,852 log.log_response 224 Not Found: /
Jun 23 12:06:31 crew gunicorn[34558]: - - [23/Jun/2021:08:06:31 -0400] "GET / HTTP/1.0" 404 179 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36"
Jun 23 12:24:40 crew gunicorn[34557]: WARNING 2021-06-23 08:24:40,352 log.log_response 224 Not Found: /.env
Jun 23 12:24:40 crew gunicorn[34557]: - - [23/Jun/2021:08:24:40 -0400] "GET /.env HTTP/1.0" 404 179 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36"
Jun 23 12:24:40 crew gunicorn[34558]: WARNING 2021-06-23 08:24:40,553 log.log_response 224 Not Found: /
Jun 23 12:24:40 crew gunicorn[34558]: - - [23/Jun/2021:08:24:40 -0400] "POST / HTTP/1.0" 404 179 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36"
Jun 23 12:24:54 crew gunicorn[34559]: WARNING 2021-06-23 08:24:54,081 log.log_response 224 Not Found: /
Jun 23 12:24:54 crew gunicorn[34559]: - - [23/Jun/2021:08:24:54 -0400] "GET / HTTP/1.0" 404 179 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36"
And this is the output of sudo journalctl -u gunicorn
(virtualcrew) corey#crew:~/digitalocceancrew/digitalcrew$ sudo journalctl -u gunicorn
-- Logs begin at Sun 2021-06-20 07:46:26 UTC, end at Wed 2021-06-23 12:51:37 UTC. --
Jun 20 07:46:26 crew gunicorn[34559]: WARNING 2021-06-20 03:46:26,682 log.log_response 224 Not Found: /MTI4LjE5OS45Mi45MS1wZGZfMjEudHh0.xml
Jun 20 07:46:26 crew gunicorn[34559]: - - [20/Jun/2021:03:46:26 -0400] "GET /MTI4LjE5OS45Mi45MS1wZGZfMjEudHh0.xml HTTP/1.0" 404 179 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
Jun 20 07:46:51 crew gunicorn[34557]: WARNING 2021-06-20 03:46:51,386 log.log_response 224 Not Found: /MTI4LjE5OS45Mi45MS0xMDUtcGRmLnR4dA==.xml
Jun 20 07:46:51 crew gunicorn[34557]: - - [20/Jun/2021:03:46:51 -0400] "GET /MTI4LjE5OS45Mi45MS0xMDUtcGRmLnR4dA==.xml HTTP/1.0" 404 179 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
Jun 20 09:04:48 crew gunicorn[34559]: WARNING 2021-06-20 05:04:48,093 log.log_response 224 Not Found: /.env
Jun 20 09:04:48 crew gunicorn[34559]: - - [20/Jun/2021:05:04:48 -0400] "GET /.env HTTP/1.0" 404 179 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36"
Jun 20 09:04:48 crew gunicorn[34557]: WARNING 2021-06-20 05:04:48,585 log.log_response 224 Not Found: /
Jun 20 09:04:48 crew gunicorn[34557]: - - [20/Jun/2021:05:04:48 -0400] "POST / HTTP/1.0" 404 179 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36"
Jun 20 09:24:00 crew gunicorn[34558]: WARNING 2021-06-20 05:24:00,154 log.log_response 224 Not Found: /_ignition/execute-solution
Jun 20 09:24:00 crew gunicorn[34558]: - - [20/Jun/2021:05:24:00 -0400] "GET /_ignition/execute-solution HTTP/1.0" 404 179 "-" "python-requests/2.18.4"
Jun 20 09:47:12 crew gunicorn[34557]: WARNING 2021-06-20 05:47:12,781 log.log_response 224 Not Found: /
Jun 20 09:47:12 crew gunicorn[34557]: - - [20/Jun/2021:05:47:12 -0400] "GET / HTTP/1.0" 404 179 "-" "-"
Jun 20 09:47:13 crew gunicorn[34559]: WARNING 2021-06-20 05:47:13,166 log.log_response 224 Not Found: /
Jun 20 09:47:13 crew gunicorn[34559]: - - [20/Jun/2021:05:47:13 -0400] "GET / HTTP/1.0" 404 179 "-" "Mozilla/5.0 (compatible; CensysInspect/1.1; +https://about.censys.io/)"
Jun 20 09:58:11 crew gunicorn[34558]: WARNING 2021-06-20 05:58:11,030 log.log_response 224 Not Found: /.env
Jun 20 09:58:11 crew gunicorn[34558]: - - [20/Jun/2021:05:58:11 -0400] "GET /.env HTTP/1.0" 404 179 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36"
Jun 20 09:58:11 crew gunicorn[34557]: WARNING 2021-06-20 05:58:11,217 log.log_response 224 Not Found: /
Jun 20 09:58:11 crew gunicorn[34557]: - - [20/Jun/2021:05:58:11 -0400] "POST / HTTP/1.0" 404 179 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36"
Jun 20 10:11:55 crew gunicorn[34559]: WARNING 2021-06-20 06:11:55,505 log.log_response 224 Not Found: /
Jun 20 10:11:55 crew gunicorn[34559]: - - [20/Jun/2021:06:11:55 -0400] "GET / HTTP/1.0" 404 179 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.106 Safari/>
Jun 20 10:40:41 crew gunicorn[34557]: WARNING 2021-06-20 06:40:41,937 log.log_response 224 Not Found: /.env
Jun 20 10:40:41 crew gunicorn[34557]: - - [20/Jun/2021:06:40:41 -0400] "GET /.env HTTP/1.0" 404 179 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36"
Jun 20 10:40:42 crew gunicorn[34558]: WARNING 2021-06-20 06:40:42,935 log.log_response 224 Not Found: /
Jun 20 10:40:42 crew gunicorn[34558]: - - [20/Jun/2021:06:40:42 -0400] "POST / HTTP/1.0" 404 179 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36"
Jun 20 11:38:28 crew gunicorn[34558]: WARNING 2021-06-20 07:38:28,734 log.log_response 224 Not Found: /MTI4LjE5OS45Mi45MS0zOC1wZGYudHh0.xml
Jun 20 11:38:28 crew gunicorn[34558]: - - [20/Jun/2021:07:38:28 -0400] "GET /MTI4LjE5OS45Mi45MS0zOC1wZGYudHh0.xml HTTP/1.0" 404 179 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
Jun 20 11:43:16 crew gunicorn[34559]: WARNING 2021-06-20 07:43:16,900 log.log_response 224 Not Found: /robots.txt
Jun 20 11:43:16 crew gunicorn[34559]: - - [20/Jun/2021:07:43:16 -0400] "GET /robots.txt HTTP/1.0" 404 179 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
Jun 20 11:43:17 crew gunicorn[34557]: WARNING 2021-06-20 07:43:17,763 log.log_response 224 Not Found: /
Jun 20 11:43:17 crew gunicorn[34557]: - - [20/Jun/2021:07:43:17 -0400] "GET / HTTP/1.0" 404 179 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
Jun 20 11:46:49 crew gunicorn[34559]: WARNING 2021-06-20 07:46:49,299 log.log_response 224 Not Found: /MTI4LjE5OS45Mi45MS0zODFhbWNvOWkudHh0.xml
Jun 20 11:46:49 crew gunicorn[34559]: - - [20/Jun/2021:07:46:49 -0400] "GET /MTI4LjE5OS45Mi45MS0zODFhbWNvOWkudHh0.xml HTTP/1.0" 404 179 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
Jun 20 11:47:02 crew gunicorn[34557]: WARNING 2021-06-20 07:47:02,987 log.log_response 224 Not Found: /MTI4LjE5OS45Mi45MS03Zmh0c2VsODUudHh0.xml
Jun 20 11:47:02 crew gunicorn[34557]: - - [20/Jun/2021:07:47:02 -0400] "GET /MTI4LjE5OS45Mi45MS03Zmh0c2VsODUudHh0.xml HTTP/1.0" 404 179 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
Jun 20 11:52:56 crew gunicorn[34558]: WARNING 2021-06-20 07:52:56,575 log.log_response 224 Not Found: /MTI4LjE5OS45Mi45MS16c3FiMG12ZmMudHh0.xml
Jun 20 11:52:56 crew gunicorn[34558]: - - [20/Jun/2021:07:52:56 -0400] "GET /MTI4LjE5OS45Mi45MS16c3FiMG12ZmMudHh0.xml HTTP/1.0" 404 179 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
Jun 20 11:53:48 crew gunicorn[34558]: WARNING 2021-06-20 07:53:48,748 log.log_response 224 Not Found: /MTI4LjE5OS45Mi45MS1wZGZfMTM5LnR4dA==.xml
Jun 20 11:53:48 crew gunicorn[34558]: - - [20/Jun/2021:07:53:48 -0400] "GET /MTI4LjE5OS45Mi45MS1wZGZfMTM5LnR4dA==.xml HTTP/1.0" 404 179 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
Jun 20 11:56:02 crew gunicorn[34559]: WARNING 2021-06-20 07:56:02,167 log.log_response 224 Not Found: /boaform/admin/formLogin
Jun 20 11:56:02 crew gunicorn[34559]: - - [20/Jun/2021:07:56:02 -0400] "POST /boaform/admin/formLogin HTTP/1.0" 404 179 "http://128.199.92.91:80/admin/login.asp" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:71.0) Geck>
Jun 20 12:04:31 crew gunicorn[34558]: WARNING 2021-06-20 08:04:31,453 log.log_response 224 Not Found: /MTI4LjE5OS45Mi45MS1wZGZfMTM4LnR4dA==.xml
Jun 20 12:04:31 crew gunicorn[34558]: - - [20/Jun/2021:08:04:31 -0400] "GET /MTI4LjE5OS45Mi45MS1wZGZfMTM4LnR4dA==.xml HTTP/1.0" 404 179 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
Jun 20 12:05:44 crew gunicorn[34557]: WARNING 2021-06-20 08:05:44,775 log.log_response 224 Not Found: /mathematical_ideas_12th_edition_online_free.pdf
Jun 20 12:05:44 crew gunicorn[34557]: - - [20/Jun/2021:08:05:44 -0400] "GET /mathematical_ideas_12th_edition_online_free.pdf HTTP/1.0" 404 179 "-" "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKi>
Jun 20 12:13:36 crew gunicorn[34559]: WARNING 2021-06-20 08:13:36,178 log.log_response 224 Not Found: /MTI4LjE5OS45Mi45MS1kcXQ2Mm52YXMudHh0.xml
Jun 20 12:13:36 crew gunicorn[34559]: - - [20/Jun/2021:08:13:36 -0400] "GET /MTI4LjE5OS45Mi45MS1kcXQ2Mm52YXMudHh0.xml HTTP/1.0" 404 179 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
Jun 20 12:15:09 crew gunicorn[34559]: WARNING 2021-06-20 08:15:09,785 log.log_response 224 Not Found: /MTI4LjE5OS45Mi45MS1wZGZfMTc3LnR4dA==.xml
Jun 20 12:15:09 crew gunicorn[34559]: - - [20/Jun/2021:08:15:09 -0400] "GET /MTI4LjE5OS45Mi45MS1wZGZfMTc3LnR4dA==.xml HTTP/1.0" 404 179 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
Jun 20 12:17:00 crew gunicorn[34559]: WARNING 2021-06-20 08:17:00,000 log.log_response 224 Not Found: /
Jun 20 12:17:00 crew gunicorn[34559]: - - [20/Jun/2021:08:16:59 -0400] "GET / HTTP/1.0" 404 179 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.101 Safari/537.36"
Jun 20 12:22:12 crew gunicorn[34559]: WARNING 2021-06-20 08:22:12,841 log.log_response 224 Not Found: /MTI4LjE5OS45Mi45MS1jcnUweW5kdjEudHh0.xml
Jun 20 12:22:12 crew gunicorn[34559]: - - [20/Jun/2021:08:22:12 -0400] "GET /MTI4LjE5OS45Mi45MS1jcnUweW5kdjEudHh0.xml HTTP/1.0" 404 179 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
Jun 20 12:27:35 crew gunicorn[34557]: WARNING 2021-06-20 08:27:35,621 log.log_response 224 Not Found: /
This is the output of ls -l /run/gunicorn.sock and netstat -tlpn | grep 'gunicorn'(The second one does not have any output)
(virtualcrew) corey#crew:~/digitalocceancrew/digitalcrew$ sudo ls -l /run/gunicorn.sock
srw-rw-rw- 1 root root 0 Jun 19 09:03 /run/gunicorn.sock
(virtualcrew) corey#crew:~/digitalocceancrew/digitalcrew$ sudo netstat -tlpn | grep 'gunicorn'
(virtualcrew) corey#crew:~/digitalocceancrew/digitalcrew$
When I type in sudo tail -f /var/log/nginx/error.log, it started running and stuck.(no output)
(virtualcrew) corey#crew:~/digitalocceancrew/digitalcrew$ sudo tail -f /var/log/nginx/error.log
Output of sudo netstat -tulpn
(virtualcrew) corey#crew:~/digitalocceancrew/digitalcrew$ sudo netstat -tulpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 90046/nginx: master
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN 559/systemd-resolve
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1163/sshd: /usr/sbi
tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 4284/postgres
tcp6 0 0 :::80 :::* LISTEN 90046/nginx: master
tcp6 0 0 :::22 :::* LISTEN 1163/sshd: /usr/sbi
udp 0 0 127.0.0.53:53 0.0.0.0:* 559/systemd-resolve
I have the following questions:
What might possibly cause this error?
Does being able to run it on local server means that the error is not caused by the source code?
What can I try to fix this issue?
Thank you !!!

Related

Error 4xx AWS Elastic Beanstalk - Severe integrity

Good afternoon people,
I created an environment in Elastic Beanstalk and uploaded a NODEjs application an api with express.
She's working fine, all right.
But the integrity of the environment is reported as serious, and this monitoring attempt appears in the logs.
----------------------------------------
/var/log/nginx/access.log
----------------------------------------
172.31.46.198 - - [03/Nov/2021:19:14:13 +0000] "GET / HTTP/1.1" 404 139 "-" "ELB-HealthChecker/2.0" "-"
172.31.1.181 - - [03/Nov/2021:19:14:13 +0000] "GET / HTTP/1.1" 404 139 "-" "ELB-HealthChecker/2.0" "-"
172.31.30.127 - - [03/Nov/2021:19:14:13 +0000] "GET / HTTP/1.1" 404 139 "-" "ELB-HealthChecker/2.0" "-"
172.31.46.198 - - [03/Nov/2021:19:14:28 +0000] "GET / HTTP/1.1" 404 139 "-" "ELB-HealthChecker/2.0" "-"
172.31.1.181 - - [03/Nov/2021:19:14:28 +0000] "GET / HTTP/1.1" 404 139 "-" "ELB-HealthChecker/2.0" "-"
172.31.30.127 - - [03/Nov/2021:19:14:28 +0000] "GET / HTTP/1.1" 404 139 "-" "ELB-HealthChecker/2.0" "-"
172.31.46.198 - - [03/Nov/2021:19:14:43 +0000] "GET / HTTP/1.1" 404 139 "-" "ELB-HealthChecker/2.0" "-"
172.31.30.127 - - [03/Nov/2021:19:14:43 +0000] "GET / HTTP/1.1" 404 139 "-" "ELB-HealthChecker/2.0" "-"
172.31.1.181 - - [03/Nov/2021:19:14:43 +0000] "GET / HTTP/1.1" 404 139 "-" "ELB-HealthChecker/2.0" "-"
172.31.30.127 - - [03/Nov/2021:19:14:58 +0000] "GET / HTTP/1.1" 404 139 "-" "ELB-HealthChecker/2.0" "-"
172.31.1.181 - - [03/Nov/2021:19:14:58 +0000] "GET / HTTP/1.1" 404 139 "-" "ELB-HealthChecker/2.0" "-"
172.31.46.198 - - [03/Nov/2021:19:14:58 +0000] "GET / HTTP/1.1" 404 139 "-" "ELB-HealthChecker/2.0" "-"
172.31.30.127 - - [03/Nov/2021:19:15:13 +0000] "GET / HTTP/1.1" 404 139 "-" "ELB-HealthChecker/2.0" "-"
Does anyone know how I can fix this, without turning off the monitoring?
Good night people,
I found the problem, I didn't have anything set in my API's root on "/", so EB tried to monitor the api state and took a 404.
I set up a HealthCheck on the root "/" and normalized the 404 errors and integrity issue in the environment.

Nginx + Gunicorn + Django high latency

I'm trying to adjust my WS to support ~ 20k concurrent users.
No matter what configuration I change I still get the same 6 secs avg response time / per endpoint when my tests hit 2(two)k users and various 502 / 504 errors.
WebService:
CloudFlare <--> Nginx <--> Gunicorn <--> Django/DRF <--> Memcache <---> Postgres
Here's what I tried:
Increase gunicorn workers from 4 to 10
Increase service(pod) instances from 3 to 10
Increase gunicorn worker timeout to 120
Increase Nginx proxy_pass timeout to 120
Most endpoints hit the database once every 100 seconds and the other requests get the data from memcache.
Could any one help by pointing out what kind of configuration should I be changing?
Where should I be looking for delays/bottlenecks?
Gunicorn workers clearly are timming out, which I dont undersdand since theres no logic in the WS views. It should be only getting a query from memcache and returning it.
Nginx logs:
latforms/android HTTP/1.1", upstream: "http://10.0.1.17:9090/endpoints/platforms/android", host: "myhost.co"
2018/08/13 23:43:25 [error] 8893#8893: *2809163 upstream timed out (110: Connection timed out) while connecting to upstream, client: 200.211.198.133, server: myhost.co, request: "GET /endpoints/store/products/729 HTTP/1.1", upstream: "http://10.0.1.18:9090/endpoints/store/products/729", host: "myhost.co"
200.211.198.133 - [200.211.198.133] - - [13/Aug/2018:23:43:25 +0000] "GET /endpoints/store/categories/?cat_pk=13081 HTTP/1.1" 200 1718 "-" "python-requests/2.18.4" 627 80.840 [production-service-api-80] 10.0.0.112:9090, 10.0.1.13:9090, 10.0.0.113:9090 0, 0, 11150 40.000, 40.000, 0.840 504, 504, 200
200.211.198.133 - [200.211.198.133] - - [13/Aug/2018:23:43:25 +0000] "GET /endpoints/store/categories/?cat_pk=13081 HTTP/1.1" 200 1718 "-" "python-requests/2.18.4" 689 80.857 [production-service-api-80] 10.0.0.112:9090, 10.0.1.12:9090, 10.0.0.113:9090 0, 0, 11150 40.000, 40.000, 0.857 504, 504, 200
200.211.198.133 - [200.211.198.133] - - [13/Aug/2018:23:43:25 +0000] "GET /endpoints/store/home/ HTTP/1.1" 200 10072 "-" "python-requests/2.18.4" 670 80.580 [production-service-api-80] 10.0.1.13:9090, 10.0.1.11:9090, 10.0.0.112:9090 0, 0, 66511 40.001, 40.002, 0.577 504, 504, 200
200.211.198.133 - [200.211.198.133] - - [13/Aug/2018:23:43:25 +0000] "GET /endpoints/store/products/691/ HTTP/1.1" 200 703 "-" "python-requests/2.18.4" 646 80.486 [production-service-api-80] 10.0.1.8:9090, 10.0.1.13:9090, 10.0.1.12:9090 0, 0, 1968 40.000, 40.000, 0.486 504, 504, 200
200.211.198.133 - [200.211.198.133] - - [13/Aug/2018:23:43:25 +0000] "GET /endpoints/store/products/5458 HTTP/1.1" 301 0 "-" "python-requests/2.18.4" 678 80.444 [production-service-api-80] 10.0.1.13:9090, 10.0.1.12:9090, 10.0.1.17:9090 0, 0, 0 40.000, 40.002, 0.442 504, 504, 301
....
90, 10.0.1.11:9090, 10.0.1.8:9090 0, 0, 1968 40.000, 40.000, 0.584 504, 504, 200
200.211.198.133 - [200.211.198.133] - - [13/Aug/2018:23:43:25 +0000] "GET /endpoints/store/products/5458/ HTTP/1.1" 200 241 "-" "python-requests/2.18.4" 647 80.709 [production-service-api-80] 10.0.0.113:9090, 10.0.1.8:9090, 10.0.0.112:9090 0, 0, 327 40.001, 40.000, 0.708 504, 504, 200
--
2018/08/13 23:43:25 [error] 8766#8766: *2809243 upstream timed out (110: Connection timed out) while connecting to upstream, client: 200.211.198.133, server: myhost.co, request: "GET /endpoints/store/categories/?cat_pk=13081 HTTP/1.1", upstream: "http://10.0.1.13:9090/endpoints/store/categories/?cat_pk=13081", host: "myhost.co"
200.211.198.133 - [200.211.198.133] - - [13/Aug/2018:23:43:25 +0000] "GET /endpoints/store/products/692 HTTP/1.1" 301 0 "-" "python-requests/2.18.4" 677 80.672 [production-service-api-80] 10.0.1.17:9090, 10.0.1.10:9090, 10.0.0.113:9090 0, 0, 0 40.001, 40.001, 0.670 504, 504, 301
200.211.198.133 - [200.211.198.133] - - [13/Aug/2018:23:43:25 +0000] "GET /endpoints/store/products/4608/ HTTP/1.1" 200 553 "-" "python-requests/2.18.4" 647 80.591 [production-service-api-80] 10.0.1.11:9090, 10.0.1.17:9090, 10.0.1.8:9090 0, 0, 1090 40.000, 40.003, 0.588 504, 504, 200
Gunicorn logs:
{"asctime": "2018-08-13 23:42:55,145", "name": "gunicorn.access", "levelname": "INFO", "message": "10.0.0.13 - - [13/Aug/2018:23:42:55 +0000] \"GET /endpoints/store/products/691/ HTTP/1.1\" 200 1968 \"-\" \"python-requests/2.18.4\""}
{"asctime": "2018-08-13 23:42:55,167", "name": "gunicorn.access", "levelname": "INFO", "message": "10.0.0.13 - - [13/Aug/2018:23:42:55 +0000] \"GET /endpoints/store/products/729 HTTP/1.1\" 301 - \"-\" \"python-requests/2.18.4\""}
[2018-08-13 23:42:55 +0000] [1] [CRITICAL] WORKER TIMEOUT (pid:36)
[2018-08-13 23:42:55 +0000] [1] [CRITICAL] WORKER TIMEOUT (pid:37)
[2018-08-13 23:42:55 +0000] [382] [INFO] Booting worker with pid: 382
[2018-08-13 23:42:55 +0000] [383] [INFO] Booting worker with pid: 383
{"asctime": "2018-08-13 23:42:55,403", "name": "gunicorn.access", "levelname": "INFO", "message": "10.0.0.13 - - [13/Aug/2018:23:42:55 +0000] \"GET /endpoints/store/products/691/ HTTP/1.1\" 200 1968 \"-\" \"python-requests/2.18.4\""}
....
{"asctime": "2018-08-13 23:42:55,184", "name": "gunicorn.access", "levelname": "INFO", "message": "10.0.0.13 - - [13/Aug/2018:23:42:55 +0000] \"GET /endpoints/store/categories/?cat_pk=13081 HTTP/1.1\" 200 11150 \"-\" \"python-requests/2.18.4\""}
{"asctime": "2018-08-13 23:42:55,262", "name": "gunicorn.access", "levelname": "INFO", "message": "10.0.0.13 - - [13/Aug/2018:23:42:55 +0000] \"GET /endpoints/platforms/android HTTP/1.1\" 200 48 \"-\" \"python-requests/2.18.4\""}
{"asctime": "2018-08-13 23:42:55,439", "name": "gunicorn.access", "levelname": "INFO", "message": "10.0.0.13 - - [13/Aug/2018:23:42:55 +0000] \"GET /endpoints/platforms/android HTTP/1.1\" 200 48 \"-\" \"python-requests/2.18.4\""}
--
[2018-08-13 23:42:56 +0000] [1] [CRITICAL] WORKER TIMEOUT (pid:31)
{"asctime": "2018-08-13 23:42:56,689", "name": "gunicorn.access", "levelname": "INFO", "message": "10.0.0.13 - - [13/Aug/2018:23:42:56 +0000] \"GET /endpoints/store/products/729/ HTTP/1.1\" 200 2163 \"-\" \"python-requests/2.18.4\""}
{"asctime": "2018-08-13 23:42:56,799", "name": "gunicorn.access", "levelname": "INFO", "message": "10.0.0.13 - - [13/Aug/2018:23:42:56 +0000] \"GET /endpoints/store/products/5458/ HTTP/1.1\" 200 327 \"-\" \"python-requests/2.18.4\""}
why you not used uwsgi?
for better working do this
decrease database hit in your codes
increase worker count for gunicorn
diable info logging for gunicorn and nginx
if these configuration not worked for you you must change setup configuration or increase resource of your server.

When I check nginx access.log, unknown HEAD requests come in periodically

First, I use the server environment:
sever: nginx + uwsgi + django app, docker + AWS ECS deploy
celery: rabbitmq ec2
cache: redis ec2
logging: AWS CloudWatch log + watchtower third party app
When I access ECS EC2 and check nginx access.log, the following request periodically comes in.
Why is this request coming to me? This is what keeps coming in the first time you open the server.
In addition, my ecs server's security group 80/443 ports are opened to anywhere.
nginx/access.log
54.214.101.194 - - [14/Jul/2017:03:02:12 +0000] "HEAD http://13.114.17.75:80/mysql/admin/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:12 +0000] "HEAD http://13.114.17.75:80/mysql/dbadmin/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:12 +0000] "HEAD http://13.114.17.75:80/mysql/sqlmanager/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:12 +0000] "HEAD http://13.114.17.75:80/mysql/mysqlmanager/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:13 +0000] "HEAD http://13.114.17.75:80/phpmyadmin/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:13 +0000] "HEAD http://13.114.17.75:80/phpMyadmin/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:13 +0000] "HEAD http://13.114.17.75:80/phpMyAdmin/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:13 +0000] "HEAD http://13.114.17.75:80/phpmyAdmin/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:13 +0000] "HEAD http://13.114.17.75:80/phpmyadmin2/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:13 +0000] "HEAD http://13.114.17.75:80/phpmyadmin3/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:13 +0000] "HEAD http://13.114.17.75:80/phpmyadmin4/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:13 +0000] "HEAD http://13.114.17.75:80/2phpmyadmin/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:13 +0000] "HEAD http://13.114.17.75:80/wp-content/plugins/portable-phpmyadmin/wp-pma-mod/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:13 +0000] "HEAD http://13.114.17.75:80/phpmy/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:14 +0000] "HEAD http://13.114.17.75:80/phppma/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:14 +0000] "HEAD http://13.114.17.75:80/myadmin/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:14 +0000] "HEAD http://13.114.17.75:80/shopdb/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:14 +0000] "HEAD http://13.114.17.75:80/MyAdmin/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:14 +0000] "HEAD http://13.114.17.75:80/program/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:14 +0000] "HEAD http://13.114.17.75:80/PMA/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:14 +0000] "HEAD http://13.114.17.75:80/dbadmin/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:14 +0000] "HEAD http://13.114.17.75:80/pma/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:14 +0000] "HEAD http://13.114.17.75:80/db/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:15 +0000] "HEAD http://13.114.17.75:80/admin/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:15 +0000] "HEAD http://13.114.17.75:80/mysql/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:15 +0000] "HEAD http://13.114.17.75:80/database/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:15 +0000] "HEAD http://13.114.17.75:80/db/phpmyadmin/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:15 +0000] "HEAD http://13.114.17.75:80/db/phpMyAdmin/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:15 +0000] "HEAD http://13.114.17.75:80/sqlmanager/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:15 +0000] "HEAD http://13.114.17.75:80/mysqlmanager/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:15 +0000] "HEAD http://13.114.17.75:80/php-myadmin/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:15 +0000] "HEAD http://13.114.17.75:80/phpmy-admin/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:16 +0000] "HEAD http://13.114.17.75:80/mysqladmin/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:16 +0000] "HEAD http://13.114.17.75:80/mysql-admin/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:16 +0000] "HEAD http://13.114.17.75:80/admin/phpmyadmin/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:16 +0000] "HEAD http://13.114.17.75:80/admin/phpMyAdmin/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:16 +0000] "HEAD http://13.114.17.75:80/admin/sysadmin/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:16 +0000] "HEAD http://13.114.17.75:80/admin/sqladmin/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:16 +0000] "HEAD http://13.114.17.75:80/admin/db/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:16 +0000] "HEAD http://13.114.17.75:80/admin/web/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:16 +0000] "HEAD http://13.114.17.75:80/admin/pMA/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:17 +0000] "HEAD http://13.114.17.75:80/mysql/pma/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:17 +0000] "HEAD http://13.114.17.75:80/mysql/db/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:17 +0000] "HEAD http://13.114.17.75:80/mysql/web/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:17 +0000] "HEAD http://13.114.17.75:80/mysql/pMA/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:17 +0000] "HEAD http://13.114.17.75:80/sql/phpmanager/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:17 +0000] "HEAD http://13.114.17.75:80/sql/php-myadmin/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:17 +0000] "HEAD http://13.114.17.75:80/sql/phpmy-admin/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:17 +0000] "HEAD http://13.114.17.75:80/sql/sql/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:17 +0000] "HEAD http://13.114.17.75:80/sql/myadmin/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:18 +0000] "HEAD http://13.114.17.75:80/sql/webadmin/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:18 +0000] "HEAD http://13.114.17.75:80/sql/sqlweb/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:18 +0000] "HEAD http://13.114.17.75:80/sql/websql/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:18 +0000] "HEAD http://13.114.17.75:80/sql/webdb/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:18 +0000] "HEAD http://13.114.17.75:80/sql/sqladmin/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:18 +0000] "HEAD http://13.114.17.75:80/sql/sql-admin/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:18 +0000] "HEAD http://13.114.17.75:80/sql/phpmyadmin2/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:18 +0000] "HEAD http://13.114.17.75:80/sql/phpMyAdmin2/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:18 +0000] "HEAD http://13.114.17.75:80/sql/phpMyAdmin/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:19 +0000] "HEAD http://13.114.17.75:80/db/myadmin/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:19 +0000] "HEAD http://13.114.17.75:80/db/webadmin/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:19 +0000] "HEAD http://13.114.17.75:80/db/dbweb/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:19 +0000] "HEAD http://13.114.17.75:80/db/websql/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:19 +0000] "HEAD http://13.114.17.75:80/db/webdb/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:19 +0000] "HEAD http://13.114.17.75:80/db/dbadmin/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:19 +0000] "HEAD http://13.114.17.75:80/db/db-admin/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:19 +0000] "HEAD http://13.114.17.75:80/db/phpmyadmin3/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:19 +0000] "HEAD http://13.114.17.75:80/db/phpMyAdmin3/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:20 +0000] "HEAD http://13.114.17.75:80/db/phpMyAdmin-3/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:20 +0000] "HEAD http://13.114.17.75:80/administrator/phpmyadmin/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:20 +0000] "HEAD http://13.114.17.75:80/administrator/phpMyAdmin/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:20 +0000] "HEAD http://13.114.17.75:80/administrator/db/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:20 +0000] "HEAD http://13.114.17.75:80/administrator/web/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:20 +0000] "HEAD http://13.114.17.75:80/administrator/pma/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:20 +0000] "HEAD http://13.114.17.75:80/administrator/PMA/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:20 +0000] "HEAD http://13.114.17.75:80/administrator/admin/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:20 +0000] "HEAD http://13.114.17.75:80/phpMyAdmin2/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:20 +0000] "HEAD http://13.114.17.75:80/phpMyAdmin3/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:21 +0000] "HEAD http://13.114.17.75:80/phpMyAdmin4/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:21 +0000] "HEAD http://13.114.17.75:80/phpMyAdmin-3/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:21 +0000] "HEAD http://13.114.17.75:80/php-my-admin/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:21 +0000] "HEAD http://13.114.17.75:80/PMA2011/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:21 +0000] "HEAD http://13.114.17.75:80/PMA2012/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:21 +0000] "HEAD http://13.114.17.75:80/PMA2013/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:21 +0000] "HEAD http://13.114.17.75:80/PMA2014/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:21 +0000] "HEAD http://13.114.17.75:80/PMA2015/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:21 +0000] "HEAD http://13.114.17.75:80/PMA2016/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:22 +0000] "HEAD http://13.114.17.75:80/PMA2017/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:22 +0000] "HEAD http://13.114.17.75:80/PMA2018/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:22 +0000] "HEAD http://13.114.17.75:80/pma2011/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:22 +0000] "HEAD http://13.114.17.75:80/pma2012/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:22 +0000] "HEAD http://13.114.17.75:80/pma2013/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:22 +0000] "HEAD http://13.114.17.75:80/pma2014/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:22 +0000] "HEAD http://13.114.17.75:80/pma2015/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:22 +0000] "HEAD http://13.114.17.75:80/pma2016/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:22 +0000] "HEAD http://13.114.17.75:80/pma2017/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:23 +0000] "HEAD http://13.114.17.75:80/pma2018/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:23 +0000] "HEAD http://13.114.17.75:80/phpmyadmin2011/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:23 +0000] "HEAD http://13.114.17.75:80/phpmyadmin2012/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:23 +0000] "HEAD http://13.114.17.75:80/phpmyadmin2013/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:23 +0000] "HEAD http://13.114.17.75:80/phpmyadmin2015/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:23 +0000] "HEAD http://13.114.17.75:80/phpmyadmin2016/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:23 +0000] "HEAD http://13.114.17.75:80/phpmyadmin2017/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:24 +0000] "HEAD http://13.114.17.75:80/phpmyadmin2018/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
54.214.101.194 - - [14/Jul/2017:03:02:24 +0000] "HEAD http://13.114.17.75:80/phpmanager/ HTTP/1.1" 404 0 "-" "Mozilla/5.0 Jorgee"
95.213.177.125 - - [14/Jul/2017:03:14:35 +0000] "POST /azenv.php?auth=150000207593&a=PSCMN&i=885409785&p=80 HTTP/1.1" 404 580 "https://proxyradar.com/" "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)"
This is a very typical request pattern from the vulnerability scanning tool ZmEu. Long story short a hacker is running an automated tool that is trying to find a vulnerable installation of PHPMyAdmin on your system, to exploit it in order to gain root access to your system. It doesn't even matter that you don't have PHPMyAdmin on your system, they will still make requests just to test and see if you do because its cheap to do so, and if they do find something to exploit they can get into your server to steal data or use it for nefarious purposes.
Unfortunately this is just the cost of having a server on the internet, people are constantly running automated scanning tools against any server they can reach, trying to find ways to hack into it and take it over.

Error 503 in OpenShift server

That's my first Django project and I'm trying to deploy it to OpenShift, but I have a problem: when I'm trying to open app's page, I see "503: Service Temporarily Unavailable" message. I thought that app wasn't started so I tried to launch 'ctl_app start' in ssh and I've got this:
python: can't open file 'app.py': [Errno 2] No such file or directory
I tried to start app this way: rhc app start customerquiz and got this:
RESULT:
customerquiz started
But it took no effect. Well, I tried to look the state of app:
$ rhc app show --state customerquiz
Cartridge python-2.7, mysql-5.1, phpmyadmin-3.4 is started
And that's what in server logs:
$ rhc tail customerquiz
==> mysql-5.1/log/mysql_error.log <==
130519 17:32:54 [Note] /usr/libexec/mysqld: Shutdown complete
130519 17:32:54 mysqld_safe mysqld from pid file /var/lib/openshift/000005//mysql-5.1/pid/mysql.pid ended
130519 17:33:04 mysqld_safe Starting mysqld daemon with databases from /var/lib/openshift/000005//mysql-5.1/data/
130519 17:33:04 InnoDB: Initializing buffer pool, size = 16.0M
130519 17:33:05 InnoDB: Completed initialization of buffer pool
130519 17:33:05 InnoDB: Started; log sequence number 0 44233
130519 17:33:05 [Note] Event Scheduler: Loaded 0 events
130519 17:33:05 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.69' socket: '/var/lib/openshift/000005//mysql-5.1/socket/mysql.sock' port: 3306 Source distribution
==> python-2.7/logs/appserver.log <==
python: can't open file 'app.py': [Errno 2] No such file or directory
==> phpmyadmin-3.4/logs/access_log-20130519-000000-EST <==
109.254.107.11 - - [19/May/2013:17:14:13 -0400] "GET /phpmyadmin/themes/pmahomme/img/error.ico HTTP/1.1" 200 5430 "https://customerquiz-unclelem.rhcloud.com/phpmyadmin/phpmyadmin.css.php?server=1&token=436aa&js_frame=right&nocache=5471357898" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:21.0) Gecko/20100101 Firefox/21.0"
- - - [19/May/2013:17:14:13 -0400] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.2.15 (Red Hat) (internal dummy connection)"
109.254.107.11 - admin [19/May/2013:17:14:18 -0400] "GET /phpmyadmin/ HTTP/1.1" 200 2580 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:21.0) Gecko/20100101 Firefox/21.0"
109.254.107.11 - admin [19/May/2013:17:14:19 -0400] "GET /phpmyadmin/main.php?token=436aa HTTP/1.1" 200 35472 "https://customerquiz-unclelem.rhcloud.com/phpmyadmin/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:21.0) Gecko/20100101 Firefox/21.0"
109.254.107.11 - adminB [19/May/2013:17:14:21 -0400] "GET /phpmyadmin/version_check.php?&_nocache=1368998062197204658 HTTP/1.1" 200 44 "https://customerquiz-unclelem.rhcloud.com/phpmyadmin/main.php?token=436aa" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:21.0) Gecko/20100101 Firefox/21.0"
109.254.107.11 - admin [19/May/2013:17:14:19 -0400] "GET /phpmyadmin/navigation.php?token=436aa HTTP/1.1" 200 5029 "https://customerquiz-unclelem.rhcloud.com/phpmyadmin/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:21.0) Gecko/20100101 Firefox/21.0"
109.254.107.11 - admin [19/May/2013:17:20:49 -0400] "GET /phpmyadmin/ HTTP/1.1" 200 2580 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:21.0) Gecko/20100101 Firefox/21.0"
109.254.107.11 - admin [19/May/2013:17:20:50 -0400] "GET /phpmyadmin/navigation.php?token=436aa HTTP/1.1" 200 5029 "https://customerquiz-unclelem.rhcloud.com/phpmyadmin/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:21.0) Gecko/20100101 Firefox/21.0"
109.254.107.11 - admin [19/May/2013:17:20:50 -0400] "GET /phpmyadmin/main.php?token=436aa HTTP/1.1" 200 35472 "https://customerquiz-unclelem.rhcloud.com/phpmyadmin/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:21.0) Gecko/20100101 Firefox/21.0"
109.254.107.11 - admin [19/May/2013:17:20:52 -0400] "GET /phpmyadmin/version_check.php?&_nocache=1368998453881950766 HTTP/1.1" 200 44 "https://customerquiz-unclelem.rhcloud.com/phpmyadmin/main.php?token=8436aa" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:21.0) Gecko/20100101 Firefox/21.0"
==> phpmyadmin-3.4/logs/error_log-20130519-000000-EST <==
[Sun May 19 17:12:56 2013] [notice] Digest: done
[Sun May 19 17:12:56 2013] [notice] Apache/2.2.15 (Unix) PHP/5.3.3 configured -- resuming normal operations
[Sun May 19 17:28:00 2013] [notice] SELinux policy enabled; httpd running as context unconfined_u:system_r:openshift_t:s0:c6,c356
[Sun May 19 17:28:00 2013] [notice] Digest: generating secret for digest authentication ...
[Sun May 19 17:28:00 2013] [notice] Digest: done
[
Sun May 19 17:28:00 2013] [notice] Apache/2.2.15 (Unix) PHP/5.3.3 configured -- resuming normal operations
[Sun May 19 17:33:17 2013] [notice] SELinux policy enabled; httpd running as context unconfined_u:system_r:openshift_t:s0:c6,c356
[Sun May 19 17:33:17 2013] [notice] Digest: generating secret for digest authentication ...
[Sun May 19 17:33:17 2013] [notice] Digest: done
[Sun May 19 17:33:17 2013] [notice] Apache/2.2.15 (Unix) PHP/5.3.3 configured -- resuming normal operations
Does anyone have any ideas what can be wrong?
P.S. That's deployed project source code, if you need it: https://github.com/uncleLem/CustomerQuiz (I just changed database connection parameters).
P.P.S. Oh, BTW, if I open https://customerquiz-unclelem.rhcloud.com/phpmyadmin/ directly, I can see phpMyAdmin page.
We are not using mod_wsgi with these new carts. 2.7 uses gevent and 3.3 uses WebOb
Take a look at how we set up the app.py in the 2.7 cart
https://github.com/openshift/openshift-community-cartridge-python-2.7/blob/master/template/app.py
and for 3.3
https://github.com/openshift/openshift-community-cartridge-python-3.3/blob/master/template/app.py
Can you review the following blog post to see if it helps?
https://www.openshift.com/blogs/host-python-in-a-community-cart

AWS elastic beanstalk cannot return custom response code using resteasy?

I'm working on a web service using RESTEASY to set the response status code when get some exception.
First I tried resteasy exception mapper which works fine locally. The mapper code attached below. However, when I upload that WS into elastic beanstalk, that always return 500 (internal server error).
#Provider
public class LoadGridTileFailedExceptionMapper extends BaseExceptionMapper implements ExceptionMapper<LoadGridTileFailedException>
{
#Override
public Response toResponse(LoadGridTileFailedException e)
{
log(e.getMessage(), e);
return printMsg(e.getMessage(), DtmWebServiceReturnStatus.LOAD_GRID_TILE_FAILED_EXCEPTION_CODE);
}
}
Then I try just throw exception WebApplicationException(ex, DtmWebServiceReturnStatus.LOAD_GRID_TILE_FAILED_EXCEPTION_CODE) to get around exception mapping. The result is that I got a response status 498(LOAD_GRID_TILE_FAILED_EXCEPTION_CODE) wrapped in status code 500.
Apache Tomcat/7.0.27 - Error report HTTP Status 498 - type Status reportmessage description http.498Apache Tomcat/7.0.27
It seems that elastic beanstalk wrapped all exceptions throw out in the server side with status code 500?The question is how can I get around that feature and return the status code I set in response? Thank you.
UPDATE
Try more requests this morning and find something interesting:
Get the right return status in elastic beanstalk log snapshot
/var/log/tomcat7/localhost_access_log.txt
127.0.0.1 - - [09/Jan/2013:15:06:28 +0000] "GET /published/tile/003331330031 HTTP/1.1" 498 22
127.0.0.1 - - [09/Jan/2013:15:06:31 +0000] "GET /published/tile/003331330031 HTTP/1.1" 498 22
127.0.0.1 - - [09/Jan/2013:15:06:34 +0000] "GET /published/tile/003331330031 HTTP/1.1" 498 22
127.0.0.1 - - [09/Jan/2013:15:06:37 +0000] "GET /published/tile/003331330031 HTTP/1.1" 498 22
127.0.0.1 - - [09/Jan/2013:15:06:39 +0000] "GET /published/tile/003331330031 HTTP/1.1" 498 22
127.0.0.1 - - [09/Jan/2013:15:06:41 +0000] "GET /published/tile/003331330031 HTTP/1.1" 498 22
127.0.0.1 - - [09/Jan/2013:15:06:44 +0000] "GET /published/tile/003331330031 HTTP/1.1" 498 22
127.0.0.1 - - [09/Jan/2013:15:06:48 +0000] "GET /published/tile/003331330031 HTTP/1.1" 498 22
127.0.0.1 - - [09/Jan/2013:15:06:51 +0000] "GET /published/tile/003331330031 HTTP/1.1" 498 22
127.0.0.1 - - [09/Jan/2013:15:06:54 +0000] "GET /published/tile/003331330031 HTTP/1.1" 498 22
127.0.0.1 - - [09/Jan/2013:15:06:57 +0000] "GET /published/tile/003331330031 HTTP/1.1" 498 22
/var/log/httpd/elasticbeanstalk-access_log
10.28.215.233 (65.167.11.254, 10.28.215.233) - - [09/Jan/2013:15:06:28 +0000] "GET /published/tile/003331330031 HTTP/1.1" 498 22 "-" "-"
10.28.215.233 (65.167.11.254, 10.28.215.233) - - [09/Jan/2013:15:06:31 +0000] "GET /published/tile/003331330031 HTTP/1.1" 498 22 "-" "-"
10.28.215.233 (65.167.11.254, 10.28.215.233) - - [09/Jan/2013:15:06:34 +0000] "GET /published/tile/003331330031 HTTP/1.1" 498 22 "-" "-"
10.28.215.233 (65.167.11.254, 10.28.215.233) - - [09/Jan/2013:15:06:37 +0000] "GET /published/tile/003331330031 HTTP/1.1" 498 22 "-" "-"
10.28.215.233 (65.167.11.254, 10.28.215.233) - - [09/Jan/2013:15:06:39 +0000] "GET /published/tile/003331330031 HTTP/1.1" 498 22 "-" "-"
10.28.215.233 (65.167.11.254, 10.28.215.233) - - [09/Jan/2013:15:06:41 +0000] "GET /published/tile/003331330031 HTTP/1.1" 498 22 "-" "-"
10.28.215.233 (65.167.11.254, 10.28.215.233) - - [09/Jan/2013:15:06:44 +0000] "GET /published/tile/003331330031 HTTP/1.1" 498 22 "-" "-"
10.28.215.233 (65.167.11.254, 10.28.215.233) - - [09/Jan/2013:15:06:48 +0000] "GET /published/tile/003331330031 HTTP/1.1" 498 22 "-" "-"
10.28.215.233 (65.167.11.254, 10.28.215.233) - - [09/Jan/2013:15:06:51 +0000] "GET /published/tile/003331330031 HTTP/1.1" 498 22 "-" "-"
10.28.215.233 (65.167.11.254, 10.28.215.233) - - [09/Jan/2013:15:06:54 +0000] "GET /published/tile/003331330031 HTTP/1.1" 498 22 "-" "-"
10.28.215.233 (65.167.11.254, 10.28.215.233) - - [09/Jan/2013:15:06:57 +0000] "GET /published/tile/003331330031 HTTP/1.1" 498 22 "-" "-"
However in client side, still got 500 :-(
printMsg method:
protected Response printMsg(String msg, int intStatus)
{
// Need this due to the Resteasy bug
ServiceDataCollector.processRequest(true);
ResponseBuilder builder = Response.status(intStatus);
builder.type("text/plain");
builder.entity("ERROR: " + msg);
Response rep = builder.build();
LOG.error(rep.getStatus() + ":" + rep.toString());
return rep;
}
Some one help me to work the problem out. I had the httpd deployed in my AMI before tomcat server at 80. So the load balancer will interact with httpd server, which change the status code from tomcat to 500. Disable that httpd server will solve the problem. Thx for everyone's help.