Port scan timeout reached, no open ports detected. Bind your service to at least one port. If you don't need to receive traffic on any port, create a background worker instead

While deploying my flask application on render, I get this error:

==> No open ports detected, continuing to scan…

Jul 16 09:46:57 PM==> Docs on specifying a port: Web Services – Render Docs

Jul 16 09:46:58 PM==> Port scan timeout reached, no open ports detected. Bind your service to at least one port. If you don’t need to receive traffic on any port, create a background worker instead.

Jul 16 09:46:58 PM==> Docs on specifying a port: Web Services – Render Docs

Jul 16 09:54:30 PM==> Timed out: Port scan timeout reached, no open ports detected. Bind your service to at least one port. If you don’t need to receive traffic on any port, create a background worker instead.

if __name__ == "__main__":
    app.run(debug=True)

Hoping for a solution from community…

Hi there,

The best place to start for assistance is the docs linked to in those logs: https://render.com/docs/web-services#port-binding

After ensuring your app is configured to those recommendations, are you still having issues?

Regards,
Mike


Render Support Engineer, MT (UTC-6, UTC-7 in Winter)

Heya,

After incorporating changes to my flask application and setting PORT as Env Variable, I do still get the same error (ss attached below for reference). My application has to perform web scraping, so can be the issue here, because it has to timeout to collect data and then reload with data?

So, its like the first time I deploy the website from via Git clone, the logs show that no open port detected, but the site does get loaded, but when I use it for web scraping, it just spins for data extraction and then the sever gets down, until I restart it manually. So, that’s the main issue. The logs don’t match with the working and the server struggles to keep itself alive.

Hoping for help… would provide any further clarification if needed…

image

Hi there,

In order for us to take a closer look into the service you will need to reach out to us via the Help link in the dashboard. Be sure to specify the service name or id so we know which service you are referring to.

Regards,
Mike


Render Support Engineer, MT (UTC-6, UTC-7 in Winter)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.