tomcat7 redhat could not start up - java

I hava installed on RedHatEnterpriseLinux java1.7 and apache tomcat 7, starting tomcat on port 8080 and checking through
netstat -nap | grep 8080
and getting
tcp 0 0 :::8080 :::* LISTEN 29178/java
but when i try to open tomcat home page from browser, browser is loading and loading and nothing appears. and when I try to stop tomcat server, I am getting
java.net.ConnectionException: Connection Refused error.
How can it be solved?

The Tomcat server may have bound to port 8080, but was unable to complete startup for some reason, and so not is not servicing requests yet. Check the tomcat logs for errors, and make sure that the server has started successfully. Successful startup of tomcat is usually indicated by the log statement "Server startup in XXXX ms" in catalina.out.

The problem could be in iptables. Try to open port 8080:
# lokkit --port=8080:tcp

Related

Change of port number not workingin sprintboot

I changed default port number from 8080 to 8082 in application.properties file using server.port=8082. Even after changing port number, if I try to run sprint boot app, server is taking default port 8080 and application is not starting.
Error message;
Description:
Web server failed to start. Port 8080 was already in use.
Action:
Identify and stop the process that's listening on port 8080 or configure this application to listen on another port.
i solved it like this
Solution
Enter 'server.port='8080' (changed port number) in the following 'application.properties' file where you can create a project.
After connecting to the terminal
Type 'sudo lsof -i :[port number you want to check]' to see which ports are running.
Delete server.port and run it again.

Tomcat Server Just Hangs - log4j Warn

So no idea why but tomcat7 seems to be just hanging. When I enter in localhost or my own ip that it's running on, it just sits there loading. And when doing 'startup' cmd in the tomcat directory, I get some random JSSE java error but then a log4J warning saying please initialize the log4j system properly.
Not sure why a WARN would prevent it from starting. I still see that tomcat service is listening on 443 and java is listening on 80.
Thanks.

Tomcat 7 server says it's listening on debug port but doesn't accept any connections

I'm working with a Tomcat 7 server running on Ubuntu. I've configured the etc/default/tomcat7 file to accept remote debugging requests through the instruction in this thread: Setting up JPDA for Tomcat7 in ubuntu-server
When the server restarts, in the catalina log file, it says that it's listening on port 8000, but I can't connect to it.
INFO: Destroying ProtocolHandler ["http-bio-8080"]
Listening for transport dt_socket at address: 8000
I've tried connecting to it through Window's Telnet tool as well as through the Eclipse debugger but the connection is always rejected. I also had all 4 of my teammates try connecting to it as well, to rule out issues with my own firewall, but they were unsuccessful as well.
These are the settings for my Eclipse debugger:
And the error message in Eclipse:
Any ideas?
After a little more digging, it turns out that AWS was blocking the port.
For anyone reading this, you can check to see if the port is being blocked through: yougetsingal's port forward checking tool.

Linux open a new port for my application on HTTPS

I have deployed a new HTTPS application in a linux box. HTTPS port configured is 9443.
Then with the below command, I opened the port 9443:
firewall-cmd --zone=public --add-port=9443/tcp --permanent
Then after starting the application, when I run netstat, I got the below message:
[root#xxxx init.d]# netstat -lpn | grep 9443
tcp 0 0 0.0.0.0:9443 0.0.0.0:* LISTEN 12789/java
Does this mean the port is opened?
I am unable to access my application from browser. Its complaining that "This site can’t be reached".
Any idea?

java remote debugging Tomcat app: Why does the JVM not listen?

I want to remote debug an application running in Tomcat 7. Tomcat is running as a service on a Win2008 server.
I added the following to the Java options in the Java Configuration Panel of Tomcat:
-Xdebug -Xrunjdwp:transport=dt_socket,address=4711,server=y,suspend=n and opened the firewall on my workstation and the server for this port.
But when I try debugging from IntelliJ 9 on my workstation, I get an error message Unable to open debugger port : java.net.ConnectException "Connection timed out: connect". The jvm is the standatd Sun/Oracle 64 bit JVM version 1.6.0_27.
I verified that the command line parameters are in use by accessing ManagementFactory.getRuntimeMXBean().getInputArguments() within the application deployed to Tomcat and logging the result to the log file.
I verified via Wireshark on my workstation and on the server that the TCP request on port 4711 is sent from my pc and arriving on the server, but there is is no answer. Running netstat -a on the server does not show a process listening on this port. So I assume somehow Tomcat/JVM does not start the remote debugging.
You need to put -Xdebug and -Xrunjdwp... on separate lines in the Java panel of the Tomcat Service Configuration Panel.
So having:
-Xdebug -Xrunjdwp:transport=dt_socket,address=4711,server=y,suspend=n
will not work, but:
-Xdebug
-Xrunjdwp:transport=dt_socket,address=4711,server=y,suspend=n
will.

Categories

Resources