TeamCity on AWS unable to connect with p4

I have installed TeamsCity on AWS using the cloudFormation template:

https://github.com/JetBrains/teamcity-cloudformation-template

 

This template did not include p4 installation. I manage to install p4 by hand on the "main" instance of the stack (where teamcity server is running). Under the /use/local/bin directory. I have verified that it runs as a command line with p4 info.

However, when trying to set up a perforce VCS root with appropriate parameters that work on our local TeamCity server instance, I am unable to connect with the test Connection and get an error that says : 

Test connection failed in MyProject / MyProject _Win
Unable to run P4 command-line client at path 'p4' for VCS Root 'perforce' on machine 'bc3d290fc1xx' under OS user 'root': Cannot run program "p4": error=2, No such file or directory
 
I am not sure how to identify the bc3d290fc1xx machine, which I know is where the default agent is running.  
 
But I am trying to connect from an agent running on our local machine. Which connects fine to the AWS server.
When running a build on that particular agent (which again that same agent works connecting to a local server) we get:
 
 Failed to collect changes, error: Cannot find server timezone info in p4 info output, p4 info call failed, VCS root: "Perforce" {instance id=1, parent internal id=1, parent id=MyProject_Perforce, description: "perforce: perforce.assembla.com:XXXX: perforce stream: '//depot/Development'"}
 
The connection parameters for the perforce server seem correct.
 
What am I not understanding?
Does the server need to have p4 even if you have it set up to: 
"Perforce to checkout files on agent"
 
What else could I be doing wrong?
 
