socket.gaierror: [Errno 8] nodename nor servname provided, or not known : Dash App

Viewed 1545

I am attempting to deploy a Dash + Flask App.

app.py contents:

if __name__ == "__main__":
    app.run(host='domain.test', port=3000, debug=True)

I run into this error:

 * Serving Flask app "app" (lazy loading)
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: on
Traceback (most recent call last):
  File "host_app.py", line 12, in <module>
    app.run(host='domain.tests', port=3000, debug=True)
  File "/opt/anaconda3/lib/python3.7/site-packages/flask/app.py", line 990, in run
    run_simple(host, port, self, **options)
  File "/opt/anaconda3/lib/python3.7/site-packages/werkzeug/serving.py", line 1030, in run_simple
    s.bind(server_address)
socket.gaierror: [Errno 8] nodename nor servname provided, or not known
1 Answers

I would add this line to your /etc/hosts file:

127.0.0.1   domain.test
Related