Description of problem: If your Jenkins build project name contains a particular character, possible é or ' (single quote), it appears that there's some native IO error with the JVM trying to map this onto a system path. Actual results: java.io.IOException: java.lang.reflect.InvocationTargetException at hudson.Util.resolveSymlink(Util.java:1206) at jenkins.model.PeepholePermalink.updateCache(PeepholePermalink.java:146) at jenkins.model.PeepholePermalink.resolve(PeepholePermalink.java:118) at hudson.model.Job.getLastSuccessfulBuild(Job.java:802) at hudson.maven.AbstractMavenProject.createTransientActions(AbstractMavenProject.java:185) at hudson.maven.MavenModuleSet.createTransientActions(MavenModuleSet.java:448) at hudson.model.AbstractProject.updateTransientActions(AbstractProject.java:712) at hudson.maven.MavenModuleSet.updateTransientActions(MavenModuleSet.java:444) at hudson.model.AbstractProject.doConfigSubmit(AbstractProject.java:755) 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 org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:288) at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:151) at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:90) at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:111) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:677) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:770) at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:241) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:677) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:770) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:583) at org.kohsuke.stapler.Stapler.service(Stapler.java:214) at javax.servlet.http.HttpServlet.service(HttpServlet.java:45) at winstone.ServletConfiguration.execute(ServletConfiguration.java:248) at winstone.RequestDispatcher.forward(RequestDispatcher.java:333) at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:376) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:95) at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:87) at winstone.FilterConfiguration.execute(FilterConfiguration.java:194) at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366) at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48) at winstone.FilterConfiguration.execute(FilterConfiguration.java:194) at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84) at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:124) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:174) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at jenkins.security.ApiTokenFilter.doFilter(ApiTokenFilter.java:64) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249) at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:66) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76) at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164) at winstone.FilterConfiguration.execute(FilterConfiguration.java:194) at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366) at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:50) at winstone.FilterConfiguration.execute(FilterConfiguration.java:194) at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366) at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81) at winstone.FilterConfiguration.execute(FilterConfiguration.java:194) at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366) at winstone.RequestDispatcher.forward(RequestDispatcher.java:331) at winstone.RequestHandlerThread.processRequest(RequestHandlerThread.java:227) at winstone.RequestHandlerThread.run(RequestHandlerThread.java:150) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at hudson.Util.resolveSymlink(Util.java:1187) ... 73 more Caused by: java.nio.file.InvalidPathException: Malformed input or input contains unmappable chacraters: /var/lib/openshift/52dfeb94500446f58b00004c/app-root/data/jobs/Eric's WebProtégé/builds/lastSuccessfulBuild.tmp at sun.nio.fs.UnixPath.encode(UnixPath.java:147) at sun.nio.fs.UnixPath.<init>(UnixPath.java:71) at sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:281) at java.io.File.toPath(File.java:2186) ... 77 more Expected results: Maybe fail to build, but at least try to.
This appears to be a limitation of jenkins itself: http://jenkins-ci.361315.n4.nabble.com/Re-What-characters-are-illegal-to-include-in-job-names-td4678893.html Have you seen this behavior work in a standalone jenkins environment? If so, what version? OpenShift currently uses Jenkins v1.509, but I don't see anything in the current code that would have changed this codepath.
Oh, sorry for the dodgy report then. I've generally used the GitHub plugin in the past, example here: http://54.194.213.207/job/Eric%27s%20WebProt%C3%A9g%C3%A9/ which seems to cope with these characters.
On further analysis this does seem to work in a standalone jenkins install, so there may be something different about our gear environment that doesn't tolerate those characters. I'll dig further.
Interestingly this problem appears togo away if you do a restart of the jenkins cartridge. I'm still investigating, but perhaps you can use that as a workaround for now.
fyi I determined the cause here is a missing LANG=en_US.UTF.8 environment variable, which i'll be adding shortly. In the meantime, if you ssh into the gear and issue a "jenkins/bin/control restart" then you'll restart the process w/ the environment variable, as it exists correctly in the ssh shell. if you do "rhc app restart jenkins" it will still not have it, so the actual workaround requires ssh'ing into the gear. (unless you explicitly add the LANG env variable to your jenkins app)
https://github.com/openshift/origin-server/pull/4578
Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/718326d5835969eefc043ad63929b53e3edf443b Bug 1056666 - Jenkins cartridge InvalidPathException with é or '
It's fixed, verified on devenv_4270, please refer to the following results: 1. Create an app with jenkins-client-1 app rhc app create cphp4 php-5.4 --enable-jenkins 2. Log into the jenkins admin console from https://jenkins-cdm.dev.rhcloud.com/me/configure 3. Create job named "ccy'testé2" 4. Trigger this job build the log messages like below: <-------snip------> FATAL: Could not apply tag jenkins-ccy'test?2-1 hudson.plugins.git.GitException: Could not apply tag jenkins-ccy'test?2-1 at hudson.plugins.git.GitAPI.tag(GitAPI.java:718) at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1230) at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1178) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2387) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:326) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) Caused by: hudson.plugins.git.GitException: Error performing command: git tag -a -f -m Jenkins Build #1 jenkins-ccy'test?2-1 Command "git tag -a -f -m Jenkins Build #1 jenkins-ccy'test?2-1" returned status code 128: fatal: 'jenkins-ccy'test?2-1' is not a valid tag name. at hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:764) at hudson.plugins.git.GitAPI.launchCommand(GitAPI.java:729) at hudson.plugins.git.GitAPI.launchCommand(GitAPI.java:739) at hudson.plugins.git.GitAPI.tag(GitAPI.java:716) ... 11 more Caused by: hudson.plugins.git.GitException: Command "git tag -a -f -m Jenkins Build #1 jenkins-ccy'test?2-1" returned status code 128: fatal: 'jenkins-ccy'test?2-1' is not a valid tag name. at hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:759) ... 14 more