Start up Jenkins from another Windows User Account

1,759 views
Skip to first unread message

Andreas Hetz

unread,
Nov 11, 2016, 6:13:10 AM11/11/16
to Jenkins Users
Hi there,

acutally i have the problem starting up Jenkins from another Windows User Account. 

The last year was started up Jenkins from Windows User Account "A". 
After project responsibilities changed someone else wants to startup Jenkins with User Account "B".

As forseen as soon User Account "B" started up jenkins using Batchfile ( no windows service )
all jobs are gone.

Whats to do for User Account "B" to just overtake the full Jenkins Environment as it is from User Acount "A".

Many Thanks.

Best,
Andreas

jer...@bodycad.com

unread,
Nov 14, 2016, 9:44:46 AM11/14/16
to Jenkins Users
Hi,
Make sure you have the Jenkins workspace and root folder outside the user account where every user can access the Jenkins folder. Inside the Manage Jenkins you can set those path. You copy back you stuff from account A into the new folder and restart Jenkins and it should be able to see them into the new path.

I run it for a different user, the only problem I got is that Jenkins does not launch itself upon machine boot nor it can restart itself after update since it run as non admin user. But I really need it to run as user account and not as full services to get proper environment for 3D rendering unit tests and other mounted drive path.

Jerome

Andreas Hetz

unread,
Nov 14, 2016, 9:51:47 AM11/14/16
to jenkins...@googlegroups.com
Hi Jerome,

the jenkins-Home-directory is already set to a second disk without any touch into windows or user directory. Starting up jenkins i am just calling 

"C:\Program Files\Java\jre1.8.0_102\bin\java" -Xmx3048m -mx1024m -jar jenkins.war

so....

Any new idea?

Best,
Andreas

--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/aJv17furBhs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/538145f2-07f0-4930-bad7-e63d5eae4d9c%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Best,
Andreas 

jer...@bodycad.com

unread,
Nov 16, 2016, 11:51:17 AM11/16/16
to Jenkins Users
my Jenkins managed part is as follow:

Home Directory: c:\Jenkins
Workspace RootDirectory: d:/JenkinsWorkspace/${ITEM_FULL_NAME}
Build Record Root Directory: ${ITEM_ROOTDIR}/builds

Assuming the above:
Your jobs info should be locate into C:/Jenkins/jobs
The system no matter what should them from this emplacement, make sure this folder is accessible by both user. This is THE folder with the jobs configuration and settings. It also contain the jobs results. I successfully exported those and restore them into another Jenkins.

You may want to check the log just to make sure that nothing went wrong with plugin version, etc...
jenkins.err.log
jenkins.out.log

I always use the service, I changed the user of the service. So I always use the jenkins.xml to start the wars, your args seem to be right, the only thing I see into the file that may change something is the env setting:
<env name="JENKINS_HOME" value="%BASE%"/>
My guess is that you need to do the equivalent into your batch file. maybe make sure the env is set properly. Try to print both user environment to see the difference. But make sure to set this variables into the environment before launching:

set JENKINS_HOME="c:\Jenkins"
"C:\Program Files\Java\jre1.8.0_102\bin\java" -Xmx3048m -mx1024m -jar ${JENKINS_HOME}\jenkins.war

Not sure it will change anythiong but worth the try.


Andreas Hetz

unread,
Nov 21, 2016, 9:31:08 AM11/21/16
to jenkins...@googlegroups.com
Dear Jerome,

thank you so much. 

Finally i was able to solve the problem. I followed you instruction and to set the JENKINS_HOME env made it. 

Feel free to contact me any time hetza...@gmail.com if you have questions about your Jenkins issues.

Best,
Andreas

*CLOSED



--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/aJv17furBhs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Best,
Andreas 

Ioannis Moutsatsos

unread,
Nov 22, 2016, 6:52:14 AM11/22/16
to Jenkins Users
Indeed. JENKINS_HOME is the key. If Jenkins does not find this env variable on startup, it will create a new home in the startup user account.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.



--
Best,
Andreas 
Reply all
Reply to author
Forward
0 new messages