To install tomcat7 I have done:
a. downloaded apache-tomcat7 tar.gz file
b. extracted in /usr/share directory
c. starting tomcat using /usr/share/tomcat/bin/startup.sh
getting message:
Using CATALINA_BASE: /usr/share/tomcat7
Using CATALINA_HOME: /usr/share/tomcat7
Using CATALINA_TMPDIR: /usr/share/tomcat7/temp
Using JRE_HOME: /usr/lib/jvm/java-7-oracle
Using CLASSPATH: /usr/share/tomcat7/bin/bootstrap.jar:/usr/share/tomcat7/bin/tomcat-juli.jar
Tomcat started.
but when I am going through the URL : localhost:8080 it is saying unable to connect.
Can somebody help me out from this problem.
Thanks in advance
Please check if any other application is holding the port:8080.
Locally tomcat points to 8080 and if any other applicationis running on that port then Tomcat won't start. Tomcat 7 is not an issue here.
The main culprit on your machine may be Skype. check in the processes and kill it and try the url again. Use an open source tool called Diamond port to check which processes are running on 8080
Related
I have XAMPP installed on my Windows machine,
I am unable to stop the Tomcat server.
I have tried to kill the process with the Process Id as well,
But weirdly it's not showing in the Task Manager nor the local Services,
Which I referred from here -
apache service not stopping in xampp
Here's my XAMPP Control Panel screenshot -
Here's the Task Manager, I can't find the Process ID 3104 as shown in the XAMPP Control Panel-
I did run the command "Services.msc" to find and stop it but, no luck there either.
You should check the PID and verify that it is not associated with any other service/process mistaken for Tomcat by XAMPP.
In my case I had Jenkins running on port 8080 and starting XAMPP it was "guessing" that Tomcat was already running:
In reality, looking at the PID (198092 in my case) it was associated with java.exe:
and this was a process generated by my Jenkins server running on that port:
This is why you cannot stop Tomcat from there... (it is not Tomcat running on 8080).
To verify this and properly start Tomcat you can try this:
Stopping Jenkins:
Will remove the service running on 8080 and XAMPP is able to correctly detect that Tomcat is not running:
At this point you can Start Tomcat in XAMPP (and it should start for real this time):
Going to the localhost page, port 8080 you will have a proof of it:
If you want you can now successfully stop it from XAMPP:
On Windows:
XAMPP opens a shell(CMD) on starting tomcat just close that shell.
Our security team has scanned our production server and identified vulnerabilities with Apache Tomcat server v 6.0.20.
They have recommended that Apache be upgraded to 6.0.24. Reading through the forums, I believe this is the process to do so
Take a backup of httpd.conf file
Using add remove programs, uninstall version 6.0.20
Install 6.0.24
But, I have some questions depending on a quick test I did to install 6.0.20 and upgrade it to 6.0.24
Where do I get Tomcat administrator login information?
Is it enough just to backup the HTTPD.CONF file? I was thinking to back up everything in the Apache folder instead.
Is it possible not to upgrade 6.0.20 to 6.0.24 by running the MSI installer over the same Apache folder? Is it due to the HTTP/1.1 Connector Port being busy/used that doesn't allow an update of Tomcat on the same port?
Is a restart of the server required after upgrade?
Last but not the least, I am using these executables to test the upgrade. 6.0.20 gets installed fine but when I run 6.0.24, it prompts me for the JRE path and directing it to 6.0.20 JVM Path gives me a message that "JVM is not found". The JVM info on the Apache manager is in this directory
What am I missing here?
I need your thoughts and advice to make this as easy as possible since this is a production server.
I am a newbie on Liferay and furthermore 100% Windows infrastructure knowledge based. I installed Liferay 6.2 on my Windows 2012R2 server together with Java jdk-8u5 version. All is running perfect as long as I am logged in as user on the Server via remotedesktop having open the tomcat startup.bat window.
What have I to do exactly to start Liferay and/or tomcat as service?
Thanks in advance for your efforts.
Configuring liferay or tomcat to run as a service on a windows server doesn't differ that much.So in order to do that you have to add some files to the LIFERAY_HOME\tomcat\bin directory.
To get those files you have to download a full version of 64-bitWindows tomcat from here :
http://tomcat.apache.org/download-70.cgi.
Extract the zip and go to the bin directory, copy service.bat , tomcat7.exe and tomcat7w.exe to this location : LIFERAY_HOME\tomcat\bin
Setting Up the service
Open the commad prompt (Make sure you have admin rights or run the command prompt as administrator),In Command Prompt go to LIFERAY_HOME\tomcat\bin and Execute the following command
service.bat install tomcat7
This will install the tomcat6 service in windows.
Now execute following commond to setup additional configuration for the service
tomcat7w.exe ES tomcat7.exe
2 . Extra configuration :
-XX:MaxPermSize=512m
-Dfile.encoding=UTF8
-Duser.timezone=GMT
-Djava.security.auth.login.config="%CATALINA_HOME%/conf/jaas.config"
-Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false
and make sure to provide enough memory for your service by setting the initial memory pool and the maximum one.
Either go with Rafik Beldi's answer (quite an effort, wow) or just go to tomcat's documentation in case you're still missing some information
I had to delete what was in Java Options completely or it wouldn't start: and then I entered:
-XX:MaxPermSize=512m
-Dfile.encoding=UTF8
-Duser.timezone=America/New_York
-Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false
-Djava.net.preferIPv4Stack=true
note that where I am: America/New_York allows for both EST and EDT
I'm using:
Spring Tool Suite Version: 3.2.0.RELEASE
Tomcat v7.0.42
When I just run my tomcat server everything is fine but I'm unable to debug it even locally. It produces following error:
Startich Apache Tomcat v7.0.42 at localhost has encoutered a problem.
Server Apache Tomcat v7.0.42 bat localhost was unable to start within 45 seconds. If the server requires more time, try increasing the timeout in the server editor.
I've tried the following:
increase the timeout.
remove all the apps before starting the debugging.
install new instance of tomcat (the only configuration that I've did on fresh install is turning on Use Tomcat installation and Never publish automatically).
But it didn't help, I still can only run the tomcat, without the debug option. Does anyone know how to make this debugging work?
When I've used new, clear workspace for Spring Tool Suite, debugging started to work.
Cheers,
I am trying to deploy my spring application in a server machine which having the tomcat 6.0.29 server. But tomcat server getting stop automatically while extracting the war.
In Catalina Log I have the following:
Jan 27, 2012 3:02:44 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive application.war
In localhost.log
Jan 27, 2012 3:03:21 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
There is no any stacktrace.
I tried to restart the tomcat but server getting stop while extracting the war file. I tried by increasing the JVM memory to 1024MB. Still same problem.
I have deployed the same war in my another testing server and it is working fine.
Any help...
Are you seeing something like this "SEVERE: Error listenerStart"? or none in the logs.
If Tomcat fails there should be a thread dump and/or a heap dump in the startup directory.
Also check the ports available from OS/firewall to bind with.
Enabling debug logging might help. (Change the log levels to DEBUG instead of INFO in the log files below)
Enabling Tomcat debug log:
Refer to : How to set level logging to DEBUG in Tomcat 6?
Enabling Spring debug log:
You can enable spring debug logging mode (why its failing to deploy the webapp) by adding the logging.properties(name should match exactly) in your WEB-INF/classes directory
Refer to : SEVERE: Error listenerStart
How are you launching Tomcat? What OS is this? I have encountered this problem myself in the past when launching Tomcat on CentOS using a startup script. Usually had something to do with security settings of the files and/or of selinux preventing the writing/reading of certain filespaces on the disk.
Try running from the console using ./catalina.sh run and see if that works on the server (assuming it is a *nix server). If so, check ownership of all files and read/write permissions. Disable selinux (if currently enabled) momentarily to see if that makes any difference.
It's a bunch of trial and error when you don't have any further debug information available.
Last time I faced this problem it was due to the fact I was thinking that I am using h2database while the configurations were such that it was using mysql and of course there was no mysql server to connect to.
I was using a maven project in eclipse and none of my changes were taking effect until I did
Project Properties-> Maven-> Update Project and then in
Servers Tab right click on the server name and Publish.
Check the jdbc.properties file in the webapp (in my case it was somewhere inside /.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/ folder) not in source code to see what are the final parameters for database connection.