Unable to bring up flask in one of the file system shared server

Job ID: 32323930

Budget: ₹1,500 – ₹12,500 INR

have tried running flask app from a NAS shared file system on 2 different servers.
Server-1 had reboot so due to this the flask app was stopped automatically in server-1 and in server-2 flask app is up and running.

when we brough up flask app in server-1 getting failed with below "Address already in use" error even though in server-1 port(5000)
is not getting used by any other process.

Please suggest the solution and will be much appreciated.
it has something to do with the fact that this directory is "shared" by the 2 servers and they are writing to it at the same time.

ERROR:
File "flaskenv/lib64/python3.6/site-packages/werkzeug/serving.py", line 1030, in run_simples.bind(server_address)
OSError: [Errno 98] Address already in use
flaskenv/lib64/python3.6/site-packages/flask_sqlalchemy/__init__.py:873:
FSADeprecationWarning: SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and will be disabled by default in the future.
Set it to True or False to suppress this warning.'SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and'

Little more background. The directory that hosts this flask app is shared between 2 web servers on different servers. So I was wondering if flask was somehow creating a file that was causing the second webserver to not start as it sees that it is already “running” even though it is on a different server.
The 2 servers are started with their unique host names
source /autohome/www/cgi-bin/Common/flaskenv/bin/activate
cd /autohome/www/cgi-bin/Common
echo "Flask Env Variables has exported"
export FLASK_APP=Glcodes/main.py
export FLASK_DEBUG=True
flask run --host=$(hostname -s).xxx.com