ToolCannotBeFoundException: Cannot find IntelliJ IDEA installation

Hello.
We are using obsolete IPR runner for running tests.
For some reason, after upgrading to Teamcity 7 we got such exception

Failed to start build runner 'Ipr'
jetbrains.buildServer.agent.ToolCannotBeFoundException: Cannot find IntelliJ IDEA installation
     at jetbrains.buildServer.agent.impl.IdeaToolProvider.getPath(IdeaToolProvider.java:55)
     at jetbrains.buildServer.agent.impl.BuildRunnerContextImpl.getToolPath(BuildRunnerContextImpl.java:151)
     at jetbrains.buildServer.agent.ideaRunner.IprService.generateIntegrationXmlFile(IprService.java:257)
     at jetbrains.buildServer.agent.ideaRunner.IprService.waitFor(IprService.java:146)
     at jetbrains.buildServer.agent.impl.buildStages.runnerStages.start.CallRunnerStage.doBuildStage(CallRunnerStage.java:57)
     at jetbrains.buildServer.agent.impl.buildStages.RunnerStagesExecutor$1.callStage(RunnerStagesExecutor.java:25)
     at jetbrains.buildServer.agent.impl.buildStages.RunnerStagesExecutor$1.callStage(RunnerStagesExecutor.java:18)
     at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.callRunStage(StagesExecutor.java:76)
     at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.doStages(StagesExecutor.java:36)
     at jetbrains.buildServer.agent.impl.buildStages.RunnerStagesExecutor.doStages(RunnerStagesExecutor.java:18)
     at 
jetbrains.buildServer.agent.impl.buildStages.startStages.RunnerContextExecutor.callRunnerStages(RunnerContextExecutor.java:40)
     at 
jetbrains.buildServer.agent.impl.buildStages.startStages.ForEachBuildRunnerStage.doBuildStage(ForEachBuildRunnerStage.java:68)
     at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor$1.callStage(BuildStagesExecutor.java:31)
     at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor$1.callStage(BuildStagesExecutor.java:24)
     at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.callRunStage(StagesExecutor.java:76)
     at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.doStages(StagesExecutor.java:36)
     at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor.doStages(BuildStagesExecutor.java:24)
     at jetbrains.buildServer.agent.impl.BuildRunAction.doStages(BuildRunAction.java:70)
     at jetbrains.buildServer.agent.impl.BuildRunAction.runBuild(BuildRunAction.java:50)
     at jetbrains.buildServer.agent.impl.BuildAgentImpl.doActualBuild(BuildAgentImpl.java:242)
     at jetbrains.buildServer.agent.impl.BuildAgentImpl.access$100(BuildAgentImpl.java:47)
     at jetbrains.buildServer.agent.impl.BuildAgentImpl$1.run(BuildAgentImpl.java:215)
     at java.lang.Thread.run(Thread.java:662)


Does anyone have a solution?

0
22 comments

Grigory, do you still have this problem?

0
Avatar
Permanently deleted user

Yes, I do.
A couple days ago we've upgraded from Teamcity version 6 to Teamcity 7. All our agents have successfully downloaded new plugins and upgraded. And I saw this error first time
After that I've reinstalled one of my agents and the problem gone.

Today we installed Teamcity 7.0.1 - all agents have upgraded again. And after that I saw this error again (is has appeared on the fixed agent too).
After reinstalling all agents problem gone.

I don't remember exactly (and I can't check it after reinstall), but I think that %agent.home.dir%/plugins/idea didn't exist after upgrade.

0

IntelliJ IDEA bundled with TeamCity has been moved under the <agent inst dir>/tools directory. So it is correct that idea directory did not appear under plugins. We made this movement because IDEA is not actually an agent plugin but rather a tool.

0
Avatar
Permanently deleted user

Okay, I got it.
Is this setting correct:
system.teamcity.idea.home=%system.agent.home.dir%/plugins/idea

I have this in my buildAgent.properties

0

No, it is not. It should be:
system.teamcity.idea.home=%system.agent.home.dir%/tools/idea

