With Hudson, running java -jar hudson-3.0.0-bundled.war -httpPort=8000 worked. I've tried the same with Jenkins, but it still runs on port 8080:
$ java -jar jenkins.war -httpPort=8000
Running from: /home/user/jenkins/jenkins.war
webroot: $user.home/.jenkins
Sep 25, 2013 12:22:14 PM winstone.Logger logInternal
INFO: Beginning extraction from war file
Jenkins home directory: /home/user/.jenkins found at: $user.home/.jenkins
Sep 25, 2013 12:22:15 PM winstone.Logger logInternal
INFO: HTTP Listener started: port=8080
There is a '-' missing in your command line.
From jenkins wiki: "--httpPort=$HTTP_PORT"
So use java -jar jenkins.war --httpPort=8000 instead of java -jar jenkins.war -httpPort=8000
Checking my jenkins init file I think you need --httpPort=$JENKINS_PORT. Have you tried with two dashes before httpPort?
Whether port 8000 is a sensible choice is a whole other question!
.I'm using Newrelic for java agent.I install the newrelic.yml file using the command "java -jar newrelic.jar install" in my prompt. When running, it shows the message as INSTALL SUCCESSFUL and some other information. I also find the newrelic.yml setup in running the run.bat file.But i'm not able to see the newrelic API in my browser when running the port as "localhost:8080/newrelic" . I'm started my server in the port 8080.
The log folder in newrelic diectory.My newrelic_agent.log containing the following lines...,
Feb 8, 2012 05:49:07 PM NewRelic INFO: Writing to New Relic log file: D:\work\software\jboss-6.0.0.Final\newrelic\logs\newrelic_agent.log
Feb 8, 2012 05:49:09 PM NewRelic INFO: Configured to connect to New Relic at collector.newrelic.com:80
Feb 8, 2012 05:49:09 PM NewRelic INFO: Setting protocol to "http"
Feb 8, 2012 05:49:09 PM NewRelic INFO: Configuration file is D:\work\software\jboss-6.0.0.Final\newrelic\.\newrelic.yml
Feb 8, 2012 05:49:09 PM NewRelic WARN: The apdex_t setting is obsolete and is ignored! Set the apdex_t value for an application in New Relic UI
Feb 8, 2012 05:49:09 PM NewRelic INFO: New Relic Agent v2.3.0 has started
Feb 8, 2012 05:49:09 PM NewRelic INFO: Java version: 1.6.0_12
Feb 8, 2012 05:49:30 PM NewRelic INFO: JVM is shutting down
Feb 8, 2012 05:49:30 PM NewRelic INFO: New Relic Agent has shutdown
I'm sure not yet started the newrelic API in my browser.It shows an error as "HTTP 404 the request resource /k12/newrelic is not available.I'm using j.d.k 1.6
Help me please..?
The New Relic Ruby agent has a Developer Mode that lives at the /newrelic path you're trying to reach, but the Java agent does not. Developer Mode would give you a detailed trace of each individual web request your app makes that's similar to what the normal New Relic product does with Transaction Traces.
To use New Relic and report performance data, it looks like you've got everything configured correctly. You should be able to log in to https://rpm.newrelic.com and see what your app is doing.
You mentioned "the newrelic API", but I'm not sure what you are looking for exactly. There is an API for the Java agent that lets you configure the agent. There's also a New Relic HTTP REST API that will let you retrieve data reported by your applications.
suddenly for some reason tomcat server is not runnin/starting/stopping.
below is the result I get when i run the startup command,
C:\Program Files\jasperserver-3.5.0\apache-tomcat\bin>startup
Using CATALINA_BASE: C:\Program Files\jasperserver-3.5.0\apache-tomcat
Using CATALINA_HOME: C:\Program Files\jasperserver-3.5.0\apache-tomcat
Using CATALINA_TMPDIR: C:\Program Files\jasperserver-3.5.0\apache-tomcat\temp
Using JRE_HOME: C:\PROGRA~1\JASPER~1.0\java\jre
The tomcat window pops up for a split of a second and goes away.
(I have another java instance installed under c:\program files)
Help!!!
Update:
Logs from catalina file
Mar 22, 2011 3:41:50 AM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Mar 22, 2011 3:41:50 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1017 ms
Mar 22, 2011 3:41:51 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Mar 22, 2011 3:41:51 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.20
Mar 22, 2011 3:41:51 AM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Mar 22, 2011 3:42:06 AM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Mar 22, 2011 3:42:06 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Mar 22, 2011 3:42:06 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/43 config=null
Mar 22, 2011 3:42:06 AM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Mar 22, 2011 3:42:06 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 15374 ms
Use catalina.bat run instead of startup.bat. Then the window won't go away and you can see what's going on
In my case that was a problem with final slash in %CATALINA_HOME% path: final slash should not be there!
C:\tomcat\8.0.30 - correct
C:\tomcat\8.0.30\ - wrong
See http://blackandwhitecomputer.blogspot.de/2015/09/tomcat-debug-cannot-startup.html
Honestly, I had not expected modern applications may be depended on final slash in environment variable path!
I ran into a similar problem. I open cmd prompt and cd to tomcat\bin\startup.bat. The issue was my JRE_HOME not defined in the environment variables. I added and it worked.
I had the same problem and I solved it this way:
First, following #ykaganovich suggestions, I tried to start the server using the catalina.bat start command; it did not solve the problem, but at least it showed a log that specified the error, which was really helpful.
In my case, the log said that the problem was because of the java versiĆ³n. I had the JAVA_HOME variable pointing to the JDK7, but my tomcat version needed it to point to the JDK8.
I changed the JAVA_HOME variable to point to JDK8 (instead of JDK7) and then , when I executed the catalina.bat start command again, it worked perfectly and the server started. I hope my suggestion could be helpful to someone.
Hmm it's very strange problem because in the log you have that server started, so try this:
restart computer :) - the best solution for strange situations
change tomcat port
close every unnecessary applications: skype, ip phones etc (I've encountered similar problem someday and application ip phone "softly" blocked this port ("softly" - in tomcat log everything was OK but in reality webapp doesn't work)
Add tomcat in your eclipse and start it from there. Configure tomcat as 'Use Tomcat installation'. It will work
Had same problem with apache Tomcat 9 version.
Solution very simple.
Apache Tomcat 9 is supported by Java 8 and later versions.
So, i had JRE_HOME with JRE7 path, I binded it to new JRE8 and everything works fine.
Different versions of Apache Tomcat are available for different versions of the Servlet and JSP specifications. The mapping between the specifications and the respective Apache Tomcat versions is:
Hope this will work for you guys, cheers!
If Tomcat was earlier working fine and Tomcat not starting happens unexpectedly, it's because some other process has started using the port you were using Tomcat on. In my case, I had shutdown Tomcat and was trying to run my servlet directly from Eclipse. So Eclipse took control of the port. After I closed Eclipse and tried restarting Tomcat (with startup.bat), everything worked fine.
ykaganovich's answer helped me track down my issue.
Non of the solutions above worked for me.
I found my way out by removing my current tomcat and replace it with a new one and setting up again my workspace.
I hope this may help someone
Open up the Tomcat users file (tomcat-users.xml)and check that you've closed all your speech marks. That is what fixed it for me.
Now double-check the role names:
<tomcat-users>
<role rolename="admin" />
<role rolename="manager" />
<user username="admin" password="secret" roles="admin,manager" />
</tomcat-users>
Finally, execute startup.bat file from bin
Try to open Tomcat7w.exe or follow the below steps.
(I have installed Tomcat under folder C:\Program Files\Apache Software Foundation\Tomcat 7.0)
open command prompt as Administrator
run --> "C:\Program Files\Apache Software Foundation\Tomcat 7.0\bin\Tomcat7w.exe" //MS//
now you can see icon in the system tray
double click on icon and start/stop
I'm embarrassed to have to ask this, but I can't for the life of me figure out what I'm doing wrong.
I've downloaded the appengine-java-sdk-1.4.2 via the eclipse 3.6 plugin as per the instructions on Installing the Java SDK page. I am running Mac OSX 10.5.8 with JRE version 1.5.0_26. I have made the dev_appserver.sh file executable (chmod u+x dev_appserver.sh) and when I attempt to start the app server with one of the demos via the command
bin/dev_appserver.sh demos/guestbook/war/
I get the following output, but the server does not start up:
2011-03-13 17:52:43.404 java[839:80f] [Java CocoaComponent compatibility mode]: Enabled
2011-03-13 17:52:43.405 java[839:80f] [Java CocoaComponent compatibility mode]: Setting timeout for SWT to 0.100000
********************************************************
Warning: Future versions of the Dev App Server will require Java 1.6 or later. Please upgrade your JRE.
********************************************************
Mar 13, 2011 9:52:44 PM com.google.apphosting.utils.jetty.JettyLogger info
INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
Mar 13, 2011 9:52:44 PM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
INFO: Successfully processed /Applications/eclipse_3.6/plugins/com.google.appengine.eclipse.sdkbundle.1.4.2_1.4.2.v201102111811/appengine-java-sdk-1.4.2/demos/guestbook/war/WEB-INF/appengine-web.xml
Mar 13, 2011 9:52:44 PM com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
INFO: Successfully processed /Applications/eclipse_3.6/plugins/com.google.appengine.eclipse.sdkbundle.1.4.2_1.4.2.v201102111811/appengine-java-sdk-1.4.2/demos/guestbook/war/WEB-INF/web.xml
I see the warning about upgrading the JRE, but I don't think this is the problem, as there are no exceptions reported. It just won't start up. I've tried creating a hello world app from within Eclipse using the plugin and running as Web server, but that also spits out the same text but does not start up the web server.
Any idea what I'm doing wrong and how to remedy the problem?
By changing the line in dev_appserver.sh to
/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Commands/java -ea -cp "$JAR_FILE" \
com.google.appengine.tools.KickStart \
com.google.appengine.tools.development.DevAppServerMain $*
instead of using the default java (which is set to 1.5.0_26 as I mentioned earlier) the web server starts up.
I had the same problem and simply tried running Eclipse as Administrator and then debugging worked fine.
I just got prompted for a Java update on my iMac machine. After the java update, my App Engine based Web Application (in Eclipse) won't start anymore.
The following was in the console (as usual) when I tried to debug it as Web Application:
<terminated exit value:139> myapp [Web Application] /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java (Mar 13,2011 7:20:27 pm)
2011-03-13 19:20:28.193 java[1772:903] [Java CocoaComponent compatibility mode]: Enabled
2011-03-13 19:20:28.194 java[1772:903] [Java CocoaComponent compatibility mode]: Setting timeout for SWT to 0.100000
Mar 14, 2011 2:20:29 AM com.google.apphosting.utils.jetty.JettyLogger info
INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
Mar 14, 2011 2:20:29 AM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
INFO: Successfully processed /Users/tom/Workspace/myapp/war/WEB-INF/appengine-web.xml
Mar 14, 2011 2:20:29 AM com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
INFO: Successfully processed /Users/tom/Workspace/myapp/war/WEB-INF/web.xml
Mar 13, 2011 7:20:30 PM com.google.appengine.tools.development.DevAppServerImpl start
INFO: The server is running at http://localhost:8081/
And then the app just stops. The termination value seem to be 139. Why does this happen and how can I fix it?
Deleting the Java cache folder (~/Library/Caches/Java) (as posted in tom's link to the groups discussion) - although temporarily successful - did't solve the problem.
After re-installing the previous Java version, the eclipse GAE environment worked without any problems.