[JIRA] [perforce-plugin] (JENKINS-25364) Unable to update workspace error

124 views
Skip to first unread message

naveen.gogineni@viasat.com (JIRA)

unread,
Oct 29, 2014, 1:24:07 PM10/29/14
to jenkinsc...@googlegroups.com
Issue Type: Bug Bug
Assignee: Rob Petti
Attachments: build.xml, build_config.xml, config.xml, log.txt
Components: perforce-plugin
Created: 29/Oct/14 5:22 PM
Description:

I keep getting the following error when trying to do a Perforce build. This functionality worked before and all of a sudden it has started happening.

ERROR: Unable to update workspace: com.perforce.p4java.exception.ConnectionException: For input string: "2235641344"

I have tried different Perforce clients, different user/passwd combinations but the effect is the same. The Perforce credentials were validated using the "test" command.

Environment: Jenkins version 1.583

Plugins & Versions

Ant Plugin 1.2
Credentials Plugin 1.9.4
CVS Plugin 2.11
External Monitor Job Type Plugin 1.2
Fortify 360 Plugin 3.81
Javadoc Plugin 1.1
JUnit Plugin 1.0
LDAP Plugin 1.6
Mailer Plugin 1.11
Matrix Authorization Strategy Plugin 1.1
Matrix Project Plugin 1.3
Maven Integration plugin 2.5
OWASP Markup Formatter Plugin 1.1
P4 Plugin 1.0.16
PAM Authentication Plugin 1.1
SSH Credentials Plugin 1.6
SSH Slaves plugin 1.5
Subversion Plugin 1.54
Translation Assistance Plugin 1.10
Windows Slaves Plugin 1.0

Jenkins is running in a docker container(built off of a centos 6.4 image). The docker host itself is Centos 6.4.
Project: Jenkins
Priority: Blocker Blocker
Reporter: Naveen Gogineni
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

rob.petti@gmail.com (JIRA)

unread,
Oct 29, 2014, 1:30:07 PM10/29/14
to jenkinsc...@googlegroups.com

Wrong component.

Change By: Rob Petti (29/Oct/14 5:29 PM)
Assignee: Rob Petti
Component/s: p4
Component/s: perforce-plugin

pallen@perforce.com (JIRA)

unread,
Oct 30, 2014, 6:22:08 AM10/30/14
to jenkinsc...@googlegroups.com
Paul Allen commented on Bug JENKINS-25364

Hi Naveen,

Thanks for the logs...

[build.xml]

<hudsonVersion>1.583</hudsonVersion>
  <scm class="hudson.scm.NullChangeLogParser"/>
  <culprits class="com.google.common.collect.EmptyImmutableSortedSet"/>

The class="hudson.scm.NullChangeLogParser" should be class="org.jenkinsci.plugins.p4.changes.P4ChangeParser"

[log]

SCM Task: syncing files at change: 193782
... sync /var/jenkins_home/jobs/VJ_BUILD/workspace/...@1256
... force update false
... bypass have false
ERROR: Unable to update workspace: com.perforce.p4java.exception.ConnectionException: For input string: "2235641344"

Looking at the code the iclient object in ClientHelper:syncFiles() (used for connection and workspace operations) is valid for the earlier tasks 'reconcile' etc, but seems to get trampled before the sync. I noticed that you are running two executors and a SCM polling of H * * * *.

[1] Please can you try H/2 (slightly longer period) and only allow one executor.

[2] Is the error intermittent?

[3] Do you only get the error during Polling or for manual builds too?

naveen.gogineni@viasat.com (JIRA)

unread,
Oct 30, 2014, 2:10:12 PM10/30/14
to jenkinsc...@googlegroups.com

Paul
The problem happens with both polling and manual builds. I changed the # executors to 1 and polling to H/2 but the problem still happens. I created a new build(which doesn't inherit the old one) and that synced properly the first time but started failing sync on subsequent runs. The error seems slightly different too.

ERROR: Unable to update workspace: com.perforce.p4java.exception.ConnectionException

I don't see the "for input string" now. Is there a way to turn off addition p4j logs ?

pallen@perforce.com (JIRA)

