I have problem running python bottle server on linux. I installed the python and bottle on my linux box. I ran a simple testPort.py program.
It started successfully:
$ sudo python ~/bottle-0.11.6/bottle-0.11.6/test/testPort.py
Bottle v0.11.6 server starting up (using WSGIRefServer())...
Listening on http://onpoint.stanford.edu:1008/
Hit Ctrl-C to quit.
But when I used google chrome to access it: http://onpoint.stanford.edu:1008
I got the message the webpage is not available.
Can anyone help me on this?
I checked the server, there is no activities.
Here is my linux version:
webmc@onpoint:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 13.04
Release: 13.04
Codename: raring
I used the following command to check if the port is open. It seems it did open:
webmc@onpoint:~$ sudo netstat --tcp --udp --listening --program
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 localhost:6010 *:* LISTEN 59035/10
tcp 0 0 localhost:5914 *:* LISTEN 46633/Xvnc
tcp 0 0 localhost:6011 *:* LISTEN 53146/1
tcp 0 0 *:46843 *:* LISTEN 46694/smpd
tcp 0 0 localhost:5915 *:* LISTEN 47007/Xvnc
tcp 0 0 localhost:6012 *:* LISTEN 45889/7
tcp 0 0 localhost:5916 *:* LISTEN 52254/Xvnc
tcp 0 0 *:36349 *:* LISTEN 54825/mpiexec
tcp 0 0 localhost:6013 *:* LISTEN 46157/9
tcp 0 0 *:3389 *:* LISTEN 40078/xrdp
tcp 0 0 localhost:5917 *:* LISTEN 61999/Xvnc
tcp 0 0 *:microsoft-ds *:* LISTEN 1401/smbd
tcp 0 0 localhost:5918 *:* LISTEN 56300/Xvnc
tcp 0 0 localhost:5919 *:* LISTEN 36383/Xvnc
tcp 0 0 localhost:5920 *:* LISTEN 41164/Xvnc
tcp 0 0 *:39396 *:* LISTEN 54835/MATLAB
tcp 0 0 *:43333 *:* LISTEN 54830/MATLAB
tcp 0 0 *:51112 *:* LISTEN 54837/MATLAB
tcp 0 0 localhost:mysql *:* LISTEN 1974/mysqld
tcp 0 0 *:netbios-ssn *:* LISTEN 1401/smbd
tcp 0 0 *:60591 *:* LISTEN 54828/MATLAB
tcp 0 0 onpoint.Stanford.E:1008 *:* LISTEN 7064/python
Here is my testport.py:
from bottle import Bottle, run, template
app = Bottle()
@app.route('/hello')
def hello():
return "Hello World!"
run(app, host='onpoint.stanford.edu', port=1008)
debug=True
to see if there are any errors.