I'm working on a school project, about web apps with servlets, running on tomcat etc. This morning, without an apparent reason i try to start tomcat from C:\jakarta-tomcat-3.3.2\bin "startup" but the cmd opens up for a millisecond showing
Unable to determine the location of Tomcat and closes again.
I had set it up and it was working fine up until now!! I have tried to restore the system to a previous point, but it only got worse, the paths were gone and messed up. I googled the cmd message, but shockingly it did not spawned any relevant responses.
Any ideas?
Try using service tomcat6 start
Read more here: https://access.redhat.com/site/documentation/en-US/JBoss_Enterprise_Web_Server/2/html/Installation_Guide/start_stop_tomcat-ZIP.html
Set CATALINA_HOME and CATALINA_BASE as system variables and point them at your Tomcat directory.
Related
I was having issues installing and running tomcat today and had to do a lot of research to get it running. I'm putting my solution here in case anyone runs into the same problem.
When I opened the url localhost:8080 in my browser, I would get a "refused to connect" error. I checked if the port 8080 was being used by another service, and it was not.
I then noticed that tomcat wasn't starting. I tried opening it through services but that didn't work either. Later services showed tomcat stuck in the "starting" status. I then tried to run tomcat through the command prompt with these commands.
cd: c:/filepathToTomcat/bin
bin>startup`
That gave me this error
jre_home variable undefined and java_home variable undefined
Using the solution to
https://stackoverflow.com/questions/18468681/tomcat-6-java-home
I created a setenv.bat file in the tomcat bin and set the java_home variable.
My setenv.bat file contained
#ECHO OFF
set "JAVA_HOME=C:\Program Files\Java\jdk-19"
set "JRE_HOME="
Tomcat still wouldn't run. A solution on
https://stackoverflow.com/questions/5398654/tomcat-not-starting
suggested using "catalina.bat run" on the command prompt instead of startup.
This showed that tomcat wouldn't start because it couldn't get the java virtual machine to run. I then uninstalled and reinstalled java and tomcat started working for me.
I used Java version 19 and tomcat 10.1.5 on a windows 11.
so I've manually installed tomcat version 9.0.10 and the newest java JDK.
I've correctly added the manager-gui and admin-gui users. i have went into the server.xml files and found that all the ports were correct.. (connecting to default port 8080) I had to do []# unset CATALINA_HOME or else it wouldn't let me start tomcat so I did and it started but when I went to the browser and typed in the localhost:8080 it didn't show, it only says firefox could not establish connection with server localhost:8080 so I went into logs to see if there were any errors and sure enough there was an error like so: /usr/local/tomcat/apache-tomcat-9.0.10/bin/catalina.sh: line 464: /usr/bin/Java/jdk-10.0.2/bin/bin/java does not exist.. and its probably right why would there be /bin/bin/ like that in a directory.. so i went into the catalina.sh file copied what it had inside into a blank file in documents and went to line 464 (txt editor numbered the lines for me) and what i found was this line at 464: eval $_NOHUP "\"$_RUNJAVA" "\"$LOGGING_CONFIG\"" $LOGGING_MANAGER $JAVA_OPTS %CATALINA_OPTS\
but I have no idea what to do about it.. i think i might have a path problem or could be a port problem but I don't think so... I've installed apache and it works great in the browser with localhost.. could that affect the tomcat access maybe?
anyway, id really appreciate any help I can get.. I'm very new to this by the way. I'm sorry, I couldn't copy and paste from my virtual machine so I had to type it. im on centos 7.
I think you are looking for tomcat deployment page where you can manage your artifact. If that is correct
First thing you need to check is that whether your installation contains tomcat manager application.
You can verify this by looking in to this path ("apache-tomcat-9.0.10\webapps\manager") If this path is absent you may have to reinstall your tomcat.
Try downloading the zip from the below path and start the server.
If you are trying to deploy your custom application you may have to provide the context path for accessing you application. Also you can verify the deployment by looking in to the above path. For eg: if you are trying to deploy test.war then a folder named test will appear in the webapp folder.
Hope this helps.
Can anyone please explain the below problem.
I'm using tomcat 8 and when I'm trying to start startup.bat file, the command prompt is opening and closing immediately just like blinking. However in the past while I'm working with java programs it worked fine but recently I installed Xampp and there in it again tomcat is downloaded "C:\xampp\tomcat". The same problem comes here in this folder as well, when I try to run startup.bat file. But when I use "XAMPP control panel" to start the Tomcat its able to get start and I'm getting "localhost:8080" start page in the browser.
The connector port for both tomcats are 8080 and I tried with changing the port number in tomcat 8 but no use. There should not be 2 tomcat servers in a single system? If not, why? (I've not installed them, both are in C drive)
I want to work with java servlet programs now.So I need use of tomcat. I've set below environment user varibles:
JAVA_HOME to C:\Program Files\Java\jdk1.8.0_65;
path to C:\Program Files\Java\jdk1.8.0_65\bin;C:\apache-maven-3.3.9\bin
Please suggest the solutions.
Thanks in advance.
I think you should check the tomcat log to find some clues, it is in log folder of your tomcat installation folder. Maybe you have missed some startup variable in start.bat for your new installed things.
BTW, if you want to keep seeing what happened in startup, try to run startup.bat in a command line console, but not double click it through your mouse. It will continue on generating log output in that console.
I am running python file to start HTTP server in WebSphere but suddenly its searching java in some wrong location Then I stopped server and trying to start by startNode.sh shell script but its not starting server and giving same error its searching java in /opt/IBM/WebSphere/AppServer/java/bin/java.
previously it was fine even I set the java class-path in bash_profile.
When I try to run the file ./startNode.sh or ./startManager.sh its giving error.
ERROR CODE:
/opt/IBM/WebSphere/AppServer/bin/startNode.sh: line 151: /opt/IBM/WebSphere/AppServer/java/bin/java: No such file or directory.
How can I specify the path so web-sphere server can take it correctly.
Thanks in advance.
The paths in WebSphere are managed by the managesdk command.
The startNode.sh script not working seems to indicate the install was modified by either moving the JDK or changing a script to point elsewhere.
I am currently having a problem starting Glassfish inside Eclipse on OS X. It just hangs whilst trying to start the domain.
I think the problem may lie with the permissions of Glassfish - When I use the 'start-domain domain1' command even in terminal, I must use 'sudo' otherwise I get a 'permissions denied' error. If I use 'sudo', then the server starts successfully from terminal.
I think this error may be carrying over into Eclipse - that is, the server is trying to start but is timing out because Eclipse is not starting the server with the correct permissions etc.
Is there any way to start the server via Eclipse by giving it root permissions? Or another solution, is there any way to change the Glassfish permissions so that it can be started without the 'sudo' command?
Thanks.
You should have installed the glassfish directory in your home folder (it's usually /home/user/ on linux - I haven't used OS X, but I think it's the same). Re-install glassfish and make sure you place it in your home path (it's the recommended path anyway). Then reconfigure eclipse with the path of the new install.
--
Hope it helps