unread,
Oct 31, 2014, 6:08:08 AM10/31/14
to jenkinsc...@googlegroups.com
Paul Allen commented on Bug JENKINS-25364

Do you have any idea what might have changed to cause the issue? e.g.

  • Does the workspace 'uc_vj_ci' still exist?
  • Has its ownership changed?
  • Are you using triggers, a broker, or changed any server permissions?

The Perforce server logs may hold a clue, can you see any connections from [jenkins.p4-plugin/1.0.xx/xxx]

To try and get past the issue try creating a new Credential, a new Jenkins job and Perforce Workspace.

naveen.gogineni@viasat.com (JIRA)

unread,
Oct 31, 2014, 10:17:07 AM10/31/14
to jenkinsc...@googlegroups.com

I created a new Jenkins Job, new Credential and a new Perforce Workspace. The Job does nothing other than the default Perforce action(sync). Same as before, the job ran fine on first run and then failed on second.

pallen@perforce.com (JIRA)

unread,
Oct 31, 2014, 10:27:08 AM10/31/14
to jenkinsc...@googlegroups.com
Paul Allen commented on Bug JENKINS-25364

This is strange? I presume you are using the Build Now button for both builds?

What Java and version are you using? I don't use CentOS, but perhaps it ships with an old Java version? Are you running Jenkins as a Jar or with something like Tomcat.

What permission does the user running the job have in Perforce? It will need a minimum of 'open' to support the reconcile command.

naveen.gogineni@viasat.com (JIRA)

unread,
Oct 31, 2014, 10:33:08 AM10/31/14
to jenkinsc...@googlegroups.com

Yes I am using Build Now to build. Java version is

java version "1.7.0_65"
OpenJDK Runtime Environment (rhel-2.5.1.2.el6_5-x86_64 u65-b17)
OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)

#uname -a
Linux 38d1e80d522e 2.6.32-358.23.2.el6.x86_64 #1 SMP Wed Oct 16 18:37:12 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

Jenkins is run as a war file. Something to note is that all of this is being run in a docker environment. It was working before but suddenly started showing this strangeness. Is there anything else in environment that you can think of ? env variables etc

pallen@perforce.com (JIRA)

unread,
Oct 31, 2014, 11:12:08 AM10/31/14
to jenkinsc...@googlegroups.com
Paul Allen commented on Bug JENKINS-25364

Do you have 'P4_CLIENT', 'change' or 'label' set in the environment?

I have just made a new release, which cleaned up some of the client/workspace code. However, most of the changes were related to Polling, so I doubt it will fix your issue.

The 1.0.17 might not be on the update centre (typically takes a few hours for Jenkins to push it out). You can download it here:

http://repo.jenkins-ci.org/releases/org/jenkins-ci/plugins/p4/

naveen.gogineni@viasat.com (JIRA)

unread,
Oct 31, 2014, 11:59:07 AM10/31/14
to jenkinsc...@googlegroups.com

I have updated my setup to use the 1.0.17 version but the problem remains. There are no P4PORT/P4CONFIG/P4XXXX anything in env.

pallen@perforce.com (JIRA)

unread,
Oct 31, 2014, 12:31:09 PM10/31/14
to jenkinsc...@googlegroups.com
Paul Allen commented on Bug JENKINS-25364

Please can you check the new Build Job config.xml file for the line:

<scm class="org.jenkinsci.plugins.p4.PerforceScm" plugin="p...@1.0.17">

and the credentials.xml for:

<org.jenkinsci.plugins.p4.credentials.P4PasswordImpl plugin="p...@1.0.17">

Do you get the error if you use the Build Review button and set:
Label: now
Status: submitted
(leave the others empty)

naveen.gogineni@viasat.com (JIRA)

unread,
Oct 31, 2014, 12:53:08 PM10/31/14
to jenkinsc...@googlegroups.com

Hmm. All the lines show p...@1.0.16 however in Jenkins list of Installed plugins it shows 1.0.17 for Perforce plugin. I tried the Build review settings and this is what I get

ERROR: Unable to setup workspace: java.lang.NullPointerException
ERROR: Unable to setup workspace: java.lang.NullPointerException
Finished: FAILURE

pallen@perforce.com (JIRA)

