My server.xml is configured to use Apache in connection to Tomcat. If I start Tomcat with startup.sh, it works fine because I can access a simple html-file located in webapps/ROOT at port 80 and 443.
Netstat -tulpn shows that a java process occupies the 8005 and 8009 ports.
Then I run shutdown.sh, and the netstat shows the ports are no longer occupied.
I try to start Tomcat from Eclipse. The console says it is started within 10000ms. The ports 8005 and 8009 are occupied by a javaprocess, but in Eclipse I get timeout, and the state of the server is 'Starting'.
I try to start a html-script that calls the restful web service, but I get 503 Service unavailable. I've stuggled with this the whole day. I do not understand what to do with this. Please help !
I have just solved this problem. It was due to my java version 8 was not supported by Tomcat version 8.5. I had to install tomcat version 9. Then I got another problem when I added tomcat to Eclipse. That was Unknown version of Tomcat. I eventually solved that problem too by setting my user as the owner of the apache-tomcat-directory.
Related
Situation: I installed JRE 8, and configured Tomcat 8.5 on my Eclipse Neon.3 Release (4.6.3).
Problem : I added a project and the server console shows server start-up in 41935 ms. But the background process keeps showing "Starting...." This is shown in the ScreenShot below.
Later, the server stops because it times out. Please help me resolve this.
I don't know how this worked, but merely restarting the PC and cleaning Eclipse's Tomcat server solved this issue.
Also, if at any point of time there is a Security alert asking permission to allow Java to access Public or Private networks, check all the boxes.
This can happen if already an instance of Tomcat server is running on the port(default is 8080). Kindly run below command in command prompt
netstat -ano
to list down the list of process and the port they acquire that are running currently and see if there a process running on the Port that your tomcat server is trying to acquire.
If yes, kill it and run the server again
had the same problem with Tomcat 7 (Liferay server), seems to be a compatibility bug in eclipse, I had to change to a lower version of eclipse.
I am using Jetty 8 and trying to connect from Eclipse(Remote Debugging). I am using Java 1.6. I have the latest code in eclipse. The port is not blocked in firewall.
Jetty is running on port 8080. I opened the debug port on 5999 using the below command
java -Xdebug -agentlib:jdwp=transport=dt_socket,address=5999,server=y,suspend=n -jar start.jar.
I opened the application in browser(https://[servername]:8080) and logged in to the application.
Later I connected in eclipse(Run-->Debug configurations and gave hostname and port(5999)), breakpoint is not hit when I browse through the application in browser. But I could able to see the Threads in the eclipse, only the code is not hit in eclipse
I have a spring application on my local PC. And a VPS, run centos OS and has installed tomcat. My application could run well in localhost, but after I put it on the server(/tomcat/webapps) through ftp. It doesn't work any more and the tomcat will stop service when start that application. So what's the right steps to run application on tomcat on a linux server, and how can I check what's wrong with the application(like the debug log on local Eclipse)? Thx!
Can you check Tomcat's server logs, (located in <~tomcat-installation-directory>/logs? You may find the possible cause for your server's crash. If you server and application is up and running, then you may do remote debugging using Eclipse.
At the window platform I have run tomcat from eclipse juno. But at linux I face this problem
When I run web project from eclipse I got this error message, while from command line I can able to run tomcat.
Error Message is - Port 80 required by Tomcat v7.0 Server at localhost
is already in use. The server may already be running in another
process, or a system process may be using the port. To start this
server you will need to stop the other process or change the port
number(s).
I already check my port using nmap and other command
The main point is that when I run tomcat from command line then it start, but when I start this from eclipse I got this error
First, check again whether the port is indeed in use. I believe that you have apache web server (httpd) that is taking the port.
Second, on linux only processes running under root user can use lower ports (under 100). Probably when you run tomcat from command line you run it as root (e.g. using sudo), however when you are running it from eclipse it is running under your user.
The solution is:
for development use other port. E.g 8080.
For production:
use special user account (not root) to run tomcat. E.g. user named tomcat. Configure it to listen to port 8080. Run apache web server (httpd) under root user configured to listen to port 8080 and configured to be connected to tomcat using mod_jk. This is most secure and reliable commonly used configuration.
After starting Tomcat from the command line you also stopped it? Because if Tomcat is still running from the command line you get this error while trying to start it again out of eclipse.
Is it right that you run your Tomcat on Port 80? This wont work in an Linux environment, because Linux comes up with an Apache Webserver listening on Port 80.
I believe linux comes with a apache server, which may be running on port 80. So when you try to run the tomcat on the same port, it is complaining port already in use. To find out if apache is installed you can use the rpm command. I believe it is rpm -qa will tell you all packages installed. Now as far as the directory for apache files it is normally
/var/www/htdocs.
I am using Eclipse Galileo and I have the BEA WebLogic Server v.10 installed.
The problem that I am facing is that the server cannot be stopped anymore(running in debug mode).
For example it shows the progress bar of stopping until 93% and after that it gives the message "The server cannot be stopped within timeout."; I can only restart eclipse in order to start again the server.
In the console I see the message:
"C:/bea1001/jrockit_150_11/bin/java -classpath C:/bea1001/wlserver_10.0/server/lib/weblogic.jar weblogic.Admin -url t3://localhost:80 -username weblogic -password 12345678 FORCESHUTDOWN AdminServer
Server "AdminServer" was force shutdown successfully ..." -
But it seems that something is blocking to stop the server.
Can anyone tell me what I can do?
p.s. I tried to delete and create a new server in the eclipse but I still have the same problem
Thanks and regards,
Luisa
I have found the problem: I changed the port of the BEA WebLogic to be 80 and this port was used also by Skype.
I changed the port of the Skype and now the server stops
Luisa
I've had the same problem and another solution may be to start Eclipse with java command (in my case Weblogic was running as java.exe, but Eclipse as javaw.exe). Also check if the same version of JDK is used for running both Weblogic and Eclipse.