I can run the app in development but getting an error when I try to deploy. No errors message in the log but the deployment status asked me to post it here.
error: The deployment failed to initialize due to a configuration or code error. Check the logs tab for more information. For additional support, please post on https://ask.replit.com/c/help/13 and a staff member will take a look. - 2023-10-07T19:56:56.794Z
Repl link/Link to where the bug appears:
Screenshots, links, or other helpful context:
Log Error: hostingpid1: an open port was not detected
I am having same issue and its been happening for days, deployment issues should please be resolved
Also, tried adding the port 5000 or 8080 directly to the .replit file. Doesn’t work for either.
Could you answer the following:
- Does their Repl work in the workspace (as stated in the interface)
- Is their app using the same run command that it is in the workspace
You can also take a look at our Deployments guide here: https://docs.replit.com/hosting/deployments/faq for any additional help.
- Yes, it works in development workspace.
- The command in the
.replit file is
run = "python3 main.py", so I believe yes.
Console shows the following:
* Serving Flask app 'main'
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
* Running on all addresses (0.0.0.0)
* Running on http://127.0.0.1:5000
* Running on http://172.31.196.19:5000
This has been posted for more than a week. No help?
You’ll need to expose to port 80, which is the only open port. Once you do that, it should be OK. Please let us know if you have any further questions.
How do you expose port 80?
Looks like it’s working now! To address the earlier comments, it is not necessary to listen only on port 80 – any port will do, as long as the listening address is 0.0.0.0.
the issue has been resolved
Hey @GRANDS-ROISROIS. It’s great to hear that you’ve fixed your problem, but please provide an explanation to how you did, so that other people who have the same problem know the solution.