unread,
Oct 31, 2014, 1:22:09 PM10/31/14
to jenkinsc...@googlegroups.com
Paul Allen commented on Bug JENKINS-25364

The ERROR is strange, did you remove any context? The console log should look something like:

 
Started by user xxxx
Building in workspace /var/lib/jenkins/jobs/Test001/workspace
Connected to server: xxxxx.perforce.com:1666
Connected to client: jenkins-node-project-platform
SCM Task: cleanup workspace: jenkins-node-project-platform
SCM Task: reverting all pending and shelved revisions.
... [list] = revert
... rm [list] | ABANDONED
SCM Task: removing all non-versioned files.
... [list] = reconcile -n -a
... rm [list]
SCM Task: restoring all missing and changed revisions.
... [list] = reconcile -n -ed
SCM Task: syncing files at client/label: now
... sync /var/lib/jenkins/jobs/Test001/workspace/...@now
... force update false
... bypass have false
listing changes: //jenkins-node-project-platform/...@950227,now
Finished: SUCCESS

Do you not even see the 'Started by user' text?

Please can you send me the client spec, e.g. p4 client -o uc_vj_ci
... Is this a normal client or one designed for a BuildReplica or EdgeServer?
... Is the Host field set?

pallen@perforce.com (JIRA)

unread,
Oct 31, 2014, 1:32:08 PM10/31/14
to jenkinsc...@googlegroups.com
Paul Allen commented on Bug JENKINS-25364

Please can you also try this against your server and not via the proxy. It just eliminates one more item.

naveen.gogineni@viasat.com (JIRA)

unread,
Oct 31, 2014, 1:50:07 PM10/31/14
to jenkinsc...@googlegroups.com

Actually the full log is

Started by user Naveen Gogineni
Building in workspace /var/jenkins_home/jobs/VJ_BUILD_2/workspace


ERROR: Unable to setup workspace: java.lang.NullPointerException
ERROR: Unable to setup workspace: java.lang.NullPointerException
Finished: FAILURE

Client spec is

Client: uc_vj_ci_2

Update: 2014/10/31 07:15:06

Access: 2014/10/31 10:42:00

Owner: p4build_vj_ci

Root: /var/jenkins_home/jobs/VJ_BUILD_2/workspace

Options: noallwrite clobber nocompress unlocked nomodtime normdir

SubmitOptions: submitunchanged

LineEnd: local

View:
//VJ/Technical/Software/... //uc_vj_ci_2/Technical/Software/...

naveen.gogineni@viasat.com (JIRA)

unread,
Oct 31, 2014, 3:31:08 PM10/31/14
to jenkinsc...@googlegroups.com

I tried to sync to server directly from command line and noticed that it completed without error but didn't sync all files. So I used the "-f" option to force sync and that synced everything. So in the Jenkins job I changed the Populate Options from "Auto clean and sync" to "Forced clean and sync". That seems to go well with the sync and my build progresses. I am going to test more and report.

pallen@perforce.com (JIRA)

unread,
Nov 5, 2014, 10:12:08 AM11/5/14
to jenkinsc...@googlegroups.com
Paul Allen commented on Bug JENKINS-25364

I was just thinking about your proxy, were you able to sync files using P4 or P4V? The behaviour was inline with the proxy running out of disk space or poor network connection (the Proxy logs might have more details).

Are you happy if I close the issue? It seems to be more related to the environment than the plugin.

naveen.gogineni@viasat.com (JIRA)

unread,
Nov 5, 2014, 3:39:08 PM11/5/14
to jenkinsc...@googlegroups.com

Paul I am confused about your mentioning a "proxy". What is that in this context ? The builds were working fine with force sync but suddenly now it stopped working again with following error

ERROR: Unable to update workspace: com.perforce.p4java.exception.ConnectionException: java.net.SocketException: Connection reset
Finished: FAILURE

pallen@perforce.com (JIRA)

unread,
Nov 6, 2014, 5:59:07 AM11/6/14
to jenkinsc...@googlegroups.com
Paul Allen commented on Bug JENKINS-25364

It was regarding my post on 31st:

Please can you also try this against your server and not via the proxy. It just eliminates one more item.

When you commented "I tried to sync to server directly from command line" I thought you had bypassed the proxy.

