Report this

What is the reason for this report?

Unable to connect to flask api on droplet. 'Failed to open page'

Posted on November 10, 2020

I’m following this tutorial and I’m having trouble accessing the api I’ve placed on a Digital Ocean droplet.

The api has the host defined in main as:

api.add_resource(SearchForPage, '/search/')


if __name__ == '__main__':
     app.run(host='0.0.0.0')

And, when running on the droplet runs fine.

If I attempt to call the api endpoint it simply times out and there appear to be no incoming connections to the api. However, there are incoming calls to the droplet. I can see this from the droplet’s bandwidth increasing at the same time that I’m making calls to it.

I’m continuing to look into this. Any help is appreciated.

https://i.stack.imgur.com/aGt38.png https://i.stack.imgur.com/URjCS.png



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.