I created an application on Eclipse, locally on my PC. Once it was working I created a war file and deployed it to my Linux server. Now the problem is that the application is still running on my local Tomcat. I am not sure why this is happening.
Is there any place I can look to find the cause of this issue?
I created this application in JSP/servlet.
Your query looks invalid , application can keep on running on your local PC and server both , its about which one you access i.e. which url you use in browser.
To stop the application from running on your pc there are a lot of thing you can do to stop it.
If you are running windows and tomcat is installed as a service then you can stop the Apache Tomcat service by opening services.msc
You can also uninstall tomcat using $CATALINA_HOME/uninstall.exe
You can also access the tomcat's manager application and un-deploy your application. To do this go to http://localhost:port/manager/html. Enter the credentials you used during installation to log in. Find the application from the list there and stop it.
You might check the running java vm by jvisualvm on your OS(with GUI). Or check the current running processes both in PC and linux server.
If you have not stopped the application running locally it will continue to run till you stop the tomcat server. Application can be packaged into a war file while tomcat is running.
If you have started the tomcat with in eclipse, use "Server" view in eclipse to stop the tomcat. If you have started tomcat via command line, you can use shutdown.sh or shutdown.cmd to stop the tomcat.
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.
When I unzip the wildfly-10.1.0.Final.zip file on my computer at home. Then WildFly starts running automatically. I had verified this through going to localhost:8080. Because of this I can't run my Java EE project on Netbeans (I have added WildFly as server in Netbeans). In the logs I see:
Address localhost: 8080 is already in use
I also can't shutdown WildFly through the following command:
$ ./jboss-cli.sh --connect command=:shutdown
However I can shutdown WildFly by killing his process. But this still doesn't fixed my issue on Netbeans. Because I still get to see: Address localhost: 8080 is already in use.
At my work when I had unzipped the wildfly-10.1.0.Final.zip file. It didn't start automatically I also had no problems with running my project on WildFly. And I also can shutdown WildFly through the command line or Netbeans.
Anyone that maybe knows how I can fix my WildFly server problem on my computer at home?
Which version of NetBeans are you using ? Until 8.2 WildFly 10 isn't correctly identified.
You may try NetBeans 8.2 RC1 from https://netbeans.org/community/releases/82/ or a nightly build as this would fix your issue.
NetBeans checks if there the instance is already running before trying to start it, so you don't have to start it beforehand but you can :)
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.
my problem
i have a windows server 2003. I develop a java server. I want to run this java server on my windows server 2003. I downloaded apache tomcat 7 and i unzip it. then i start it from the bin folder. i put the war file of my server on the workapp folder of tomcat and finally my java server is working perfectly on my windows server 2003.
the problem is when i log of from my account on the windows server 2003, the apache tomcat stops and there is nothing wrong with this since i log off and all the process will stop.
i want to keep my java server running even when i log off (note that i log off not shut down the server) i searched the internet and i found that i have to install the apache service on my windows server 2003. i go and download the httpd-2.0.65-win32-x86-openssl-0.9.8y.msi file from the official apache website. i installed it. however i didn't find the apache service on my services.
Note that can be help
I already have IIS installed on my windows server 2003
any help will be appreciatted.
It's because you have to install an enable-it :
Go to your bin dir of your apache installation folder with the windows console
Install the service by executing this command in the console : httpd.exe -k install -n "Apache".
Then, start the service : httpd.exe -k start -n "Apache"
The service will start and auto-start :
The process is started under the LocalSystem account, so it will keep running if you logoff.
If you want more information : Using Apache on Microsoft Windows
I found the answer mysefl.
it is because the same port is running on IIS.
just change the listen second on the configuration file to another port and it will work.
If you want to run Java web application in war format (running on servlet container), then you should install Apache Tomcat (not httpd Apache!) as service. You can download latest tomcat from here.
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.