# Failed to create a temp file on /var/lib/jenkins/workspace/mysqlbakcup

**URL:** <https://community.jenkins.io/t/failed-to-create-a-temp-file-on-var-lib-jenkins-workspace-mysqlbakcup/3641>\
**Category:** Using Jenkins\
**Tags:** question\
**Created:** [September 5, 2022, 4:45pm UTC](https://community.jenkins.io/t/failed-to-create-a-temp-file-on-var-lib-jenkins-workspace-mysqlbakcup/3641 "2022-09-05T16:45:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![javy](https://avatars.discourse-cdn.com/v4/letter/j/3ec8ea/32.png) [@javy](https://community.jenkins.io/u/javy)\
**Post date:** [September 5, 2022, 4:45pm UTC](https://community.jenkins.io/t/failed-to-create-a-temp-file-on-var-lib-jenkins-workspace-mysqlbakcup/3641/1 "2022-09-05T16:45:38Z")

</div>

i’m new on jenkins  
when i setting new job via Execute Python script, it show failed as below, how to sloved this problem  
please

Running as SYSTEM  
Building in workspace /var/lib/jenkins/workspace/mysqlbakcup  
FATAL: Unable to produce a script file  
java.nio.charset.UnmappableCharacterException: Input length = 1  
at java.base/java.nio.charset.CoderResult.throwException(CoderResult.java:275)  
at java.base/sun.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:306)  
at java.base/sun.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:281)  
at java.base/sun.nio.cs.StreamEncoder.write(StreamEncoder.java:125)  
at java.base/java.io.OutputStreamWriter.write(OutputStreamWriter.java:208)  
at java.base/java.io.BufferedWriter.flushBuffer(BufferedWriter.java:120)  
at java.base/java.io.BufferedWriter.close(BufferedWriter.java:268)  
at hudson.FilePath$CreateTextTempFile.invoke(FilePath.java:1660)  
at hudson.FilePath$CreateTextTempFile.invoke(FilePath.java:1630)  
at hudson.FilePath.act(FilePath.java:1200)  
at hudson.FilePath.act(FilePath.java:1183)  
at hudson.FilePath.createTextTempFile(FilePath.java:1624)  
Caused: java.io.IOException: Failed to create a temp file on /var/lib/jenkins/workspace/mysqlbakcup  
at hudson.FilePath.createTextTempFile(FilePath.java:1626)  
at hudson.tasks.CommandInterpreter.createScriptFile(CommandInterpreter.java:202)  
at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:120)  
at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:92)  
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)  
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:816)  
at hudson.model.Build$BuildExecution.build(Build.java:199)  
at hudson.model.Build$BuildExecution.doRun(Build.java:164)  
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:524)  
at hudson.model.Run.execute(Run.java:1897)  
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)  
at hudson.model.ResourceController.execute(ResourceController.java:101)  
at hudson.model.Executor.run(Executor.java:442)  
Build step ‘Execute Python script’ marked build as failure  
Finished: FAILURE

---

<div class="post-metadata">

**Author:** ![MarkEWaite](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/markewaite/32/20_2.png) [@MarkEWaite](https://community.jenkins.io/u/MarkEWaite)\
**Post date:** [September 5, 2022, 5:53pm UTC](https://community.jenkins.io/t/failed-to-create-a-temp-file-on-var-lib-jenkins-workspace-mysqlbakcup/3641/2 "2022-09-05T17:53:05Z")

</div>

> [@javy](#):
>
> java.nio.charset.UnmappableCharacterException

I’ve seen that exception when I was running the Jenkins agent or the Jenkins controller in a locale that did not support the character I was trying to write. For example, if a file name or a directory name included a non-ASCII character and I was running in a locale that only supported ASCII (like the ‘C’ locale), then that exception would be reported.

Use the command `locale -a` to report the locale running on that agent. If it is not a UTF-8 capable locale, then reconfigure the agent startup environment to set the locale to a UTF-8 capable locale.
