After rebooting Jenkins in the Dashboard, next to the assembly, it says not built

Hello, a question about Jenkins server:

  • I start the server on Windows cmd file:
cd C:\Program Files\Jenkins
java -jar jenkins.war
pause
  • setting up build with WebdriverIO
  • I run the assembly everything works shows the status and time of the assembly
  • I restart the server and all the build states are reset not built

Is it possible to start the server and pick up all the states of previously passed assemblies?
also, for some reason, periodically for different jobs I have more than 10 of them, even without restarting the server, the state of the assemblies always flies randomly how to overcome this I don’t understand, please tell me.

thats surprising, is there anything in the error logs about not having permissions to write to the disk? C:\Program Files is pretty locked down, maybe explicitly set the JENKINS_HOME env variable to a location that is safe to write to

1 Like

Thanks for the reply I will try your advice.
Today it happened again, although yesterday I did tests 2022-10-26_12-51-50
As far as I can tell, you’re right about folder permissions my System Log:

[1_ #6] found #5 as previous completed, non-aborted build
окт. 25, 2022 10:14:22 AM SEVERE hudson.model.Run execute

Failed to save build record
java.lang.reflect.InaccessibleObjectException: Unable to make field private java.lang.Object java.lang.ref.Reference.referent accessible: module java.base does not "opens java.lang.ref" to unnamed module @1be2019a
	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
	at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:178)
	at java.base/java.lang.reflect.Field.setAccessible(Field.java:172)
	at com.thoughtworks.xstream.converters.reflection.FieldDictionary.buildDictionaryEntryForClass(FieldDictionary.java:176)
	at com.thoughtworks.xstream.converters.reflection.FieldDictionary.buildMap(FieldDictionary.java:142)
	at com.thoughtworks.xstream.converters.reflection.FieldDictionary.fieldsFor(FieldDictionary.java:80)
	at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:167)
	at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:208)
	at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:165)
	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:59)
	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:83)
	at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:285)
	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:272)
Caused: java.lang.RuntimeException: Failed to serialize ru.yandex.qatools.allure.jenkins.AllureReportBuildAction#buildSummary for class ru.yandex.qatools.allure.jenkins.AllureReportBuildAction
	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:276)
	at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:243)
	at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:174)
	at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:228)
	at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:165)
	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:59)
	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:44)
	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:87)
	at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeBareItem(AbstractCollectionConverter.java:94)
	at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:66)
	at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeCompleteItem(AbstractCollectionConverter.java:81)
	at com.thoughtworks.xstream.converters.collections.CollectionConverter.marshal(CollectionConverter.java:75)
	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:59)
	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:83)
	at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:285)
	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:272)
Caused: java.lang.RuntimeException: Failed to serialize hudson.model.Actionable#actions for class hudson.model.FreeStyleBuild
	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:276)
	at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:243)
	at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:174)
	at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:228)
	at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:165)
	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:59)
	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:44)
	at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:83)
	at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37)
	at com.thoughtworks.xstream.XStream.marshal(XStream.java:1266)
	at com.thoughtworks.xstream.XStream.marshal(XStream.java:1255)
	at com.thoughtworks.xstream.XStream.toXML(XStream.java:1228)
	at hudson.XmlFile.write(XmlFile.java:213)
Caused: java.io.IOException
	at hudson.XmlFile.write(XmlFile.java:220)
	at hudson.model.Run.save(Run.java:2070)
	at hudson.model.Run.execute(Run.java:1956)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
	at hudson.model.ResourceController.execute(ResourceController.java:107)
	at hudson.model.Executor.run(Executor.java:449)
1 Like

Maybe the problem is in my start method java -jar jenkins.war in that case the project is here C:\Administrator\.jenkins although in the file jenkins.xml other path indicated JENKINS_HOME C:\ProgramData\.jenkins.
How do I do with such a launch java -jar jenkins.war specify the path to the home directory?

A bug in Allure, it should not have a serializable field of type WeakReference, that makes no sense.

Can you please tell me how to solve this problem?

I would recommend contacting the maintainers or https://qameta.io/ for help, there’s not really a lot we can suggest you do to work around a code error.

1 Like

It seems that the problem was in the Java version, I had 17 and it was not supported earlier by Jenkins at the moment there is no problem as it was fixed Fix problem with WeakReference on j17 by vbragin · Pull Request #316 · jenkinsci/allure-plugin · GitHub