Ask Your Question
0

groovy script failed in Krel_reconfigura-jobs

asked 2017-07-21 10:24:55 -0600

Bo Li gravatar image

Hi,

I was trying to setup a buildfarm for my group. I have ran import_upstream successfully. Then next I triggered "Krel_reconfigure-jobs". It took a lot of time to finish configuring tons of jobs. After this, the job failed when it ran the generated groovy files, complaining unable to resolve imports. The tail of the log is pasted as below.

I was also thinking about write a tutorial about some of the problems I met configuring the buildfarm ( https://gist.github.com/prclibo/90fc9... ). Maybe after I succeed setup the buildfarm I can fiinsh this.

......
18:06:17 Configuration for jobs: Ksrc_uX__zeroconf_avahi_suite__ubuntu_xenial__source, Kbin_uX64__zeroconf_avahi_suite__ubuntu_xenial_amd64__binary
18:06:17 Configuration for jobs: Ksrc_dJ__zeroconf_avahi_suite__debian_jessie__source, Kbin_dJ64__zeroconf_avahi_suite__debian_jessie_amd64__binary
18:06:21 Writing groovy script '/tmp/reconfigure_jobs/reconfigure_jobs.groovy' to reconfigure 4 views and 5704 jobs
18:06:22 + echo # END SECTION
18:06:22 # END SECTION
18:06:23 ERROR: Build step failed with exception
18:06:23 org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
18:06:23 Script1.groovy: 12: unable to resolve class org.apache.xml.serialize.OutputFormat
18:06:23  @ line 12, column 1.
18:06:23    import org.apache.xml.serialize.OutputFormat
18:06:23    ^
18:06:23 
18:06:23 Script1.groovy: 13: unable to resolve class org.apache.xml.serialize.XMLSerializer
18:06:23  @ line 13, column 1.
18:06:23    import org.apache.xml.serialize.XMLSerializer
18:06:23    ^
18:06:23 
18:06:23 Script1.groovy: 1: unable to resolve class difflib.DiffUtils
18:06:23  @ line 1, column 1.
18:06:23    import difflib.DiffUtils
18:06:23    ^
18:06:23 
18:06:23 3 errors
18:06:23 
18:06:23    at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:310)
18:06:23    at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:946)
18:06:23    at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:593)
18:06:23    at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:542)
18:06:23    at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:298)
18:06:23    at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268)
18:06:23    at groovy.lang.GroovyShell.parseClass(GroovyShell.java:688)
18:06:23    at groovy.lang.GroovyShell.parse(GroovyShell.java:700)
18:06:23    at groovy.lang.GroovyShell.parse(GroovyShell.java:736)
18:06:23    at groovy.lang.GroovyShell.parse(GroovyShell.java:727)
18:06:23    at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScript.evaluate(SecureGroovyScript.java:165)
18:06:23    at hudson.plugins.groovy.SystemGroovy.run(SystemGroovy.java:95)
18:06:23    at hudson.plugins.groovy.SystemGroovy.perform(SystemGroovy.java:59)
18:06:23    at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
18:06:23    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
18:06:23    at hudson.model.Build$BuildExecution.build(Build.java:205)
18:06:23    at hudson.model.Build$BuildExecution.doRun(Build.java:162)
18:06:23    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
18:06:23    at hudson.model.Run.execute(Run.java:1728)
18:06 ...
(more)
edit retag flag offensive close merge delete

Comments

Sending e-mails to: ros-buildfarm-testfarm@googlegroups.com
ERROR: Could not connect to SMTP host: localhost, port: 25

please fix this also: disable notification emails for both maintainers and committers in all your *.yaml files in your fork of ros_buildfarm_config ..

gvdhoorn gravatar imagegvdhoorn ( 2017-07-21 11:16:34 -0600 )edit

.. and make sure to update the email addresses listed under the notification_emails keys.

gvdhoorn gravatar imagegvdhoorn ( 2017-07-21 11:17:33 -0600 )edit

@gvdhoorn Yes, thanks for the remind.

Bo Li gravatar imageBo Li ( 2017-07-22 08:16:55 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-07-21 11:37:28 -0600

Dirk Thomas gravatar image

updated 2017-07-21 11:38:58 -0600

According to the error messages you are missing some Java packages. Until recently the buildfarm downloaded e.g. diffutils on demand. But as of https://github.com/ros-infrastructure... the Jenkins Groovy plugin provides that library already.

Your instructions mention that you are using an older version of Jenkins and therefore likely older plugins. You might want to try using the same version as on the ROS buildfarm (currently Jenkins 2.46.2 and Groovy 2.0).

Please also note that there is an active effort to update the buildfarm_deployment to use Xenial instead of Trusty. That upgrade will also move us from Java 7 to Java 8 which will allow us to upgrade to a newer Jenkins version which requires Java 8.

edit flag offensive delete link more

Comments

Thanks for the reply. Switched to Jenkins 2.46.2 and the Groovy plugin is 2.0 but still get the same error. Is there a way to check why Groovy plugin is not downloading the libraries? I checked /var/lib/jenkins/plugins/groovy/WEB-INF/lib and see commons-exec-1.2.jar groovy.jar.

Bo Li gravatar imageBo Li ( 2017-07-22 08:19:23 -0600 )edit

The above issue is solved by following buildfarm_deployment/issues/147 and also downloading apache-xml-xerces.jar. Thanks again for the hint. Then after approving some scripts I reached another error "com.thoughtworks.xstream.mapper.CannotResolveClassException: hudson.plugins.view.dashboard.Dashboa

Bo Li gravatar imageBo Li ( 2017-07-23 05:40:39 -0600 )edit

The full error is updated to the end of the tutorial gist. Just wanna seek help again:)

Bo Li gravatar imageBo Li ( 2017-07-23 09:06:28 -0600 )edit

OK, finally got it worked. Thanks for the answer. The later error requires the dashboard view plugin.

Bo Li gravatar imageBo Li ( 2017-07-23 18:13:38 -0600 )edit

If you provision the machines manually please make sure to include all the plugins and configurations from the buildfarm_deployment repo (in this case https://github.com/ros-infrastructure... ).

Dirk Thomas gravatar imageDirk Thomas ( 2017-07-24 11:04:41 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-07-21 10:24:55 -0600

Seen: 65 times

Last updated: Jul 21 '17