Error: Opening Robot Framework log failed Error: Opening Robot Framework log failed python python

Error: Opening Robot Framework log failed


Answer is explained at Jenkins issue tracking system: https://issues.jenkins-ci.org/browse/JENKINS-32118

To resolve your problem you must :

  1. Connect on your Jenkins URL (http://[IP]:8080/)
  2. Click on Manage Jenkins from left side panel.
  3. Click on Script Console
  4. Copy this into the field
System.setProperty("hudson.model.DirectoryBrowserSupport.CSP","sandbox allow-scripts; default-src 'none'; img-src 'self' data: ; style-src 'self' 'unsafe-inline' data: ; script-src 'self' 'unsafe-inline' 'unsafe-eval' ;")
  1. Click on Run button.

  2. Execute your Jenkins build.


Running below code in Script Console of Manage Jenkins will work

System.setProperty("hudson.model.DirectoryBrowserSupport.CSP","sandbox allow-scripts; default-src 'none'; img-src 'self' data: ; style-src 'self' 'unsafe-inline' data: ; script-src 'self' 'unsafe-inline' 'unsafe-eval' ;")

But whenever you start Jenkins then you have to execute this every time. Instead of this if you use this when you are starting Jenkins by using of batch file with below code then it will be better than this process

java -Dhudson.model.DirectoryBrowserSupport.CSP="sandbox allow-scripts; default-src 'none'; img-src 'self' data: ; style-src 'self' 'unsafe-inline' data: ; script-src 'self' 'unsafe-inline' 'unsafe-eval' ;" -jar jenkins.war


I managed to make it work by editing the file /etc/sysconfig/jenkins and adding -Dhudson.model.DirectoryBrowserSupport.CSP=to the JENKINS_JAVA_OPTIONS setting. On my installation, the setting looks like

JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true -Dhudson.model.DirectoryBrowserSupport.CSP= "

Then restart jenkins

service jenkins restart

Sources

https://wiki.jenkins-ci.org/display/JENKINS/Configuring+Content+Security+Policy

System properties management