Here is the stack trace:
etbrains.buildServer.vcs.VcsRootVcsException: Cannot find server timezone info in p4 info output, p4 info call failed
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.createRootException(VcsChangesStatesCollector.java:96)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.getCurrentState(VcsChangesStatesCollector.java:37)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.lambda$null$1(VcsChangesStatesCollector.java:27)
at jetbrains.buildServer.util.NamedThreadFactory.executeWithNewThreadName(NamedThreadFactory.java:76)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.lambda$getCollectStatesTasks$2(VcsChangesStatesCollector.java:105)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: jetbrains.buildServer.vcs.VcsException: Cannot find server timezone info in p4 info output, p4 info call failed
at jetbrains.buildServer.vcs.perforce.PerforceConnection.getServerPort(PerforceConnection.java:661)
at jetbrains.buildServer.vcs.perforce.PerforceWorkspaceInfo.initialize(PerforceWorkspaceInfo.java:92)
at jetbrains.buildServer.vcs.perforce.PerforceWorkspaceInfoStream.initialize(PerforceWorkspaceInfoStream.java:80)
at jetbrains.buildServer.vcs.perforce.PerforceConnection.initializeMainWorkspaceInfo(PerforceConnection.java:750)
at jetbrains.buildServer.vcs.perforce.PerforceClientFactoryImpl$CachingPerforceConnection.initializeMainWorkspaceInfo(PerforceClientFactoryImpl.java:162)
at jetbrains.buildServer.vcs.perforce.PerforceConnection.getWorkspaceInfo(PerforceConnection.java:743)
at jetbrains.buildServer.vcs.perforce.changes.PerforceChangesCollector$GetCurrentStateCommand.collectState(PerforceChangesCollector.java:136)
at jetbrains.buildServer.vcs.perforce.changes.PerforceChangesCollector.getCurrentState(PerforceChangesCollector.java:31)
at jetbrains.vcs.api.services.impl.RepositoryStateServiceProvider$1.getCurrentState(RepositoryStateServiceProvider.java:2)
at jetbrains.buildServer.vcs.impl.VcsRootInstanceImpl.lambda$null$0(VcsRootInstanceImpl.java:60)
at jetbrains.buildServer.serverSide.impl.BaseAccessChecker.runWithDisabledCheck(BaseAccessChecker.java:28)
at jetbrains.buildServer.serverSide.impl.SecondaryNodeSecurityManager.runSafeNetworkOperation(SecondaryNodeSecurityManager.java:16)
at jetbrains.buildServer.serverSide.ReadOnlyRestrictor.doReadOnlyNetworkOperation(ReadOnlyRestrictor.java:4)
at jetbrains.buildServer.vcs.impl.VcsRootInstanceImpl.lambda$getCurrentState$1(VcsRootInstanceImpl.java:250)
at jetbrains.buildServer.serverSide.impl.BaseAccessChecker.runWithDisabledCheck(BaseAccessChecker.java:28)
at jetbrains.buildServer.serverSide.impl.SecondaryNodeSecurityManager.executeSafeCommandLine(SecondaryNodeSecurityManager.java:15)
at jetbrains.buildServer.serverSide.ReadOnlyRestrictor.doReadOnlyCommandLine(ReadOnlyRestrictor.java:6)
at jetbrains.buildServer.vcs.impl.VcsRootInstanceImpl.getCurrentState(VcsRootInstanceImpl.java:160)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector$CurrentStateOperation.call(VcsChangesStatesCollector.java:5)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector$CurrentStateOperation.call(VcsChangesStatesCollector.java:2)
at jetbrains.buildServer.vcs.VcsOperationProgressProviderImpl.runWithProgress(VcsOperationProgressProviderImpl.java:27)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.getCurrentState(VcsChangesStatesCollector.java:39)
... 8 more
jetbrains.buildServer.vcs.VcsException: Cannot find server timezone info in p4 info output, p4 info call failed
at jetbrains.buildServer.vcs.perforce.PerforceConnection.getServerPort(PerforceConnection.java:661)
at jetbrains.buildServer.vcs.perforce.PerforceWorkspaceInfo.initialize(PerforceWorkspaceInfo.java:92)
at jetbrains.buildServer.vcs.perforce.PerforceWorkspaceInfoStream.initialize(PerforceWorkspaceInfoStream.java:80)
at jetbrains.buildServer.vcs.perforce.PerforceConnection.initializeMainWorkspaceInfo(PerforceConnection.java:750)
at jetbrains.buildServer.vcs.perforce.PerforceClientFactoryImpl$CachingPerforceConnection.initializeMainWorkspaceInfo(PerforceClientFactoryImpl.java:162)
at jetbrains.buildServer.vcs.perforce.PerforceConnection.getWorkspaceInfo(PerforceConnection.java:743)
at jetbrains.buildServer.vcs.perforce.changes.PerforceChangesCollector$GetCurrentStateCommand.collectState(PerforceChangesCollector.java:136)
at jetbrains.buildServer.vcs.perforce.changes.PerforceChangesCollector.getCurrentState(PerforceChangesCollector.java:31)
at jetbrains.vcs.api.services.impl.RepositoryStateServiceProvider$1.getCurrentState(RepositoryStateServiceProvider.java:2)
at jetbrains.buildServer.vcs.impl.VcsRootInstanceImpl.lambda$null$0(VcsRootInstanceImpl.java:60)
at jetbrains.buildServer.serverSide.impl.BaseAccessChecker.runWithDisabledCheck(BaseAccessChecker.java:28)
at jetbrains.buildServer.serverSide.impl.SecondaryNodeSecurityManager.runSafeNetworkOperation(SecondaryNodeSecurityManager.java:16)
at jetbrains.buildServer.serverSide.ReadOnlyRestrictor.doReadOnlyNetworkOperation(ReadOnlyRestrictor.java:4)
at jetbrains.buildServer.vcs.impl.VcsRootInstanceImpl.lambda$getCurrentState$1(VcsRootInstanceImpl.java:250)
at jetbrains.buildServer.serverSide.impl.BaseAccessChecker.runWithDisabledCheck(BaseAccessChecker.java:28)
at jetbrains.buildServer.serverSide.impl.SecondaryNodeSecurityManager.executeSafeCommandLine(SecondaryNodeSecurityManager.java:15)
at jetbrains.buildServer.serverSide.ReadOnlyRestrictor.doReadOnlyCommandLine(ReadOnlyRestrictor.java:6)
at jetbrains.buildServer.vcs.impl.VcsRootInstanceImpl.getCurrentState(VcsRootInstanceImpl.java:160)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector$CurrentStateOperation.call(VcsChangesStatesCollector.java:5)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector$CurrentStateOperation.call(VcsChangesStatesCollector.java:2)
at jetbrains.buildServer.vcs.VcsOperationProgressProviderImpl.runWithProgress(VcsOperationProgressProviderImpl.java:27)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.getCurrentState(VcsChangesStatesCollector.java:39)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.lambda$null$1(VcsChangesStatesCollector.java:27)
at jetbrains.buildServer.util.NamedThreadFactory.executeWithNewThreadName(NamedThreadFactory.java:76)
at jetbrains.buildServer.vcs.impl.VcsChangesStatesCollector.lambda$getCollectStatesTasks$2(VcsChangesStatesCollector.java:105)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
 
Thanks

 

2 comments
Comment actions Permalink

I had a similar issue and it didn't have anything to do with AWS.

My issue is that the P4 repo is using ssl and requires p4 trust to be executed on the server machine (since it is used to check for new changesets).

It would be an interesting feature request for Jetbrains to allow it to "force" p4 trust in the VCS root setup. This would avoid needing to remote on the machine and doing all the setup manually.

0
Comment actions Permalink

Hi Eric,

 

we have a feature request that we recently bumped in priority due to our own needs for improving support for p4trust here: https://youtrack.jetbrains.com/issue/TW-33101 . Feel free to watch it to stay up to date on its progress

0

Please sign in to leave a comment.