Issue with Jenkins on CentOS 7 creating symbolic link to Windows Share using CIFS

174 views
Skip to first unread message

Kosta Tenedios

unread,
Oct 31, 2014, 1:32:16 AM10/31/14
to jenkins...@googlegroups.com

To whom it may concern,

 

I have recently set up a Jenkins instance running on CentOS 7. I have also mounted a Windows Share to this box and am able to read and write to it. I have then configured the “Build Record Root Directory” parameter to use the mounted Windows Share (/mnt/qsrfs/builds/Jenkins/${ITEM_FULLNAME}).

 

The issue I am having is that for every build that rights to this location it firstly creates a time-stamped directory and then attempts to create a symbolic link between the build number and the time-stamped directory. This results in the builds reporting the following error:

 

Started by user Kosta Tenedios

ln 2014-10-31_15-17-05 /mnt/qsrfs/builds/Jenkins/NVivo_11_Win_NIGHTLY/36 failed

java.nio.file.FileSystemException: /mnt/qsrfs/builds/Jenkins/NVivo_11_Win_NIGHTLY/36: Operation not supported

                at sun.nio.fs.UnixException.translateToIOException(UnixException.java:91)

                at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)

                at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)

                at sun.nio.fs.UnixFileSystemProvider.createSymbolicLink(UnixFileSystemProvider.java:456)

                at java.nio.file.Files.createSymbolicLink(Files.java:996)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                at java.lang.reflect.Method.invoke(Method.java:606)

                at hudson.Util.createSymlinkJava7(Util.java:1202)

                at hudson.Util.createSymlink(Util.java:1118)

                at hudson.model.Run.updateSymlinks(Run.java:1845)

                at hudson.model.Run.execute(Run.java:1757)

                at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)

                at hudson.model.ResourceController.execute(ResourceController.java:89)

                at hudson.model.Executor.run(Executor.java:240)

 

Note however that this does not cause the build to fail (thank goodness). I have tried to rectify this by specifying the -Dhudson.Util.noSymLink=true and -Dhudson.Util.symlinkEscapeHatch=true in the JENKINS_JAVA_OPTIONS variable in /etc/sysconfig/Jenkins and have restarted the Jenkins daemon but subsequent builds still report this error. Oddly enough though if you query System Information in Jenkins I see these settings under System Properties.

 

So I have two questions about this issue:

1.       Is it possible to alter the behaviour of Jenkins when creating symbolic links, or perhaps ask Jenkins to not create symbolic links?

2.       Are there any samba/cifs options that I need to specify to stop these errors from occurring?

 

Regards, Kosta Tenedios.

Jayaram Prabhu Durairaj

unread,
Aug 6, 2015, 4:41:07 PM8/6/15
to Jenkins Users
Did anyone find a solution ?

Thanks
Jay
Reply all
Reply to author
Forward
0 new messages