Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins Slave - The specified working directory should be fully accessible to the remoting executable RWX

I am getting below error while launching a slave node from jenkins master.

Exception in thread "main" java.io.IOException: The specified working directory should be fully accessible to the remoting executable (RWX):

[07/07/21 18:10:40] [SSH] Starting agent process: cd "/home/user" && /usr/java/jdk1.8.0_131/bin/java  -jar remoting.jar -workDir /home/user

Exception in thread "main" java.io.IOException: The specified working directory should be fully accessible to the remoting executable (RWX): /home/user

at org.jenkinsci.remoting.engine.WorkDirManager.verifyDirectory(WorkDirManager.java:249)
    at org.jenkinsci.remoting.engine.WorkDirManager.initializeWorkDir(WorkDirManager.java:201)
    at hudson.remoting.Launcher.run(Launcher.java:322)
    at hudson.remoting.Launcher.main(Launcher.java:298)
Slave JVM has terminated. Exit code=1
[07/07/21 18:10:40] Launch failed - cleaning up connection
[07/07/21 18:10:40] [SSH] Connection closed.

I tried some solutions;

  • User permissions and file permissions provided
  • Java home is correctly updated
  • Slave configuration is also fine

Slave launch screenshot slave-logs-picture

Please help me to know if I am missing anything important in my slave setting before launching.

like image 308
Nabeel Shaikh Avatar asked Jan 18 '26 22:01

Nabeel Shaikh


1 Answers

Solution for this issues was very easy, the problem was I mistakenly created a user from root with root's permissions set on /home/user directory.

changed the users home directory permission to username:group and it worked fine.

sudo chmod -R user:groupid /home/user 

or

sudo chmod -R 777 user:groupid /directory-path

Please note this user has been used on slave machine configuration of Jenkins so the permissions should be sufficient to access workspace.

like image 55
Nabeel Shaikh Avatar answered Jan 21 '26 15:01

Nabeel Shaikh