L
L
LS Timer2019-11-12 15:37:14
Java
LS Timer, 2019-11-12 15:37:14

How to open a port or reach an application on a linux server?

I run the JAR file on the server


java -jar myproject-1.12.jar

Successful start, port 8080

2019-11-12 15:16:17.032 INFO 1392 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
2019-11-12 15:16:17.099 INFO 1392 --- [ main] kz.nurzhan.Application : Started Application in 42.988 seconds (JVM running for 50.987)

command netstat -ntlp | grep LISTEN
shows the following
spoiler

tcp______0_____0_____0.0.0.0:22________0.0.0.0:*_________LISTEN_____1098/sshd
tcp______0_____0_____0.0.0.0:5432______0.0.0.0:*_________LISTEN____1188/postgres
tcp6_____0_____0_____:::8080____________:::*______________LISTEN____1392/java
tcp6_____0_____0_____:::22_______________:::*______________LISTEN____1098/sshd
tcp6_____0_____0_____:::5432____________:::*______________LISTEN____1188/postgres

port 8080 is not telnet-th not pinged
ports on the server were not closed
what could be the reason for closed access?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitaly Karasik, 2019-11-12
@vitaly_il1

Your application only listens on IPV6, you need to tell it somewhere in the tomcat settings to listen on the "old" IPV4.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question