[JIRA] (JENKINS-45712) p4 credentials fail, can't write .p4tickets file

6 views
Skip to first unread message

vbier@java.net (JIRA)

unread,
Jun 7, 2018, 1:44:02 AM6/7/18
to jenkinsc...@googlegroups.com
vbier commented on Bug JENKINS-45712
 
Re: p4 credentials fail, can't write .p4tickets file

I can confirm Joel Brown's workaround. Adding "-Duser.home=/home/jenkins" to the JENKINS_JAVA_OPTIONS in /etc/sysconfig/jenkins for linux installations works just fine. Thank you.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

wbasu@perforce.com (JIRA)

unread,
Jun 7, 2018, 9:40:02 AM6/7/18
to jenkinsc...@googlegroups.com
W Basu updated an issue
 
Jenkins / Bug JENKINS-45712
Change By: W Basu
Labels: P4_SUPPORT

kwirth@perforce.com (JIRA)

unread,
Sep 26, 2018, 6:57:04 AM9/26/18
to jenkinsc...@googlegroups.com
Karl Wirth closed an issue as Fixed
 

Based on Pauls comments about this being related to Jenkins and the fact that there is a workaround, I am closing this for now.

 

Please feel free to reopen this if you think it was unfairly closed.

Change By: Karl Wirth
Status: Open Closed
Resolution: Fixed
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

dantran@gmail.com (JIRA)

unread,
Dec 21, 2018, 1:05:02 PM12/21/18
to jenkinsc...@googlegroups.com
dan tran reopened an issue
 

I am seeing very similar issue running p4sync inside docker

 

    [Pipeline] p4sync 09:56:43 ... p4 client -o xxxx-sandbox-81 +

    09:56:43 ... p4 info +

    09:56:44 ... p4 info +

    09:56:44 ... p4 client -i +

    09:56:44 ... View: +

    09:56:44 ... p4 counter change +

    09:56:44 ... p4 changes -m1 -ssubmitted //vproxy-sandbox-81/... +

    09:56:44 Building on Node: jd04 P4: Unable to login:      com.perforce.p4java.exception.ConnectionException: com.perforce.p4java.exception.ConfigException: java.nio.file.FileSystemException: /emc/build/.p4tickets.lck: Read-only file system P4: Connection retry: 1

Change By: dan tran
Resolution: Fixed
Status: Closed Reopened

dantran@gmail.com (JIRA)

unread,
Dec 21, 2018, 1:07:02 PM12/21/18
to jenkinsc...@googlegroups.com
I am seeing very similar issue running p4sync inside docker

 


    [Pipeline] p4sync *09:56:43* ... p4 client -o xxxx-sandbox-81 +

    *09:56:43* ... p4 info +

    *09:56:44* ... p4 info +

    *09:56:44* ... p4 client -i +

    *09:56:44* ... View: +

    *09:56:44* ... p4 counter change +

    *09:56:44* ... p4 changes -m1 -ssubmitted //vproxy-sandbox-81/... +

    *09:56:44* Building on Node: jd04 P4: Unable to login:      com.perforce.p4java.exception.ConnectionException: com.perforce.p4java.exception.ConfigException: java.nio.file.FileSystemException: / emc xxx /build/.p4tickets.lck: Read-only file system P4: Connection retry: 1

/xxx/build is home directly the build user, and it does have write access

dantran@gmail.com (JIRA)

unread,
Dec 21, 2018, 1:29:05 PM12/21/18
to jenkinsc...@googlegroups.com
dan tran edited a comment on Bug JENKINS-45712
I am seeing very similar issue running p4sync inside docker

    [Pipeline] p4sync *09:56:43* ... p4 client -o xxxx-sandbox-81 +
    *09:56:43* ... p4 info +
    *09:56:44* ... p4 info +
    *09:56:44* ... p4 client -i +
    *09:56:44* ... View: +
    *09:56:44* ... p4 counter change +
    *09:56:44* ... p4 changes -m1 -ssubmitted //vproxy-sandbox-81/... +
    *09:56:44* Building on Node: jd04 P4: Unable to login:      com.perforce.p4java.exception.ConnectionException: com.perforce.p4java.exception.ConfigException: java.nio.file.FileSystemException: /xxx/build/.p4tickets.lck: Read-only file system P4: Connection retry: 1


/xxx/build is home directly the build user, and it does have write access

The work around is not suitable for us since we have not admin access to th esystem

can we do it inside pipeline groovy script?

dantran@gmail.com (JIRA)

