Question

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

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

Subscribe
Share

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