Τη Δευτέρα, 20 Αυγούστου 2018 - 7:59:06 π.μ. UTC+3, ο χρήστης dieter έγραψε:
> Νίκος <nikos.at.superh...@gmail.com> writes:
> > 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.
> 
> "connection refused" is an indication that there is no (running)
> server at the connection port.
> 
> Unlike simple web servers, more complex web frameworks are often not
> started automatically at system startup (as they require complex
> configuration to be meaningfully usable). Likely, this your
> case: you likely need to explicitely start the server component.
> 
> > 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)
> 
> Likely, the code above is supposed to start the server component.
> Ensure, that the start is successful (I typically use "lsof -i"
> to find out whether a server is listening on the expected port).

Iam trying to access the bottle web framework running on my VPS as

http://superhost.gr:8080/hello

i get connection refused

also when i try to view the active socekets with ss tool receive

[root@superhost ~]# ss | grep 8080

nothign as a response

The same stand also if i try to use flask instead of bottle with port 5000

The weird thing is that in my vps command line my hello app is in state of 
listening

[root@superhost public_html]# python3 app.py 
Bottle v0.12.13 server starting up (using WSGIRefServer())...
Listening on http://localhost:8080/
Hit Ctrl-C to quit.

So, i wonder why the socket with port 8080 aint being displayed.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to