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.
Related
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.
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.
I am after a all round installation and introduction to Glassfish.
(ie Your boss has told you need to develop your web applications for glassfish instead of tomcat)
Installing
Installing Glassfish onto your own PC for testing.
Download the installer file off the glassfish website
Move the installer jar to the location you wish the files to be installed. Once
installed, the install folder can not be moved. If you are not sure where to place it on OS/X or Linux, drop the installer jar into /usr/local/, this will result in your appserver being installed as /usr/local/glassfish
Run the installer with extra memory java -Xmx256m -jar glassfish-installer-xxx.jar
Run the configuration script: cd glassfish; lib/ant/bin/ant -f setup.xml
Starting the app server
To start glassfish with the default configuration type bin/asadmin start-domain domain1. This will result in the following URL's becoming available:
Admin website http://localhost:4848/
Application site http://localhost:8080/
The default administrator username and password are:
Username: admin
Password: adminadmin
IDE support
Eclipse support
The easiest way to get Glassfish working under Eclipse 3.5 is to use this software Update url (https://ajax.dev.java.net/eclipse) inside Eclipse.
Caveats and warnings
For those used to storing application settings and configuration in a context.xml file, glassfish does not support this.
Moving on from here
The following links are also very useful:
Guide to JMS in glassfish
Guide to JMS in glassfish in Netbeans