I'm setting up a continuous integration server with TeamCity.
I configured a build with Duplicates Finder (java).
Tests passed: 2; error message is logged; process exited with code 255
[13:30:02] Step 2/3: Duplicate Code (Duplicates Finder (Java)) (1s)
[13:30:04] [Step 2/3] Upload duplicate fragments
[13:30:04] [Upload duplicate fragments] Fragments date not found in file / home/sysmo/TeamCity/buildAgent/temp/buildTmp/duplicates3350364825119326364/fragments.xml
[13:30:04] [Step 2/3] Upload duplicates
[13:30:04] [Upload duplicates] Duplicates date not found in file / home/sysmo/TeamCity/buildAgent/temp/buildTmp/duplicates3350364825119326364/duplicates.xml
[13:30:04] [Step 2/3] Step Duplicate Code (Duplicates Finder (Java)) failed
I came to realize that the build agent works correctly in Windows, but does not work in linux (Suse 12.2). (See image).
Any tips on how to solve this problem?
Can someone help me please?
If would be easier if you can attach full build log as there might be relevant messages.
It seems that the duplicates finder fails for some reason. One of possible reasons is JVM memory issues: either too small that is fails with OutOfMemory (so need to increase -Xmx), or large for the JVM to initiazlize on the machine.
OK. Attached is the full log.
Pleae check that the processes launched by the TeamCity agent can connect to the agent's port (http://localhost:9090 in the case from the logs). Seems like this is not the case for the build, while this is a necessary pre-requisite for the due functionaing of TeamCity agent logic.
I think so, the TeamCity can connect to http://localhost:9090 . If I simply disable the Duplicate Finder and Inspections (Java) the build works.
Attached the full log with duplicate finder and Inspections (Java) disabled.
Sone runners do work. But not the others.
Can you please try Ant build runner?
I never used Ant. I created the project using the command "mvn ant:ant". I hope this is the correct procedure.
Same problem. Follow the log.
I have attached the project.
Idea duplicates and inspectinos runned will not works until the process launched fromt he agent can connect to the agent's port (http://localhost:9090 in the case from the logs).
Maven runner does not need the ability.
I asked you to try Ant as it also requires the ability to connect to the port and would expose the same issue.
Ok, but I do not understand how this can be happening..
How can I test this?
The "TeamCity" and "Linux Agent" are on the same computer (Same OS, Same IP).
How could he not have access to port 9090?
> How could he not have access to port 9090?
I am not a Linux administratino guru, so won't help you much here.
I'd start by opening the address ( http://localhost:9090 , but may vary, can be seen in the command line in the build log) on the agent machine in the browser (message "Method GET not implemented" means the agent is accessible). You might need ot run theat on behalf of the same user running TeamCity agent.
If it works, I'd try to run the agent from the same user's console (agnet.sh start).
Next, I'd try to connect to the port from a test script run as a build in TeamCity.
I open the browser with this adress:localhost:9090
Received: Method GET not implemented (try POST)
Then I execute the command:
sysmo@linux-to6j:~/buildAgent/bin> sh agent.sh start
Starting TeamCity build agent...
Java executable is found in '/usr/java/default/jre'.
Starting TeamCity Build Agent Launcher...
Agent home directory is /home/sysmo/buildAgent
Current Java runtime version is 1.7
Lock file: /home/sysmo/buildAgent/logs/buildAgent.properties.lock
Using no lock
Done , see log at ../logs/teamcity-agent.log
I tried to run the build again (in TeamCity) and the same error occurred.
What do I do now?
I discovered that I have two agents installed in linux.
One is in / home / sysmo / buildAgent and another is in / home / sysmo / TeamCity / buildAgent.
When attempting to boot the agent default (/home/sysmo/TeamCity/buildAgent/bin # sh agent.sh start) I get this message:
Build agent is already running with PID 31084
Anyway, the two agents, the same problem occurs.
Please check that you have only one agent running (one agent uses two nested java processes).
Could you please also try to install the agent on another machine to see if that is specific to environment?
I'll try to install an agent on another machine. But it will take some time. Once I have the result I post here.
I installed an agent on a virtual machine with Ubuntu 12.04. It worked!
But I still need to work on the machine with Suse 12.2