ToolCannotBeFoundException: Cannot find IntelliJ IDEA installation

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(
     at jetbrains.buildServer.agent.impl.BuildRunnerContextImpl.getToolPath(
     at jetbrains.buildServer.agent.ideaRunner.IprService.generateIntegrationXmlFile(
     at jetbrains.buildServer.agent.ideaRunner.IprService.waitFor(
     at jetbrains.buildServer.agent.impl.buildStages.runnerStages.start.CallRunnerStage.doBuildStage(
     at jetbrains.buildServer.agent.impl.buildStages.RunnerStagesExecutor$1.callStage(
     at jetbrains.buildServer.agent.impl.buildStages.RunnerStagesExecutor$1.callStage(
     at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.callRunStage(
     at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.doStages(
     at jetbrains.buildServer.agent.impl.buildStages.RunnerStagesExecutor.doStages(
     at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor$1.callStage(
     at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor$1.callStage(
     at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.callRunStage(
     at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.doStages(
     at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor.doStages(
     at jetbrains.buildServer.agent.impl.BuildRunAction.doStages(
     at jetbrains.buildServer.agent.impl.BuildRunAction.runBuild(
     at jetbrains.buildServer.agent.impl.BuildAgentImpl.doActualBuild(
     at jetbrains.buildServer.agent.impl.BuildAgentImpl.access$100(
     at jetbrains.buildServer.agent.impl.BuildAgentImpl$

Does anyone have a solution?

Comment actions Permalink

Grigory, do you still have this problem?

Comment actions Permalink

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.

Comment actions Permalink

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.

Comment actions Permalink

Okay, I got it.
Is this setting correct:

I have this in my

Comment actions Permalink

No, it is not. It should be:

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.

Comment actions Permalink

Okay, thank you!
I will fix it.

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

Comment actions Permalink

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

Comment actions Permalink

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/*

How can be this fixed?
Thanks in advance.

Comment actions Permalink

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.

Comment actions Permalink

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.

Comment actions Permalink

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

Comment actions Permalink

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

It is empty.

Comment actions Permalink

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

Comment actions Permalink

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.

Comment actions Permalink

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.

Comment actions Permalink

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

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?

Comment actions Permalink

May be this is helpful:

root@builder-new:/var/tainted/TeamCity# find . -name idea*

Comment actions Permalink


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?

Comment actions Permalink

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:~$ 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:~$ 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

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.

Comment actions Permalink


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

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

Comment actions Permalink

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

Comment actions Permalink

Great, thanks for sharing the cause of the issue.


Please sign in to leave a comment.