I’m trying to deploy my flask app from GitHub but it keeps erroring out.
I’m new to fly.io and this is my first time using GitHub workflows to deploy anything. I feel I’ve followed the examples and guides as close as I could.
My repo: GitHub - showipintbri/sid_checker: A web-app to display the raw rule/signature from the sid.
The last group of lines from GitHub actions output:
You can detach the terminal anytime without stopping the deployment
Monitoring Deployment
v36 is being deployed
4c8b85cf: iad running healthy
4c8b85cf: iad pending
4c8b85cf: iad pending
v36 failed - Failed due to unhealthy allocations - not rolling back to stable job version 36 as current job has same specification
Error abort
***v36 failed - Failed due to unhealthy allocations - not rolling back to stable job version 36 as current job has same specification and deploying as v37
Troubleshooting guide at https://fly.io/docs/getting-started/troubleshooting/
When I run “flyctl logs
” locally on my workstation while deploying I see output from my app’s “print
” statements as well as errors.
Notable errors are:
021-11-12T00:01:37.434 runner[93ec062c] iad [info] Starting instance
2021-11-12T00:01:37.468 runner[93ec062c] iad [info] Configuring virtual machine
2021-11-12T00:01:37.469 runner[93ec062c] iad [info] Pulling container image
2021-11-12T00:01:37.702 runner[93ec062c] iad [info] Preparing kernel init
2021-11-12T00:01:38.125 runner[93ec062c] iad [info] Configuring firecracker
2021-11-12T00:01:38.166 runner[93ec062c] iad [info] Starting virtual machine
2021-11-12T00:01:38.319 app[93ec062c] iad [info] 2021/11/12 00:01:38 listening on [fdaa:0:381f:a7b:21e0:93ec:62c:2]:22 (DNS: [fdaa::3]:53)
2021-11-12T00:01:38.323 app[93ec062c] iad [info] web | Running...
2021-11-12T00:01:38.594 app[93ec062c] iad [info] web | [2021-11-12 00:01:38 +0000] [522] [INFO] Starting gunicorn 20.1.0
2021-11-12T00:01:38.594 app[93ec062c] iad [info] web | [2021-11-12 00:01:38 +0000] [522] [INFO] Listening at: http://0.0.0.0:8080 (522)
2021-11-12T00:01:38.594 app[93ec062c] iad [info] web | [2021-11-12 00:01:38 +0000] [522] [INFO] Using worker: sync
2021-11-12T00:01:38.596 app[93ec062c] iad [info] web | [2021-11-12 00:01:38 +0000] [524] [INFO] Booting worker with pid: 524
2021-11-12T00:01:38.804 app[93ec062c] iad [info] web | Opened database successfully
2021-11-12T00:01:38.806 app[93ec062c] iad [info] web | Table created successfully
2021-11-12T00:01:39.870 app[93ec062c] iad [info] web | Wrote file to disk: emerging-all.rules.zip
2021-11-12T00:01:39.874 app[93ec062c] iad [info] web | 02fe9b45ca080135ceea193b75258f1b
2021-11-12T00:01:39.889 app[93ec062c] iad [info] web | 02fe9b45ca080135ceea193b75258f1b
2021-11-12T00:01:39.889 app[93ec062c] iad [info] web | It's a Match!
2021-11-12T00:01:39.890 app[93ec062c] iad [info] web | File Name Modified Size
2021-11-12T00:01:39.969 app[93ec062c] iad [info] web | Extracted file: emerging-all.rules.zip
2021-11-12T00:01:39.969 app[93ec062c] iad [info] web | NOTICE: Starting to build the Database
2021-11-12T00:01:40.258 app[93ec062c] iad [info] web | NOTICE: Finished building the database.
2021-11-12T00:01:40.263 app[93ec062c] iad [info] web | [2021-11-12 00:01:40 +0000] [524] [ERROR] Exception in worker process
2021-11-12T00:01:40.315 app[93ec062c] iad [info] web | [2021-11-12 00:01:40 +0000] [522] [INFO] Shutting down: Master
2021-11-12T00:01:40.316 app[93ec062c] iad [info] web | [2021-11-12 00:01:40 +0000] [522] [INFO] Reason: Worker failed to boot.
2021-11-12T00:01:40.333 app[93ec062c] iad [info] web | exit status 3
2021-11-12T00:01:41.316 app[93ec062c] iad [info] Main child exited normally with code: 0
Other Notable Log messages:
2021-11-11T23:45:49.521 app[6b4475c4] iad [info] web | [2021-11-11 23:45:49 +0000] [522] [INFO] Shutting down: Master
2021-11-11T23:45:49.536 app[6b4475c4] iad [info] web | exit status 3
2021-11-11T23:45:50.413 app[6b4475c4] iad [info] Main child exited normally with code: 0
Occasionally I’d get:
2021-11-11T23:14:48.962 app[bbb22f87] iad [info] Starting init (commit: 7943db6)...
2021-11-11T23:14:49.279 app[bbb22f87] iad [info] web | [2021-11-11 23:14:49 +0000] [522] [INFO] Starting gunicorn 20.1.0
2021-11-11T23:14:49.280 app[bbb22f87] iad [info] web | [2021-11-11 23:14:49 +0000] [522] [INFO] Listening at: http://0.0.0.0:8080 (522)
2021-11-11T23:14:49.280 app[bbb22f87] iad [info] web | [2021-11-11 23:14:49 +0000] [522] [INFO] Using worker: sync
2021-11-11T23:14:49.282 app[bbb22f87] iad [info] web | [2021-11-11 23:14:49 +0000] [524] [INFO] Booting worker with pid: 524
2021-11-11T23:14:49.498 app[bbb22f87] iad [info] web | Opened database successfully
2021-11-11T23:14:51.594 app[bbb22f87] iad [info] web | Wrote file to disk: emerging-all.rules.zip
2021-11-11T23:14:51.598 app[bbb22f87] iad [info] web | 58e1869379487e537363719773a603ab
2021-11-11T23:14:51.695 app[bbb22f87] iad [info] web | Extracted file: emerging-all.rules.zip
2021-11-11T23:14:51.695 app[bbb22f87] iad [info] web | NOTICE: Starting to build the Database
2021-11-11T23:14:51.982 app[bbb22f87] iad [info] web | NOTICE: Finished building the database.
2021-11-11T23:14:51.982 app[bbb22f87] iad [info] web | * Serving Flask app 'build_db' (lazy loading)
2021-11-11T23:14:51.982 app[bbb22f87] iad [info] web | * Environment: production
2021-11-11T23:14:51.982 app[bbb22f87] iad [info] web | WARNING: This is a development server. Do not use it in a production deployment.
2021-11-11T23:14:51.983 app[bbb22f87] iad [info] web | Use a production WSGI server instead.
2021-11-11T23:14:51.983 app[bbb22f87] iad [info] web | * Debug mode: off
2021-11-11T23:14:51.986 app[bbb22f87] iad [info] web | [2021-11-11 23:14:51 +0000] [524] [ERROR] Exception in worker process
2021-11-11T23:14:51.986 app[bbb22f87] iad [info] web | Traceback (most recent call last):
2021-11-11T23:14:51.986 app[bbb22f87] iad [info] web | File "/usr/local/lib/python3.8/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
2021-11-11T23:14:51.986 app[bbb22f87] iad [info] web | worker.init_process()
2021-11-11T23:14:51.986 app[bbb22f87] iad [info] web | File "/usr/local/lib/python3.8/site-packages/gunicorn/workers/base.py", line 134, in init_process
2021-11-11T23:14:51.986 app[bbb22f87] iad [info] web | self.load_wsgi()
2021-11-11T23:14:51.986 app[bbb22f87] iad [info] web | File "/usr/local/lib/python3.8/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
2021-11-11T23:14:51.986 app[bbb22f87] iad [info] web | self.wsgi = self.app.wsgi()
2021-11-11T23:14:51.986 app[bbb22f87] iad [info] web | File "/usr/local/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi
2021-11-11T23:14:51.986 app[bbb22f87] iad [info] web | self.callable = self.load()
2021-11-11T23:14:51.986 app[bbb22f87] iad [info] web | File "/usr/local/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
2021-11-11T23:14:51.986 app[bbb22f87] iad [info] web | return self.load_wsgiapp()
2021-11-11T23:14:51.986 app[bbb22f87] iad [info] web | File "/usr/local/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
2021-11-11T23:14:51.986 app[bbb22f87] iad [info] web | return util.import_app(self.app_uri)
2021-11-11T23:14:51.986 app[bbb22f87] iad [info] web | File "/usr/local/lib/python3.8/site-packages/gunicorn/util.py", line 412, in import_app
2021-11-11T23:14:51.986 app[bbb22f87] iad [info] web | app = app(*args, **kwargs)
2021-11-11T23:14:52.023 app[bbb22f87] iad [info] web | [2021-11-11 23:14:52 +0000] [522] [INFO] Shutting down: Master
2021-11-11T23:14:52.023 app[bbb22f87] iad [info] web | [2021-11-11 23:14:52 +0000] [522] [INFO] Reason: Worker failed to boot.
2021-11-11T23:14:52.037 app[bbb22f87] iad [info] web | exit status 3
And sometimes:
2021-11-11T22:59:32.689 runner[c7bfd32b] iad [info] Starting instance
2021-11-11T22:59:32.723 runner[c7bfd32b] iad [info] Configuring virtual machine
2021-11-11T22:59:32.724 runner[c7bfd32b] iad [info] Pulling container image
2021-11-11T22:59:32.914 runner[c7bfd32b] iad [info] Unpacking image
2021-11-11T22:59:32.921 runner[c7bfd32b] iad [info] Preparing kernel init
2021-11-11T22:59:33.305 runner[c7bfd32b] iad [info] Configuring firecracker
2021-11-11T22:59:33.366 runner[c7bfd32b] iad [info] Starting virtual machine
2021-11-11T22:59:33.513 app[c7bfd32b] iad [info] Starting init (commit: 7943db6)...
2021-11-11T22:59:33.527 app[c7bfd32b] iad [info] Preparing to run: `/usr/bin/hivemind /app/Procfile` as root
2021-11-11T22:59:33.541 app[c7bfd32b] iad [info] 2021/11/11 22:59:33 listening on [fdaa:0:381f:a7b:21e0:c7bf:d32b:2]:22 (DNS: [fdaa::3]:53)
2021-11-11T22:59:33.544 app[c7bfd32b] iad [info] web | Running...
2021-11-11T22:59:33.833 app[c7bfd32b] iad [info] web | [2021-11-11 22:59:33 +0000] [522] [INFO] Starting gunicorn 20.1.0
2021-11-11T22:59:33.834 app[c7bfd32b] iad [info] web | [2021-11-11 22:59:33 +0000] [522] [INFO] Listening at: http://0.0.0.0:8080 (522)
2021-11-11T22:59:33.834 app[c7bfd32b] iad [info] web | [2021-11-11 22:59:33 +0000] [522] [INFO] Using worker: sync
2021-11-11T22:59:33.836 app[c7bfd32b] iad [info] web | [2021-11-11 22:59:33 +0000] [524] [INFO] Booting worker with pid: 524
2021-11-11T22:59:34.054 app[c7bfd32b] iad [info] web | Opened database successfully
2021-11-11T22:59:34.056 app[c7bfd32b] iad [info] web | Table created successfully
2021-11-11T22:59:35.117 app[c7bfd32b] iad [info] web | Wrote file to disk: emerging-all.rules.zip
2021-11-11T22:59:35.121 app[c7bfd32b] iad [info] web | 58e1869379487e537363719773a603ab
2021-11-11T22:59:35.136 app[c7bfd32b] iad [info] web | 58e1869379487e537363719773a603ab
2021-11-11T22:59:35.136 app[c7bfd32b] iad [info] web | It's a Match!
2021-11-11T22:59:35.137 app[c7bfd32b] iad [info] web | File Name Modified Size
2021-11-11T22:59:35.137 app[c7bfd32b] iad [info] web | emerging-all.rules 2021-11-10 19:01:08 18588774
2021-11-11T22:59:35.220 app[c7bfd32b] iad [info] web | Extracted file: emerging-all.rules.zip
2021-11-11T22:59:35.220 app[c7bfd32b] iad [info] web | NOTICE: Starting to build the Database
2021-11-11T22:59:35.497 app[c7bfd32b] iad [info] web | NOTICE: Finished building the database.
2021-11-11T22:59:35.497 app[c7bfd32b] iad [info] web | * Serving Flask app 'build_db' (lazy loading)
2021-11-11T22:59:35.497 app[c7bfd32b] iad [info] web | * Environment: production
2021-11-11T22:59:35.497 app[c7bfd32b] iad [info] web | WARNING: This is a development server. Do not use it in a production deployment.
2021-11-11T22:59:35.497 app[c7bfd32b] iad [info] web | Use a production WSGI server instead.
2021-11-11T22:59:35.497 app[c7bfd32b] iad [info] web | * Debug mode: off
2021-11-11T22:59:35.500 app[c7bfd32b] iad [info] web | [2021-11-11 22:59:35 +0000] [524] [ERROR] Exception in worker process
2021-11-11T22:59:35.500 app[c7bfd32b] iad [info] web | Traceback (most recent call last):
2021-11-11T22:59:35.500 app[c7bfd32b] iad [info] web | File "/usr/local/lib/python3.8/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
2021-11-11T22:59:35.500 app[c7bfd32b] iad [info] web | worker.init_process()
2021-11-11T22:59:35.500 app[c7bfd32b] iad [info] web | File "/usr/local/lib/python3.8/site-packages/gunicorn/workers/base.py", line 134, in init_process
2021-11-11T22:59:35.500 app[c7bfd32b] iad [info] web | self.load_wsgi()
2021-11-11T22:59:35.500 app[c7bfd32b] iad [info] web | File "/usr/local/lib/python3.8/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
2021-11-11T22:59:35.500 app[c7bfd32b] iad [info] web | self.wsgi = self.app.wsgi()
2021-11-11T22:59:35.500 app[c7bfd32b] iad [info] web | File "/usr/local/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi
2021-11-11T22:59:35.500 app[c7bfd32b] iad [info] web | self.callable = self.load()
2021-11-11T22:59:35.500 app[c7bfd32b] iad [info] web | File "/usr/local/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
2021-11-11T22:59:35.500 app[c7bfd32b] iad [info] web | return self.load_wsgiapp()
2021-11-11T22:59:35.500 app[c7bfd32b] iad [info] web | File "/usr/local/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
2021-11-11T22:59:35.500 app[c7bfd32b] iad [info] web | return util.import_app(self.app_uri)
2021-11-11T22:59:35.500 app[c7bfd32b] iad [info] web | File "/usr/local/lib/python3.8/site-packages/gunicorn/util.py", line 412, in import_app
2021-11-11T22:59:35.500 app[c7bfd32b] iad [info] web | app = app(*args, **kwargs)
2021-11-11T22:59:35.500 app[c7bfd32b] iad [info] web | File "/app/build_db.py", line 182, in start_app
2021-11-11T22:59:35.500 app[c7bfd32b] iad [info] web | app.run(port=8080)
2021-11-11T22:59:35.500 app[c7bfd32b] iad [info] web | File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 920, in run
2021-11-11T22:59:35.500 app[c7bfd32b] iad [info] web | run_simple(t.cast(str, host), port, self, **options)
2021-11-11T22:59:35.500 app[c7bfd32b] iad [info] web | File "/usr/local/lib/python3.8/site-packages/werkzeug/serving.py", line 1010, in run_simple
2021-11-11T22:59:35.500 app[c7bfd32b] iad [info] web | inner()
2021-11-11T22:59:35.500 app[c7bfd32b] iad [info] web | File "/usr/local/lib/python3.8/site-packages/werkzeug/serving.py", line 950, in inner
2021-11-11T22:59:35.500 app[c7bfd32b] iad [info] web | srv = make_server(
2021-11-11T22:59:35.500 app[c7bfd32b] iad [info] web | File "/usr/local/lib/python3.8/site-packages/werkzeug/serving.py", line 782, in make_server
2021-11-11T22:59:35.500 app[c7bfd32b] iad [info] web | return ThreadedWSGIServer(
2021-11-11T22:59:35.500 app[c7bfd32b] iad [info] web | File "/usr/local/lib/python3.8/site-packages/werkzeug/serving.py", line 688, in __init__
2021-11-11T22:59:35.500 app[c7bfd32b] iad [info] web | super().__init__(server_address, handler) # type: ignore
2021-11-11T22:59:35.500 app[c7bfd32b] iad [info] web | File "/usr/local/lib/python3.8/socketserver.py", line 452, in __init__
2021-11-11T22:59:35.500 app[c7bfd32b] iad [info] web | self.server_bind()
2021-11-11T22:59:35.500 app[c7bfd32b] iad [info] web | File "/usr/local/lib/python3.8/http/server.py", line 138, in server_bind
2021-11-11T22:59:35.500 app[c7bfd32b] iad [info] web | socketserver.TCPServer.server_bind(self)
2021-11-11T22:59:35.500 app[c7bfd32b] iad [info] web | File "/usr/local/lib/python3.8/socketserver.py", line 466, in server_bind
2021-11-11T22:59:35.500 app[c7bfd32b] iad [info] web | self.socket.bind(self.server_address)
2021-11-11T22:59:35.500 app[c7bfd32b] iad [info] web | OSError: [Errno 98] Address already in use
2021-11-11T22:59:35.501 app[c7bfd32b] iad [info] web | [2021-11-11 22:59:35 +0000] [524] [INFO] Worker exiting (pid: 524)
2021-11-11T22:59:35.540 app[c7bfd32b] iad [info] web | [2021-11-11 22:59:35 +0000] [522] [INFO] Shutting down: Master
2021-11-11T22:59:35.541 app[c7bfd32b] iad [info] web | [2021-11-11 22:59:35 +0000] [522] [INFO] Reason: Worker failed to boot.
2021-11-11T22:59:35.554 app[c7bfd32b] iad [info] web | exit status 3
2021-11-11T22:59:36.535 app[c7bfd32b] iad [info] Main child exited normally with code: 0
2021-11-11T22:59:36.535 app[c7bfd32b] iad [info] Starting clean up.
If anyone could steer me in the right direction I’d like to learn more about the process and what happens behind the scenes so I can troubleshoot better. Thanks in advance.