how to open port 8080 for listening when firewall is not running
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
how to open port 8080 for listening when firewall is not running
We have an internal cluster that runs on Centos. We do not turn on iptables purposefully. I am developing some web application which needs to talk to localhost through port 8080. However telnet 127.0.0.1:8080 could not connect. Is there a way to open port 8080 for listening without messing with the firewall?
We do not intend to turn on firewall. So commands like this is not an option:
iptables -A INPUT -m state --state NEW -p tcp --dport 8080 -j ACCEPT
I tried to run some simply jersey application which needs to talk to http://localhost:8080
localhost:8080 is not a destination, it's a path. There has to be something on the other side of that path for your jersey application to connect to. When you open the connection, your jersey application is not talking to localhost:8080, it's talking to some other application through localhost:8080.
So, what application is it supposed to connect to? telnetd? sshd? apache? some custom program?
Last edited by suicidaleggroll; 09-19-2014 at 01:52 PM.
is telnetd running ?; you should probably try running sshd instead.
^ what happens when you uncomment it (changing it to 8080) and restart the ssh server ?
What leads you to believe it's sshd that he wants to connect to? I haven't seen him mention any server application that he wants to connect to yet, apart maybe from telnetd since that's the client he's trying to use.
Last edited by suicidaleggroll; 09-19-2014 at 01:53 PM.
localhost:8080 is not a destination, it's a path. There has to be something on the other side of that path for your jersey application to connect to. When you open the connection, your jersey application is not talking to localhost:8080, it's talking to some other application through localhost:8080.
So, what application is it supposed to connect to? telnetd? sshd? apache? some custom program?
Sorry, I did not understand the question. It is connecting to a grizzly container. https://grizzly.java.net/
Running this simple example did not have any error. Only when I tried to communicate with the resource using "curl http://localhost:8080/myapp/myresource", it complained "couldn't connect to host".
You'll need to start up grizzly at some point. The documentation you posted has this little nugget buried in it
Quote:
Now that we have verified that the project compiles and that the unit test passes, we can execute the application in a standalone mode. To do this, run the following maven command:
mvn exec:java
The application starts and you should soon see the following notification in your console:
May 26, 2013 8:08:45 PM org.glassfish.grizzly.http.server.NetworkListener start
INFO: Started listener bound to [localhost:8080]
May 26, 2013 8:08:45 PM org.glassfish.grizzly.http.server.HttpServer start
INFO: [HttpServer] Started.
Jersey app started with WADL available at http://localhost:8080/myapp/application.wadl
Hit enter to stop it...
This informs you that the application has been started and it's WADL descriptor is available at http://localhost:8080/myapp/application.wadl URL. You can retrieve the WADL content by executing a curl http://localhost:8080/myapp/application.wadl command in your console or by typing the WADL URL into your favorite browser.
See the part in bold. Those messages indicate that grizzly has been started and is listening on port 8080.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.