The sort of errors you are getting suggests a poor network link or some sort of QoS. If you are using a proxy, then please try editing the Credentials to access the server directly.

pallen@perforce.com (JIRA)

unread,
Nov 11, 2014, 4:47:07 AM11/11/14
to jenkinsc...@googlegroups.com
Paul Allen closed Bug JENKINS-25364 as Cannot Reproduce
Change By: Paul Allen (11/Nov/14 9:46 AM)
Status: Open Closed
Resolution: Cannot Reproduce

laurent.giroud@bhvr.com (JIRA)

unread,
Nov 18, 2014, 3:39:08 PM11/18/14
to jenkinsc...@googlegroups.com

It looks like we are having the same issue here with this particular version (1.10.16).

Whenever we attempt to start a build we get the following output:

Started by user [snip]
Building in workspace [snip]
Connected to server: some.server.com:1666
Connected to client: some_client
SCM Task: cleanup workspace: [snip]
SCM Task: syncing files at change: 74
... sync [local-path/to/]...@74
... force update false
... bypass have false
ERROR: Unable to update workspace: com.perforce.p4java.exception.ConnectionException: For input string: "5869395008"
Finished: FAILURE

This is a very recent issue, builds issued last week using the same workspace worked just fine (polling interval: one minute with very few submits per week so far).

We are connected directly to the p4 server, there are no proxies nor brokers in between.

When issueing the following sync command directly from the machine Jenkins is working on (we build from master) it's clear that this workspace is far from synced:

> p4 -c some_client sync -n //...@74
//path/to/file#1 - added as local/path/to-file
...

I tried launching a build manually earlier today and this resulted in some of the files being synced: taking snapshots of the #have list for that workspace showed new files being added.
(p4 -c some_client //...#have > snap1.txt ; p4 -c some_client //...#have > snap2.txt ; diff --suppress-common-lines snap1.txt snap2.txt).

However the build would not start.
I managed to just clear the issue right now by modifying the workspace spec by suppressing the folder containing the files to sync (which were not needed for this build:
-//path/to/folder-with-files-not-synced/... //client/path/to/folder-with-files-not-synced/...

After modifying that line in the plugin settings the build started just fine after being launched manually.

Note that the problem occurred right after I modified the workspace spec thoroughly.
I went from that configuration:

//main/A/A1/... //some_client/A/A1/...

to this configuration:

//main/A/... //some_client/A/...
-//main/B/... //some_client/B/...
-//main/C/... //some_client/C/...

and the configuration which finally solved the issue was:

//main/A/... //some_client/A/...
-//main/A/A2/... //some_client/A/A2/...       <- the added line, this folder contains a very large amount of files (several GB of data)
-//main/B/... //some_client/B/...
-//main/C/... //some_client/C/...

All these changes were done in the plugin configuration page (no edition from the p4 client).

I hope this helps.

laurent.giroud@bhvr.com (JIRA)

unread,
Nov 18, 2014, 3:47:07 PM11/18/14
to jenkinsc...@googlegroups.com

A quick note about my previous comment:
the second and third workspace configurations last two lines are indeed unnecessary since neither B nor C are under the A folder.
But they were entered as such in the p4 plugin's workspace configuration field.

pallen@perforce.com (JIRA)

unread,
Nov 18, 2014, 4:08:07 PM11/18/14
to jenkinsc...@googlegroups.com
Change By: Paul Allen (18/Nov/14 9:06 PM)
Resolution: Cannot Reproduce
Status: Closed Reopened
Assignee: Paul Allen

pallen@perforce.com (JIRA)

unread,
Nov 18, 2014, 4:10:09 PM11/18/14
to jenkinsc...@googlegroups.com
Paul Allen commented on Bug JENKINS-25364

Is it possible that a second polling event triggered during the sync? It's not clear in the SCM implementation what objects get trampled by reentrant calls.

laurent.giroud@bhvr.com (JIRA)

unread,
Nov 18, 2014, 5:05:08 PM11/18/14
to jenkinsc...@googlegroups.com

Yes, not only possible but extremely likely. When this happened, polling was set to check every minute and builds last more than one hour.
Note however that this never was an issue before yesterday and the workspace configuration change.

Reply all
Reply to author
Forward
0 new messages