I am developing an application using dash and want to host it using Gunicorn on linux platform.
The following is how I have deployed it.
my dash application, file name:
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> #server = flask.Flask(__name__) ---> Tried this approach also app = dash.Dash(server=server) server = app.server <app.layout> <Call backs> ## at the end if __name__ == '__main__': app.run_server()
Created an index.py for Gunicorn
from MyPoC.analyzer import server as application application
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 index:application -b <public IP>:8000
[2021-04-16 16:57:58 +0200]  [INFO] Starting gunicorn 20.0.4 [2021-04-16 16:57:58 +0200]  [INFO] Listening at: http://<public IP>:8000 (8334) [2021-04-16 16:57:58 +0200]  [INFO] Using worker: sync [2021-04-16 16:57:58 +0200]  [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
The port 8000 is in listen mode
[user1@~]$ netstat -an | grep -i 8000 tcp 0 0 <public IP>:8000 0.0.0.0:* LISTEN [user1@~]$
I have also tried calling
server from dash application directly through gunicorn.
$ gunicorn analyzer:server -b <public IP>:8000 but still my dashboard doesn’t open.
Could you please tell me where I am going wrong. Kindly forgive me if I have made any fundamental mistake. I would really appreciate if you could guide me and show a path towards resolution.
Thanks and Regards