title: Jetty web server refusing connections on linux
body: <p>I am in the process of developing a java web application, and am using the web framework Spark which utilizes Jetty (An http server written in java created by eclipse). Spark makes use of Jetty's embedded webserver functionality, essentially creating a Jetty instance within the app. When creating an executable jar of my application and running on windows, all is well and I can connect to my app locally through <a href="http://localhost:81" rel="nofollow">http://localhost:81</a> (I am using port 81). Eventually, I'd like the app to run on a linux server, but upon executing the jar on ubuntu, I am unable to connect to the app locally. I only have a moderate understanding of linux, and cannot figure out why this is happening. I am executing the command 'java -jar G2.jar &amp;' in screen, and it seems to be executing properly. I have ensured that the JDK on ubuntu matches the version installed on my windows machine. I have been testing on an AWS ec2 ubuntu instance and an ubuntu vm, and have had no luck on either. </p>
  
  <p>wget: </p>
  
  <pre><code>wget 127.0.0.1:81
  --2016-10-24 21:10:24--  http://127.0.0.1:81/
  Connecting to 127.0.0.1:81... failed: Connection refused.
  </code></pre>
  
  <p>curl:</p>
  
  <pre><code>curl 127.0.0.1:81
  curl: (7) Failed to connect to 127.0.0.1 port 81: Connection refused
  </code></pre>
  
  <p>I have flushed iptables, and even disabled ufw with no luck. Both the ec2 instance and vm are fresh ubuntu installs. I am beginning to think the problem is within Jetty, and that it possibly requires different configuration on linux? The issue is, Spark handles the embedded Jetty instance, and I am unfamiliar with how it does so. Has anybody dealt with this type of issue before?</p>