Jenkins is launched with JENKINS_HOME set to /home/jenkins, yet for some reason that I can't find, the p4 plugin is complaining about /var/lib/jenkins.
Jul 20, 2017 4:11:28 PM org.jenkinsci.plugins.p4.client.ConnectionHelper connect SEVERE: P4: Unable to login: com.perforce.p4java.exception.ConnectionException: com.perforce.p4java.exception.ConfigException: java.nio.file.AccessDeniedException: /var/lib/jenkins Jul 20, 2017 4:11:28 PM org.jenkinsci.plugins.p4.client.ConnectionHelper <init> INFO: P4: Unable to login: com.perforce.p4java.exception.ConnectionException: com.perforce.p4java.exception.ConfigException: java.nio.file.AccessDeniedException: /var/lib/jenkins Jul 20, 2017 4:11:28 PM org.jenkinsci.plugins.p4.client.ConnectionHelper connectionRetry SEVERE: P4: Connection retry: 1 Jul 20, 2017 4:11:28 PM org.jenkinsci.plugins.p4.client.ConnectionHelper <init> INFO: P4: Connection retry: 1 Jul 20, 2017 4:11:31 PM org.jenkinsci.plugins.p4.client.ConnectionHelper connectionRetry SEVERE: P4: Connection retry giving up...
If I make /var/lib/jenkins a symlink to /home/jenkins, then the error changes to
SEVERE: P4: Unable to login: com.perforce.p4java.exception.ConnectionException: com.perforce.p4java.exception.ConfigException: java.nio.file.FileAlreadyExistsException: /var/lib/jenkins
Jenkins is launched as :
/usr/java/jdk1.8.0_141/bin/java -Dcom.sun.akuma.Daemon=daemonized -Djava.awt.headless=true -DJENKINS_HOME=/home/jenkins -jar /usr/lib/jenkins/jenkins.war --logfile=/var/log/jenkins/jenkins.log --webroot=/var/cache/jenkins/war --daemon --httpPort=8080 --debug=10 --handlerCountMax=100 --handlerCountMaxIdle=20