Actually I am not sure you need it, as TeamCity agent should be able to find IDEA wihtout problems. The only reason you can use it is to be able to reference it from your own builds.

0
Avatar
Permanently deleted user

Okay, thank you!
I will fix it.

I would like to mention, that this setting is still exist in buildAgent.dist.properties in latest build of Teamcity.

0

Thank you for pointing that. Most likely we'll remove this property as it is deprecated.

0
Avatar
Permanently deleted user

The problem rise again.

Now we are not able to run Java Inspections on all our agents.
Searching the log, I've found this:

[2012-04-24 12:56:38,261]   INFO - nner.IdeaCommandlineRunnerInfo - Uwnable to find path to bundled IntelliJ IDEA. Runner Duplicator is disabled. 
[2012-04-24 12:56:38,261]   INFO - nner.IdeaCommandlineRunnerInfo - Uwnable to find path to bundled IntelliJ IDEA. Runner Inspection is disabled.


Next, I've made a copy of my build agent's folder and reinstalled it.
Comparison of my old copy and reinstalled expose differences in folders: in my copy was folder plugins/idea.
Then I've found confirmation in log:

[2012-04-24 12:56:23,201]   INFO - rver.plugins.PluginManagerImpl - Plugins intialization started... 
[2012-04-24 12:56:23,201]   INFO - rver.plugins.PluginManagerImpl - Scanning plugins folders
[2012-04-24 12:56:23,225]   INFO - .plugins.files.JarSearcherBase - Scanning plugin folder: /var/tainted/build-agent/plugins
[2012-04-24 12:56:23,330]   INFO - .plugins.files.JarSearcherBase - Scanning plugin folder: /var/tainted/build-agent/tools
[2012-04-24 12:56:23,361]   WARN - s.AgentPluginVersionComparator - Found more than one plugin for name: idea
[2012-04-24 12:56:23,363]   WARN - rver.plugins.PluginsCollection - Plugin idea[version not set, path: /var/tainted/build-agent/tools/idea] will not be loaded because it is overridden by plugin: idea[version not set, path: /var/tainted/build-agent/plugins/idea]


As you can see, I've got two idea folders. I don't know where from the other folder appears - I don't create it and I doubt anyone does.
Here is it's contents:


teamcity@f1-linux-8:/var/tainted/build-agent$ ls ~/agent_test/plugins/idea/plugins/inspections/lib/*
/home/teamcity/agent_test/plugins/idea/plugins/inspections/lib/antlr-2.7.7.jar
/home/teamcity/agent_test/plugins/idea/plugins/inspections/lib/args4j-2.0.16.jar
/home/teamcity/agent_test/plugins/idea/plugins/inspections/lib/asm-all-3.3.1.jar
/home/teamcity/agent_test/plugins/idea/plugins/inspections/lib/cglib-nodep-2.1_3.jar
/home/teamcity/agent_test/plugins/idea/plugins/inspections/lib/commons-cli-1.2.jar
/home/teamcity/agent_test/plugins/idea/plugins/inspections/lib/commons-codec-1.3.jar
/home/teamcity/agent_test/plugins/idea/plugins/inspections/lib/commons-collections-3.11.jar
/home/teamcity/agent_test/plugins/idea/plugins/inspections/lib/commons-collections-3.1.jar
/home/teamcity/agent_test/plugins/idea/plugins/inspections/lib/commons-configuration-1.6.jar
/home/teamcity/agent_test/plugins/idea/plugins/inspections/lib/commons-io-1.4.jar
/home/teamcity/agent_test/plugins/idea/plugins/inspections/lib/commons-lang-2.3.jar
/home/teamcity/agent_test/plugins/idea/plugins/inspections/lib/commons-logging-1.0.41.jar
/home/teamcity/agent_test/plugins/idea/plugins/inspections/lib/commons-logging-1.0.4.jar
/home/teamcity/agent_test/plugins/idea/plugins/inspections/lib/commons-vfs-1.0.jar
/home/teamcity/agent_test/plugins/idea/plugins/inspections/lib/dom4j-1.6.1.jar
/home/teamcity/agent_test/plugins/idea/plugins/inspections/lib/easymock-2.4.jar
/home/teamcity/agent_test/plugins/idea/plugins/inspections/lib/easymockclassextension-2.4.jar
/home/teamcity/agent_test/plugins/idea/plugins/inspections/lib/fibers-preload.jar
/home/teamcity/agent_test/plugins/idea/plugins/inspections/lib/hamcrest-all-1.2.jar
/home/teamcity/agent_test/plugins/idea/plugins/inspections/lib/hibernate-annotations-3.5.6-Final.jar
/home/teamcity/agent_test/plugins/idea/plugins/inspections/lib/hibernate-commons-annotations-3.2.0.Final.jar
/home/teamcity/agent_test/plugins/idea/plugins/inspections/lib/hibernate-core-3.5.6-Final.jar
/home/teamcity/agent_test/plugins/idea/plugins/inspections/lib/hibernate-jpa-2.0-api-1.0.0.Final.jar
/home/teamcity/agent_test/plugins/idea/plugins/inspections/lib/inspections.jar
/home/teamcity/agent_test/plugins/idea/plugins/inspections/lib/javaparser-1.0.8.jar
/home/teamcity/agent_test/plugins/idea/plugins/inspections/lib/javassist-3.12.1.GA.jar
/home/teamcity/agent_test/plugins/idea/plugins/inspections/lib/jta-1.1.jar
/home/teamcity/agent_test/plugins/idea/plugins/inspections/lib/junit-4.8.1.jar
/home/teamcity/agent_test/plugins/idea/plugins/inspections/lib/log4j-1.2.14.jar
/home/teamcity/agent_test/plugins/idea/plugins/inspections/lib/mockito-all-1.9.0.jar
/home/teamcity/agent_test/plugins/idea/plugins/inspections/lib/objenesis-1.0.jar
/home/teamcity/agent_test/plugins/idea/plugins/inspections/lib/slf4j-api-1.6.1.jar
/home/teamcity/agent_test/plugins/idea/plugins/inspections/lib/truezip-6.6.jar
/home/teamcity/agent_test/plugins/idea/plugins/inspections/lib/uncommons-math-1.0.2.jar



How can be this fixed?
Thanks in advance.

0

When agent is installed, it does not have any plugins, only core components. When agent starts it tries to register on the server and check whether it needs to download any plugins. Necessary plugins and tools are downloaded automatically, and installed in appropriate places. This is how tools/idea folder appears. There should not be any plugins/idea directories when upgrade finishes.

I would suggest to install fresh version of agent, wait till it upgrades and if you still see both tools/idea and plugins/idea, attach here logs from the agent.

0
Avatar
Permanently deleted user

Yep, everything works exactly this way: at first time agent runs it downloads and installs plugins and the plugins directory doesn't contain idea folder. But after some time it appears and I don't know when it hapens.
Fresh installation also helps but it easier to delete plugins/idea.

I've uploaded logs from one agent to your ftp with the name of this topic.

0

What files do you have under .BuildServer/plugins directory?

0
Avatar
Permanently deleted user

ls /root/.BuildServer/plugins -l
итого 0


It is empty.

0

This problem started to reproduce after the server upgrade? If so, from which version did you upgrade your server?

0
Avatar
Permanently deleted user

I suppose yes - we didn't encounter this before.
We had some discussion by email and you gave us 6.0.4 (15989) build (we got some VCS hanging problems).
We used this version for about a year and then upgraded to TC7.

0

Since you are using Linux, is it possible that during upgrade you unpacked new distribution over the previous one? If so, you probably have some old files left from the older version of TeamCity. In TeamCity 7.0 there must be directory called idea-tool under <TeamCity inst dir>/WEB-INF/plugins, and there must not be <TeamCity inst dir>/WEB-INF/plugins/idea directory. If you have this directory, then this can be the cause of your problems.

0
Avatar
Permanently deleted user

If I understand you, I should check Teamcity server (not agent) folder /var/tainted/TeamCity/webapps/ROOT/WEB-INF/plugins, here is it's filtered contents:

root@builder-new:/var/tainted/TeamCity/webapps/ROOT/WEB-INF/plugins# ls -la | grep idea
drwxr-xr-x  3 root root     4096 Апр 24 09:36 idea-tool
root@builder-new:/var/tainted/TeamCity/webapps/ROOT/WEB-INF/plugins#


As you can see, idea folder is not presented here.
Also, when we installs new version of Teamcity we never copy it contents into existing directory - firrst backuping old version and then unpacking new clean version.
Have you analyzed logs? Did they helped?

0
Avatar
Permanently deleted user

May be this is helpful:

root@builder-new:/var/tainted/TeamCity# find . -name idea*
./webapps/ROOT/WEB-INF/lib/idea-settings.jar
./webapps/ROOT/WEB-INF/plugins/iprRunner/server/idea-runner-common.jar
./webapps/ROOT/WEB-INF/plugins/iprRunner/server/idea-runner-server.jar
./webapps/ROOT/WEB-INF/plugins/idea-tool
./webapps/ROOT/WEB-INF/plugins/idea-tool/agent/idea.zip
./webapps/ROOT/img/ideaLogo.gif
./webapps/ROOT/update/idea-plugins.xml
./buildAgent/lib/idea-settings.jar

0

Hello,

Please attach server logs. I need to see where had it found one more IDEA.
What files do you see under /var/tainted/build-agent/tools/idea and /var/tainted/build-agent/plugins/idea?

May /var/tainted/build-agent/plugins/idea folder be created by your build on agent?

0
Avatar
Permanently deleted user

Hello, Eugene.
I've uploaded server logs with the topic's name to your ftp. Earlier I've attached agent's logs too.

Here is contents of folders you wish to see:

teamcity@f1-linux-8:~$ ls -la /var/tainted/build-agent/tools/idea
total 28
drwxr-xr-x  5 teamcity teamcity 4096 2012-05-14 13:55 .
drwxr-xr-x  8 teamcity teamcity 4096 2012-05-14 13:55 ..
drwxr-xr-x  2 teamcity teamcity 4096 2012-05-14 13:55 bin
-rw-r--r--  1 teamcity teamcity   10 2012-05-14 13:55 build.txt
drwxr-xr-x  2 teamcity teamcity 4096 2012-05-14 13:55 lib
drwxr-xr-x 42 teamcity teamcity 4096 2012-05-14 13:55 plugins
-rw-r--r--  1 teamcity teamcity  305 2012-05-14 13:55 teamcity-plugin.xml
teamcity@f1-linux-8:~$
teamcity@f1-linux-8:~$ ls -la /var/tainted/build-agent/plugins/idea
ls: cannot access /var/tainted/build-agent/plugins/idea: No such file or directory
teamcity@f1-linux-8:~$
teamcity@f1-linux-8:~$ ls -la  agent_test/plugins/idea/plugins/inspections/lib/
total 15368
drwxr-xr-x 2 teamcity teamcity    4096 2012-05-14 13:54 .
drwxr-xr-x 3 teamcity teamcity    4096 2012-05-14 13:54 ..
-rw-r--r-- 1 teamcity teamcity  445288 2012-05-14 13:54 antlr-2.7.7.jar
-rw-r--r-- 1 teamcity teamcity   56298 2012-05-14 13:54 args4j-2.0.16.jar
-rw-r--r-- 1 teamcity teamcity  302881 2012-05-14 13:54 asm-all-3.3.1.jar
-rw-r--r-- 1 teamcity teamcity  324238 2012-05-14 13:54 cglib-nodep-2.1_3.jar
-rw-r--r-- 1 teamcity teamcity   41123 2012-05-14 13:54 commons-cli-1.2.jar
-rw-r--r-- 1 teamcity teamcity   46725 2012-05-14 13:54 commons-codec-1.3.jar
-rw-r--r-- 1 teamcity teamcity  559366 2012-05-14 13:54 commons-collections-3.11.jar
-rw-r--r-- 1 teamcity teamcity  559366 2012-05-14 13:54 commons-collections-3.1.jar
-rw-r--r-- 1 teamcity teamcity  298829 2012-05-14 13:54 commons-configuration-1.6.jar
-rw-r--r-- 1 teamcity teamcity  109043 2012-05-14 13:54 commons-io-1.4.jar
-rw-r--r-- 1 teamcity teamcity  245274 2012-05-14 13:54 commons-lang-2.3.jar
-rw-r--r-- 1 teamcity teamcity   38015 2012-05-14 13:54 commons-logging-1.0.41.jar
-rw-r--r-- 1 teamcity teamcity   38015 2012-05-14 13:54 commons-logging-1.0.4.jar
-rw-r--r-- 1 teamcity teamcity  362717 2012-05-14 13:54 commons-vfs-1.0.jar
-rw-r--r-- 1 teamcity teamcity  313898 2012-05-14 13:54 dom4j-1.6.1.jar
-rw-r--r-- 1 teamcity teamcity   81133 2012-05-14 13:54 easymock-2.4.jar
-rw-r--r-- 1 teamcity teamcity   63697 2012-05-14 13:54 easymockclassextension-2.4.jar
-rw-r--r-- 1 teamcity teamcity    2433 2012-05-14 13:54 fibers-preload.jar
-rw-r--r-- 1 teamcity teamcity  279925 2012-05-14 13:54 hamcrest-all-1.2.jar
-rw-r--r-- 1 teamcity teamcity  365546 2012-05-14 13:54 hibernate-annotations-3.5.6-Final.jar
-rw-r--r-- 1 teamcity teamcity   71283 2012-05-14 13:54 hibernate-commons-annotations-3.2.0.Final.jar
-rw-r--r-- 1 teamcity teamcity 2566731 2012-05-14 13:54 hibernate-core-3.5.6-Final.jar
-rw-r--r-- 1 teamcity teamcity  100884 2012-05-14 13:54 hibernate-jpa-2.0-api-1.0.0.Final.jar
-rw-r--r-- 1 teamcity teamcity 4823001 2012-05-14 13:54 inspections.jar
-rw-r--r-- 1 teamcity teamcity  256349 2012-05-14 13:54 javaparser-1.0.8.jar
-rw-r--r-- 1 teamcity teamcity  644148 2012-05-14 13:54 javassist-3.12.1.GA.jar
-rw-r--r-- 1 teamcity teamcity   15071 2012-05-14 13:54 jta-1.1.jar
-rw-r--r-- 1 teamcity teamcity  237047 2012-05-14 13:54 junit-4.8.1.jar
-rw-r--r-- 1 teamcity teamcity  367444 2012-05-14 13:54 log4j-1.2.14.jar
-rw-r--r-- 1 teamcity teamcity 1495219 2012-05-14 13:54 mockito-all-1.9.0.jar
-rw-r--r-- 1 teamcity teamcity   28569 2012-05-14 13:54 objenesis-1.0.jar
-rw-r--r-- 1 teamcity teamcity   25496 2012-05-14 13:54 slf4j-api-1.6.1.jar
-rw-r--r-- 1 teamcity teamcity  460774 2012-05-14 13:54 truezip-6.6.jar
-rw-r--r-- 1 teamcity teamcity   37247 2012-05-14 13:54 uncommons-math-1.0.2.jar
teamcity@f1-linux-8:~$



agent_test - it's a backup copy of corrupted agent version.
I doubt that plugins/idea is created by our builds. Apparently it contents it's created by TC.

0
Avatar
Permanently deleted user

Hello.

Today I've checked again plugin's folder of one of my agents and here what I've found:

teamcity@F1-linux-0:/var/tainted/build-agent$ ls plugins/ -l | grep idea
drwxr-xr-x 3 teamcity teamcity 4096 2012-05-15 05:25 idea
teamcity@F1-linux-0:/var/tainted/build-agent$


idea-tool folder is missing and only idea present.
Have you analyzed our logs?

0
Avatar
Permanently deleted user

I've found a problem - one of our build was generating this folder.
Apologise for this :(

0

Great, thanks for sharing the cause of the issue.

0

Please sign in to leave a comment.