Search code examples
clojurejettyembedded-jettycompojurering

How to make jetty server (ring.adapter.jetty) accessible from external hosts


I'm trying to run a web server using the following invocation

(run-jetty #'handler {:host "hostname" :port 8080})

This starts a server which I can access from the same host, but not externally. I am doing this on an EC2 instance and I use the internal IP of that machine as the "hostname", port 8080 is open for external access. I also tried using "0.0.0.0" as the hostname, but that resulted in the same behavior.

I'm using a slightly outdated version of ring-jetty-adapter (0.2.5) but I can't change that.

Any help is greatly appreciated!


Solution

  • Thanks for your replies guys, it turns out that it was not a problem with jetty, I was running this on EC2, and had been applying port access permissions to a different security group than the one this particular instance belonged to :)