unread,
Dec 21, 2018, 2:48:02 PM12/21/18
to jenkinsc...@googlegroups.com
dan tran edited a comment on Bug JENKINS-45712
I am seeing very similar issue running p4sync inside docker


    [Pipeline] p4sync *09:56:43* ... p4 client -o xxxx-sandbox-81 +
    *09:56:43* ... p4 info +
    *09:56:44* ... p4 info +
    *09:56:44* ... p4 client -i +
    *09:56:44* ... View: +
    *09:56:44* ... p4 counter change +
    *09:56:44* ... p4 changes -m1 -ssubmitted //vproxy-sandbox-81/... +
    *09:56:44* Building on Node: jd04 P4: Unable to login:      com.perforce.p4java.exception.ConnectionException: com.perforce.p4java.exception.ConfigException: java.nio.file.FileSystemException: /xxx/build/.p4tickets.lck: Read-only file system P4: Connection retry: 1

/xxx/build is home directly the build user, and it does have write access

The work around is not suitable for us since we have not no admin access to th esystem


can we do it inside pipeline groovy script before calling p4sync ?

dantran@gmail.com (JIRA)

unread,
Dec 21, 2018, 3:34:03 PM12/21/18
to jenkinsc...@googlegroups.com
dan tran commented on Bug JENKINS-45712

It turns out, p4sync was invoked outside of docker where home directory is marked as readonly for our system admin. Now i need to to figure out why my jenkins pipeline doing so.

let's close this again

dantran@gmail.com (JIRA)

unread,
Dec 21, 2018, 3:35:01 PM12/21/18
to jenkinsc...@googlegroups.com
Change By: dan tran
Status: Reopened Fixed but Unreleased
Resolution: Won't Fix

pallen@perforce.com (JIRA)

unread,
Jan 7, 2019, 5:35:02 AM1/7/19
to jenkinsc...@googlegroups.com
Paul Allen commented on Bug JENKINS-45712
 
Re: p4 credentials fail, can't write .p4tickets file

Hi Dan, thank you for the update. 

I'm starting to do more investigation and testing around Docker usage; I presume that you are syncing files to a volume outside of docker container.  Do you know what type of mount ('bind', 'mount' or 'tmpfs')?  I was also wondering if you 'reuse' the volume with 'AutoClean' or 'SyncOnly' options to help reduce the sync time?

pallen@perforce.com (JIRA)

unread,
Jan 17, 2019, 10:11:05 AM1/17/19
to jenkinsc...@googlegroups.com
Paul Allen closed an issue as Won't Fix
 
Change By: Paul Allen
Status: Reopened Closed

pallen@perforce.com (JIRA)

unread,
Jan 17, 2019, 10:11:05 AM1/17/19
to jenkinsc...@googlegroups.com

dantran@gmail.com (JIRA)

unread,
Jan 17, 2019, 11:26:01 AM1/17/19
to jenkinsc...@googlegroups.com
dan tran edited a comment on Bug JENKINS-45712
It turns out,  p4sync was invoked outside of docker where home directory is marked as readonly for by our system admin. Now i need to to figure out why my jenkins pipeline doing so.


let's close this again

dantran@gmail.com (JIRA)

unread,
Jan 17, 2019, 1:42:01 PM1/17/19
to jenkinsc...@googlegroups.com
dan tran commented on Bug JENKINS-45712

Hi Allen, we just started dockerizing Perforce build with docker host has /var/lib/docker mounted on different volume an a fast SAN storage

here is our p4sync

p4sync charset: 'none', credential: 'perforce-xxxxx', format: "${clientName}", populate: forceClean(have: true, modtime: false, parallel: [enable: false, minbytes: '1024', minfiles: '1', threads: '4'], pin: '', quiet: true, replace: true, tidy: false), source: depotSource(depot)

kierzo@kierzo.com (JIRA)

unread,
May 17, 2019, 5:48:03 AM5/17/19
to jenkinsc...@googlegroups.com

Just in case this saves some people some time.... I was using the bitinami jenkins docker image, as per comments above I added this enviroment lines to my docker-compose.yml which fixed this for me....

It should be the value thats in jenkins at Manage Jenkins -> Configure Sytem -> Home directory

environment:
  - 'JAVA_OPTS=-Duser.home=/opt/bitnami/jenkins/jenkins_home'

 

pallen@perforce.com (JIRA)

unread,
May 20, 2019, 4:59:02 AM5/20/19
to jenkinsc...@googlegroups.com

Thank you.  A great tip; I think we should add that into the documentation, just need to think of a good location.

kwirth@perforce.com (JIRA)

unread,
May 22, 2019, 12:05:02 PM5/22/19
to jenkinsc...@googlegroups.com
Karl Wirth updated an issue
 
Change By: Karl Wirth
Labels: P4_SUPPORT P4_B
Reply all
Reply to author
Forward
0 new messages