Exception error - Caused: java.io.NotSerializableException: org.gitlab.api.GitlabAPI

15 views
Skip to first unread message

knelyo

unread,
May 22, 2019, 4:27:36 PM5/22/19
to Jenkins Users
Greetings team,

   I am getting the error below during the build of a Jenkins pipleline job that only does validation of templates for sensitive data..

   The pipeline was working before but it just stopped working and it reporting the error below...

   The Tech stack version.

    Jenkins  2.164.3
    GitLab   Community Edition 11.3.0
    GitLab plugin. 1.5.12


 One thing i want to mention is that the jenkin is able to check out the git repo in gitlab with out error. and then fails error below.

  One error that is a bit concise is from the open blue ocean plugin " org.gitlab.api.GitlabAPIException: {"message":"403 Forbidden - Your account has been blocked."}

using GIT_SSH to set credentials git
 > git fetch --tags --progress g...@gitlab.XXX.xxxx:SecDevolop/cffft-pipes.git +refs/heads/*:refs/remotes/origin/*
Checking out Revision 2572a10bb1004ecde1bda9cba620c456de80d953 (refs/remotes/origin/master)
 > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
 > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 2572a10bb1004ecde1bda9cba620c456de80d953
Commit message: "Update NewwxxProjJenkinsfile"
[Pipeline] }
[Pipeline] // stage
[Pipeline] withEnv
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Create Project)
[Pipeline] script
[Pipeline] {
[Pipeline] configFileProvider
provisioning config files...
copy managed file [cfSettings] to file:/home/XXXX/workspace/XXXXXn/Create%20CXXXXXX%20Project@tmp/config7454802779566034260tmp
[Pipeline] {
[Pipeline] readJSON
[Pipeline] withCredentials
Masking only exact matches of $token
[Pipeline] {
[Pipeline] }
[Pipeline] }
Deleting 1 temporary files
[Pipeline] }
[Pipeline] // script
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
an exception which occurred:
	in field org.jenkinsci.plugins.pipeline.modeldefinition.withscript.WithScriptScript.script
	in object org.jenkinsci.plugins.pipeline.modeldefinition.agent.impl.LabelScript@3f4586c
	in field groovy.lang.Closure.delegate
	in object org.jenkinsci.plugins.workflow.cps.CpsClosure2@432f2514
	in field groovy.lang.Closure.delegate
	in object org.jenkinsci.plugins.workflow.cps.CpsClosure2@d228ce
	in field org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.closures
	in object org.jenkinsci.plugins.workflow.cps.CpsThreadGroup@27ace6e3
	in object org.jenkinsci.plugins.workflow.cps.CpsThreadGroup@27ace6e3
Caused: java.io.NotSerializableException: org.gitlab.api.GitlabAPI
	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:926)
	at org.jboss.marshalling.river.BlockMarshaller.doWriteObject(BlockMarshaller.java:65)
	at org.jboss.marshalling.river.BlockMarshaller.writeObject(BlockMarshaller.java:56)
	at org.jboss.marshalling.MarshallerObjectOutputStream.writeObjectOverride(MarshallerObjectOutputStream.java:50)
	at org.jboss.marshalling.river.RiverObjectOutputStream.writeObjectOverride(RiverObjectOutputStream.java:179)
	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:344)
	at java.util.LinkedHashMap.internalWriteEntries(LinkedHashMap.java:333)
	at java.util.HashMap.writeObject(HashMap.java:1363)
	at sun.reflect.GeneratedMethodAccessor1147.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.jboss.marshalling.reflect.JDKSpecific$SerMethods.callWriteObject(JDKSpecific.java:156)
	at org.jboss.marshalling.reflect.SerializableClass.callWriteObject(SerializableClass.java:191)
	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1028)
	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1019)
	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:920)
	at org.jboss.marshalling.river.BlockMarshaller.doWriteObject(BlockMarshaller.java:65)
	at org.jboss.marshalling.river.BlockMarshaller.writeObject(BlockMarshaller.java:56)
	at org.jboss.marshalling.MarshallerObjectOutputStream.writeObjectOverride(MarshallerObjectOutputStream.java:50)
	at org.jboss.marshalling.river.RiverObjectOutputStream.writeObjectOverride(RiverObjectOutputStream.java:179)
	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:344)
	at com.cloudbees.groovy.cps.SerializableScript.writeObject(SerializableScript.java:26)
	at sun.reflect.GeneratedMethodAccessor1164.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)

Thanks for you help in advance.

knelyo

unread,
Jun 6, 2019, 2:55:15 PM6/6/19
to Jenkins Users
Issue resolved..

The error was miss leading, the fix was related to user credential in gitlab, A new token of  "API" type was generated in Gitlab and the new token was updated in Jenkins for the same. this steps resolved the issue.

Thanks
Reply all
Reply to author
Forward
0 new messages