I want to deploy a dash application on Gunicorn. But I am not able to do so. I see no errors appearing on the screen when I execute the gunicorn <module_name>:<variable_name>
Versions:
- gunicorn (20.0.4)
- dash (1.17.0)
- dash-core-components (1.13.0)
- dash-html-components (1.1.1)
- dash-renderer (1.8.3)
- dash-table (4.11.0)
my dash application, file name: analyzer.py
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output
import pandas as pd
import flask
<data_frame definitions>
app = dash.Dash()
server = app.server
<app.layout>
<Call backs>
## at the end
if __name__ == '__main__':
app.run_server()
When I use the below command, I see no errors on the screen, but yet I can’t reach the application from the browser.
[user1@myHost]$ gunicorn analyzer:server -b:8000
[2021-04-16 16:57:58 +0200] [8334] [INFO] Starting gunicorn 20.0.4
[2021-04-16 16:57:58 +0200] [8334] [INFO] Listening at: http://0.0.0.0:8000 (8334)
[2021-04-16 16:57:58 +0200] [8334] [INFO] Using worker: sync
[2021-04-16 16:57:58 +0200] [8345] [INFO] Booting worker with pid: 8345
I see that the port is listening, however, I am not able to open my dashboard on the server’s public IP and 0.0.0.0 The port 8000 is in listen mode
sudo lsof -i -P -n | grep LISTEN
gunicorn 13003 user1 5u IPv4 49878669 0t0 TCP *:8000 (LISTEN)
gunicorn 13015 user1 5u IPv4 49878669 0t0 TCP *:8000 (LISTEN)
Could you please tell me where I am going wrong?