I want Jetty to serve connections from any host on port 8080. My /etc/default/jetty
file has: -
NO_START=0
JETTY_HOST=
JETTY_PORT=8080
The server is an EC2 small instance based on a Lucid Lynx 32 bit server AMI. APT is configured with multiverse enabled, and the canonical partner repository enabled. Jetty is 6.1.22 from from the partner repository.
When I start jetty using sudo /etc/init.d jetty start
, it works, and listens to connections from localhost, but not to any others: -
ubuntu@ip-10-224-70-51:/etc/network/if-pre-up.d$ sudo netstat -nlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
413/sshd
tcp6 0 0 127.0.0.1:8080 :::* LISTEN
5655/jsvc
tcp6 0 0 :::22 :::* LISTEN
413/sshd
udp 0 0 0.0.0.0:68 0.0.0.0:*
260/dhclient3
Active UNIX domain sockets (only servers)
Proto RefCnt Flags Type State I-Node PID/Program name P
ath
unix 2 [ ACC ] STREAM LISTENING 1407 1/init @
/com/ubuntu/upstart
unix 2 [ ACC ] STREAM LISTENING 4021 407/dbus-daemon /
var/run/dbus/system_bus_socket
Any ideas on why my Jetty config doesn't seem to be listening to other hosts would be greatly appreciated!
Found it! You need: -
to listen to other hosts. So a minimal /etc/default/jetty file includes: -
For anyone that want's to use Jetty on Ubuntu with Sun's Java JDK, these are the things that need to be changed
/etc/default/jetty
file:That's all what is needed to run jetty on ubuntu. (I spent an hour and realised I was missing
JAVA_HOME
though I do have it defined in.bashrc
)