Q:

Cannot connect to jetty 9

Why can I not successfully connect to jetty?
I have the latest version of jetty 9.x running.  I have the jetty_base folder setup and when I drop war files into the folder I see them get expanded into the /tmp folder.
lsof -i :8080 
java    26488 jetty   85u  IPv6 400595      0t0  TCPlocalhost.localdomain:webcache (LISTEN)

curl 'http://localhost:8080' curl: (7) Failed connect to
  localhost:8080; Connection refused
curl http://127.0.0.1:8080 curl: (7) Failed connect to 127.0.0.1:8080;
  Connection refused

A:

From the below output of lsof -i:8080

java    26488 jetty   85u  IPv6 400595      0t0 
  TCPlocalhost.localdomain:webcache (LISTEN)

It seems jetty is using ipv6 rather ipv4. 
For ipv6, use ::1 as your loopback address. For ipv4, it is 127.0.0.1.
Changes you can make for localhost to work :
If you wish to set localhost to work for both ipv6 and ipv4 you can make below changes to /etc/hosts file.
127.0.0.1       localhost
# ... and below
::1             localhost ipv6-localhost ipv6-loopback

As always, you can test the connectivity using ping6 ::1 for an ipv6 ip and ping 127.0.0.1 for ipv4.
Give a try!

