Problems with Jazztalk JUnit launch
Hello,
I am having trouble getting the JUnit launch to work with the JazzTalk example. The first test (com.ibm.team.repository.service.tests.TestDbRebuild > testRebuildAlll) works fine, but the second (com.ibm.team.repository.service.tests.TestDbInit > testRepositoryInited) fails. The console errors I am getting are as follows, followed by a number of more address already in use errors. Am I missing a step that I need to do before I run the junit test? Thanks, Jamie 12:48:42,109 ERROR com.ibm.team.server.embedded.jetty.auth.Activator - Failed to locate teamserver.properties 12:48:43,062 WARN org.mortbay.util.ThreadedServer - Failed to start: SocketListener0@0.0.0.0:9080 12:48:44,343 WARN org.mortbay.util.ThreadedServer - Failed to start: SslListener1@0.0.0.0:9443 org.mortbay.util.MultiException |
11 answers
jsamdal wrote:
Hello, The first test wants to lock the database, so it would fail if another program was connected to the database. The second test wants to lock the database *and* lock the network ports indicated (9080 and 9443). The fact that this test is failing suggests that there is another program using those ports - probably another instance of Jetty. This might happen if you were running another example that used a different database instance (like HiJazz or JazzBot) and left that instance of the Jazz server running. Look in the Console view and find the button with the dropdown menu that has the tooltip "Display Selected Console". You can use that dropdown to switch consoles. You may see multiple consoles there where some are labeled with a <terminated> prefix and others are not. The latter represent programs that are still running. You can use the "Terminate" button (big red square icon) to stop those programs from running. So basically I would poke around to figure out what's running (probably some instance of Jetty) and stop it and then try running the database creation test again. Chris |
Could this happen because I am using those ports for my copy of Jazz that I am developing with? It didn't look like there were any other instances of the server running. Do I need to point my launch directives to a jdbc location that has anything specific in it already (like a team.properties file?)
Thanks, Jamie |
jsamdal wrote:
Could this happen because I am using those ports for my copy of Jazz Yes it could. Actually this surprises me - I thought we used to use ports in the 8000 range (like 8080 and 8443) for Tomcat. It may have changed recently. I just started up the server for M3 at the path: /jazz/server/server.startup.bat and I see output like this in console window: INFO: Initializing Coyote HTTP/1.1 on http-9080 INFO: Initializing Coyote HTTP/1.1 on http-9443 and looking at teamserver.properties in the same folder as server.startup.bat, I see: com.ibm.team.repository.server.repourl.port.http = 9080 com.ibm.team.repository.server.repourl.port.https = 9443 So this would explain the problem you're having. I think you have several options: 1) Run the Jazz server that you are using for SCM, Build, Workitems, etc. on another machine. 2) Change the ports in teamserver.properties for the development Jazz server. 3) Change the ports for the test server in your launch configurations. You should be able to do this by adding arguments to the launches like: -Dcom.ibm.team.repository.server.repourl.port.http=8080 -Dcom.ibm.team.repository.server.repourl.port.https=8443 Hope this helps, Chris |
I still haven't been able to solve this issue. Does anyone have any other suggestions?
Thanks, Jamie |
jsamdal wrote:
I still haven't been able to solve this issue. Does anyone have any Hi Jamie, Did you see my last post on 10/28 and try the 3 suggestions in there? If you tried the third one, did you get errors indicating the new ports you picked are also being used? Chris |
I tried all three methods, and the results I saw seemed to indicate that it did not try new ports, but still used the 9080 and 9443 even though I specified different ports.
|
Let me clarify, as I realized I misspoke - I tried the second and third methods, and the results I saw seemed to indicate that it did not, in fact, use the new ports I specified.
I did not try the first method, as that is infeasible for me at the moment. - Jamie |
jsamdal wrote:
Let me clarify, as I realized I misspoke - I tried the second and Hi Jamie, I've investigated this some more and I see now I was wrong about the effects of using the option com.ibm.team.repository.server.repourl.port.http and the related https option. So sorry for the confusion and please disregard that advice. :-( Here is what I should have said for method (3): 3) Change the ports for the Jetty test server in your launch configurations. You should be able to do this by adding arguments to the launches like: -Djetty.http.port=8080 -Djetty.https.port=8443 Note that I got this by digging through the server code. The plugin com.ibm.team.server.embedded.jetty has an Activator class. If you look at that class you will see how these property names are defined and used to start Jetty. I tried setting these with one of my launch configurations and verified that the ports used by Jetty do indeed change as expected. About method (2), I think you might be able to change the ports for your development server by messing around with the port values in this file: /jazz/server/tomcat/conf/server.xml If you search for 9080 and 9443 in that file you will find where you would need to edit. However there may be some cleaner way to do this involving editing teamserver.properties that I'm not aware of. Can you try the revised method (3) and let us know if it works for you? Chris |
Thanks!
That helped me get past the port error I was having, at least. :) I am unfortunately hitting a new error. :( The error console says: 14:24:09,140 ERROR com.ibm.team.server.embedded.jetty.auth.Activator - Failed to locate teamserver.properties And the stack trace indicates that I can't access IRemoteTest Service remotely. I'm still guessing there is a set up step I'm missing - the launch path is: -Ddb.jdbc.location=${target_home}/../../server/jazztalk/repositoryDB Do I need to initialize that path in some way? Thanks, Jamie FYI Stack trace: com.ibm.team.repository.common.transport.TeamServiceException: return code 503 from HTTP request: Service 'com.ibm.team.repository.service.tests.remotetests.IRemoteTestService' is not accessible remotely. at com.ibm.team.repository.transport.client.RemoteTeamService.executeHttpMethod(RemoteTeamService.java:564) at com.ibm.team.repository.transport.client.RemoteTeamService.invokePost(RemoteTeamService.java:464) at com.ibm.team.repository.transport.client.RemoteTeamService.executeMethod(RemoteTeamService.java:412) at com.ibm.team.repository.transport.client.RemoteTeamService.invoke(RemoteTeamService.java:184) at com.ibm.team.repository.transport.client.ServiceInvocationHandler.invoke(ServiceInvocationHandler.java:43) at $Proxy121.run(Unknown Source) at com.ibm.team.repository.service.tests.remotetests.RemoteServiceTestCaseHelper.run(RemoteServiceTestCaseHelper.java:68) at com.ibm.team.repository.service.tests.remotetests.RemoteServiceTestCaseHelper.run(RemoteServiceTestCaseHelper.java:97) at com.ibm.team.repository.service.tests.AbstractRemoteServiceTestCase.run(AbstractRemoteServiceTestCase.java:92) at junit.framework.TestSuite.runTest(TestSuite.java:230) at junit.framework.TestSuite.run(TestSuite.java:225) at junit.framework.TestSuite.runTest(TestSuite.java:230) at junit.framework.TestSuite.run(TestSuite.java:225) at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner.main(RemotePluginTestRunner.java:58) at org.eclipse.pde.internal.junit.runtime.CoreTestApplication.run(CoreTestApplication.java:24) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethod(EclipseAppContainer.java:533) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:155) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:504) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443) at org.eclipse.equinox.launcher.Main.run(Main.java:1169) at org.eclipse.equinox.launcher.Main.main(Main.java:1144) |
jsamdal wrote:
Thanks! Yikes, I see this too now! I'm not sure why I didn't when I first tried out the two -D switches for jetty .... I went back to a clean M3 install and worked through this and found I can get the database to build successfully by adding one additional switch: -Dserver.port=8080 So in all you need to add these three switches: -Djetty.http.port=8080 -Djetty.https.port=8443 -Dserver.port=8080 Add them to both the "Create Repository Database" launch and the "JazzServer with JazzTalk" launch. For reference, that property "server.port" is being used in com.ibm.team.repository.transport.client.TeamServerFactoryImpl. By the way, I still see the error message in the console about "Failed to locate teamserver.properties". I think you can ignore that (the database built fine for me in spite of that message). Chris |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.