Connection refused when tryign to run bottle/flask web framweworks

Νίκος nikos.at.superhost at gmail.com
Tue Aug 21 03:11:48 EDT 2018


Τη Δευτέρα, 20 Αυγούστου 2018 - 7:18:16 μ.μ. UTC+3, ο χρήστης Chris Warrick έγραψε:
> On Mon, 20 Aug 2018 at 18:15, Νίκος <nikos.at.superhost at gmail.com> wrote:
> >
> > Τη Δευτέρα, 20 Αυγούστου 2018 - 9:49:00 π.μ. UTC+3, ο χρήστης Miki Tebeka έγραψε:
> > > If you're trying to access the machine from another machine, you need to change the host to '0.0.0.0'. 'localhost' is the internal interface.
> > >
> > > On Sunday, August 19, 2018 at 10:36:25 PM UTC+3, Νίκος wrote:
> > > > Hello,
> > > >
> > > > i just installed bottle and flask web frameworks in my CentOS environment but i canno get it working even with the simpleste xample. The coonection is refused always.
> > > >
> > > > from bottle import route, run, template
> > > >
> > > > @route('/hello/<name>')
> > > > def index(name):
> > > >     return template('<b>Hello {{name}}</b>!', name=name)
> > > >
> > > > run(host='localhost', port=8080)
> > > >
> > > >
> > > > Any ideas as to why i cannot access it?
> > > > I dont have sme firewall blocking the ports 8080 or 5000.
> > > >
> > > > Thank you.
> >
> > 0.0.0.0 is used when you want your app to lsiten to all available interfaces. Even with that still i cannot access the hello app.
> 
> You should avoid exposing the built-in web server to the Internet.

> Either way, are you sure you don’t have any firewall set up on the
> server?

Yes, as far as i know i dont have any firewal installed, i use webmin/virtulamin and i have uninstalled firewalld.
How can i check if some other firewall like iptables or somethign else is blocking the connection?






More information about the Python-list mailing list