The contents of the error report are as follows:
File "xxx.py", line 4, in <module>
app.run(host='0.0.0.0' , port=80 , debug=true,threaded=False)
File "/home/xxx/.local/lib/python3.6/site-packages/flask/app.py", line 922, in run
run_simple(t.cast(str, host), port, self, **options)
File "/home/xxx/.local/lib/python3.6/site-packages/werkzeug/serving.py", line 982, in run_simple
s.bind(server_address)
PermissionError: [Errno 13] Permission denied
Looking up the relevant information on the Internet, I found that some people said that under the UNIX environment, ports smaller than 1024 can not be bound by ordinary users, and can only be bound by users with root authority, but using sudo command does not work, so it is necessary to bind a port larger than 1024, and the problem is finally solved
Set port to 8080
Read More:
- [Solved] Zabbix-server startup error: cannot start alert manager service: Cannot bind socket to “/var/run/zabbix/zabbix_server_alerter.sock”: [13] Permission denied.
- socket java.net.BindException: bind failed: EACCES (Permission denied)
- [Solved] error when starting dev server:Error: listen EACCES: permission denied 0.0.0.0:80 at Server.set
- [Solved] Vscode Connect to the remote server error: permission denied (public key)
- [Solved] Docker startup container error: permission denied””: unknown.
- flask init-db Error: Error: Could not locate a Flask application. Use the ‘flask –app’ option, ‘FLASK_APP’ environment variable, or a ‘wsgi.py’ or ‘app.py’ file in the current directory.
- [Solved] Docker+uWSGI+Flask Error: ModuleNotFoundError: No module named ‘flask‘
- [Solved] Redis startup error Creating Server TCP listening socket 127.0.0.1:6379: bind: No error
- Port occupancy error address already in use: bind [Solved]
- FTP 500 Illegal PORT command. ftp: bind: Address already in use [How to Solve]
- [Solved] Docker Error: bad interpreter: Permission denied
- [Solved] failed (13: Permission denied) while reading upstream
- [Solved] Gerrit Error: Permission denied publickey
- How to Solve Vue Error: EACCES: permission denied
- Run-time error “70“:Permission denied [How to Solve]
- How to Solve Error: cannot open .Git/fetch_HEAD: Permission denied
- [Solved] Docker Error: got permission denied while trying to connect to the docker daemon socket at…
- (node:2233) UnhandledPromiseRejectionWarning: Error: EACCES: permission denied, mkdir ‘/usr/loca~‘
- ./get_datasets.sh Error: permission denied [How to Solve]
- [Solved] Redis Error: Creating Server TCP listening socket *:6379: bind: No error