While working with jenkins multibranch pipeline, the build number automatically (silently) reset itself back to 1 and dropped all other build history up until that point.
In the syslog I see no evidence of updateNextBuildNumber being run to set it back to 1.
The only thing different about the specific branch of the multipipe that got reset back to one was that I had manually set the build number high (1300) when I created the pipeline due to version tagging collisions from an old build.
Has anyone experienced this bug? If so any idea what happened? This cannot happen since it will overwrite production build numbers.
EDIT: I am seeing errors about unauthorized people attempting to make REST API calls from bulgaria and failure to register webhooks on the multibranch pipeline.
EDIT2: Here is a deduplicated document of all errors and warnings encountered in the 3 day window the reset could have happned. The full tracebacks have been removed for brevity.
Dec 10, 2017 9:33:31 AM hudson.init.impl.InstallUncaughtExceptionHandler$DefaultUncaughtExceptionHandler uncaughtException SEVERE: A thread (TCP agent connection handler #41 with /5.188.10.105:41480/70225) died unexpectedly due to an uncaught exception, this may leave your Jenkins in a bad way and is usually indicative of a bug in the code. java.lang.SecurityException: Rejected: sun.reflect.annotation.AnnotationInvocationHandler Dec 10, 2017 1:23:47 PM hudson.remoting.SynchronousCommandTransport$ReaderThread run SEVERE: I/O error in channel HTTP full-duplex channel 093ea142-17d1-4aa3-b57c-98899dfb7964 hudson.remoting.DiagnosedStreamCorruptionException Read back: 0xac 0xed 0x00 0x05 'sr' 0x00 '/org.apache.commons.collections.map.ReferenceMap' 0x15 0x94 0xca 0x03 0x98 'I' 0x08 0xd7 0x03 0x00 0x00 'xpw' 0x11 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x01 0x00 '?@' 0x00 0x00 0x00 0x00 0x00 0x10 'sr' 0x00 '(java.util.concurrent.CopyOnWriteArraySetK' 0xbd 0xd0 0x92 0x90 0x15 'i' 0xd7 0x02 0x00 0x01 'L' 0x00 0x02 'alt' 0x00 '+Ljava/util/concurrent/CopyOnWriteArrayList;xpsr' 0x00 ')java.util.concurrent.CopyOnWriteArrayListx]' 0x9f 0xd5 'F' 0xab 0x90 0xc3 0x03 0x00 0x00 'xpw' 0x04 0x00 0x00 0x00 0x02 'sr' 0x00 '*java.util.concurrent.ConcurrentSkipListSet' 0xdd 0x98 'Py' 0xbd 0xcf 0xf1 '[' 0x02 0x00 0x01 'L' 0x00 0x01 'mt' 0x00 '-Ljava/util/concurrent/ConcurrentNavigableMap;xpsr' 0x00 '*java.util.concurrent.ConcurrentSkipListMap' 0x88 'Fu' 0xae 0x06 0x11 'F' 0xa7 0x03 0x00 0x01 'L' 0x00 0x0a 'comparatort' 0x00 0x16 'Ljava/util/Comparator;xppsr' 0x00 0x1a 'java.security.SignedObject' 0x09 0xff 0xbd 'h*<' 0xd5 0xff 0x02 0x00 0x03 '[' 0x00 0x07 'contentt' 0x00 0x02 '[B[' 0x00 0x09 'signatureq' 0x00 '~' 0x00 0x0e 'L' 0x00 0x0c 'thealgorithmt' 0x00 0x12 'Ljava/lang/String;' Read ahead: 'xpur' 0x00 0x02 '[B' 0xac 0xf3 0x17 0xf8 0x06 0x08 'T' 0xe0 0x02 0x00 0x00 'xp' 0x00 0x00 0x05 0x09 0xac 0xed 0x00 0x05 'sr' 0x00 0x11 'java.util.HashSet' 0xba 'D' 0x85 0x95 0x96 0xb8 0xb7 '4' 0x03 0x00 0x00 'xpw' 0x0c 0x00 0x00 0x00 0x02 '?@' 0x00 0x00 0x00 0x00 0x00 0x01 'sr' 0x00 '4org.apache.commons.collections.keyvalue.TiedMapEntry' 0x8a 0xad 0xd2 0x9b '9' 0xc1 0x1f 0xdb 0x02 0x00 0x02 'L' 0x00 0x03 'keyt' 0x00 0x12 'Ljava/lang/Object;L' 0x00 0x03 'mapt' 0x00 0x0f 'Ljava/util/Map;xpt' 0x00 0x03 'foosr' 0x00 '*org.apache.commons.collections.map.LazyMapn' 0xe5 0x94 0x82 0x9e 'y' 0x10 0x94 0x03 0x00 0x01 'L' 0x00 0x07 'factoryt' 0x00 ',Lorg/apache/commons/collections/Transformer;xpsr' 0x00 ':org.apache.commons.collections.functors.ChainedTransformer0' 0xc7 0x97 0xec '(z' 0x97 0x04 0x02 0x00 0x01 '[' 0x00 0x0d 'iTransformerst' 0x00 '-[Lorg/apache/commons/collections/Transformer;xpur' 0x00 '-[Lorg.apache.commons.collections.Transformer;' 0xbd 'V*' 0xf1 0xd8 '4' 0x18 0x99 0x02 0x00 0x00 'xp' 0x00 0x00 0x00 0x05 'sr' 0x00 ';org.apache.commons.collections.functors.ConstantTransformerXv' 0x90 0x11 'A' 0x02 0xb1 0x94 0x02 0x00 0x01 'L' 0x00 0x09 'iConstantq' 0x00 '~' 0x00 0x03 'xpvr' 0x00 0x11 'java.lang.Runtime' 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 'xpsr' 0x00 ':org.apache.commons.collections.functors.InvokerTransformer' 0x87 0xe8 0xff 'k{|' 0xce '8' 0x02 0x00 0x03 '[' 0x00 0x05 'iArgst' 0x00 0x13 '[Ljava/lang/Object;L' 0x00 0x0b 'iMethodNamet' 0x00 0x12 'Ljava/lang/String;[' 0x00 0x0b 'iParamTypest' 0x00 0x12 '[Ljava/lang/Class;xpur' 0x00 0x13 '[Ljava.lang.Object;' 0x90 0xce 'X' 0x9f 0x10 's)l' 0x02 0x00 0x00 'xp' 0x00 0x00 0x00 0x02 't' 0x00 0x0a 'getRuntimeur' 0x00 0x12 '[Ljava.lang.Class;' 0xab 0x16 0xd7 0xae 0xcb 0xcd 'Z' 0x99 0x02 0x00 0x00 'xp' 0x00 0x00 0x00 0x00 't' 0x00 0x09 'getMethoduq' 0x00 '~' 0x00 0x1b 0x00 0x00 0x00 0x02 'vr' 0x00 0x10 'java.lang.String' 0xa0 0xf0 0xa4 '8z;' 0xb3 'B' 0x02 0x00 0x00 'xpvq' 0x00 '~' 0x00 0x1b 'sq' 0x00 '~' 0x00 0x13 'uq' 0x00 '~' 0x00 0x18 0x00 0x00 0x00 0x02 'puq' 0x00 '~' 0x00 0x18 0x00 0x00 0x00 0x00 't' 0x00 0x06 'invokeuq' 0x00 '~' 0x00 0x1b 0x00 0x00 0x00 0x02 'vr' 0x00 0x10 'java.lang.Object' 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 'xpvq' 0x00 '~' 0x00 0x18 'sq' 0x00 '~' 0x00 0x13 'ur' 0x00 0x13 '[Ljava.lang.String;' 0xad 0xd2 'V' 0xe7 0xe9 0x1d '{G' 0x02 0x00 0x00 'xp' 0x00 0x00 0x00 0x01 't' 0x00 0x10 'rm -f /tmp/.64/*t' 0x00 0x04 'execuq' 0x00 '~' 0x00 0x1b 0x00 0x00 0x00 0x01 'q' 0x00 '~' 0x00 ' sq' 0x00 '~' 0x00 0x0f 'sr' 0x00 0x11 'java.lang.Integer' 0x12 0xe2 0xa0 0xa4 0xf7 0x81 0x87 '8' 0x02 0x00 0x01 'I' 0x00 0x05 'valuexr' 0x00 0x10 'java.lang.Number' 0x86 0xac 0x95 0x1d 0x0b 0x94 0xe0 0x8b 0x02 0x00 0x00 'xp' 0x00 0x00 0x00 0x01 'sr' 0x00 0x11 'java.util.HashMap' 0x05 0x07 0xda 0xc1 0xc3 0x16 '`' 0xd1 0x03 0x00 0x02 'F' 0x00 0x0a 'loadFactorI' 0x00 0x09 'thresholdxp?@' 0x00 0x00 0x00 0x00 0x00 0x00 'w' 0x08 0x00 0x00 0x00 0x10 0x00 0x00 0x00 0x00 'xxxuq' 0x00 '~' 0x00 0x11 0x00 0x00 0x00 '.0,' 0x02 0x14 '=' 0x14 'a~' 0xe1 0xe8 0x82 0xc9 '~' 0x92 0xd9 0xb9 'dy,' 0xd9 0x13 'H' 0x96 '+' 0x02 0x14 'j' 0xf6 '=' 0x9d 0x97 '.' 0x1f 0x13 0xf5 'h' 0x09 0xeb '}' 0x91 '4' 0xf2 0x97 0x1a 0x05 0xfe 't' 0x00 0x03 'DSAsr' 0x00 0x11 'java.lang.Boolean' 0xcd ' r' 0x80 0xd5 0x9c 0xfa 0xee 0x02 0x00 0x01 'Z' 0x00 0x05 'valuexp' 0x01 'pxsr' 0x00 '1org.apache.commons.collections.set.ListOrderedSet' 0xfc 0xd3 0x9e 0xf6 0xfa 0x1c 0xed 'S' 0x02 0x00 0x01 'L' 0x00 0x08 'setOrdert' 0x00 0x10 'Ljava/util/List;xr' 0x00 'Corg.apache.commons.collections.set.AbstractSerializableSetDecorator' 0x11 0x0f 0xf4 'k' 0x96 0x17 0x0e 0x1b 0x03 0x00 0x00 'xpsr' 0x00 0x15 'net.sf.json.JSONArray]' 0x01 'To\(r' 0xd2 0x02 0x00 0x02 'Z' 0x00 0x0e 'expandElementsL' 0x00 0x08 'elementsq' 0x00 '~' 0x00 0x18 'xr' 0x00 0x18 'net.sf.json.AbstractJSON' 0xe8 0x8a 0x13 0xf4 0xf6 0x9b '?' 0x82 0x02 0x00 0x00 'xp' 0x00 'sr' 0x00 0x13 'java.util.ArrayListx' 0x81 0xd2 0x1d 0x99 0xc7 'a' 0x9d 0x03 0x00 0x01 'I' 0x00 0x04 'sizexp' 0x00 0x00 0x00 0x01 'w' 0x04 0x00 0x00 0x00 0x01 't' 0x00 0x04 'asdfxxsq' 0x00 '~' 0x00 0x1e 0x00 0x00 0x00 0x00 'w' 0x04 0x00 0x00 0x00 0x00 'xxq' 0x00 '~' 0x00 ' sq' 0x00 '~' 0x00 0x02 'sq' 0x00 '~' 0x00 0x05 'w' 0x04 0x00 0x00 0x00 0x02 'q' 0x00 '~' 0x00 0x1a 'q' 0x00 '~' 0x00 0x09 'xq' 0x00 '~' 0x00 ' px' Dec 10, 2017 6:47:41 PM org.eclipse.jetty.util.log.JavaUtilLog warn WARNING: Illegal character 0x3 in state=START for buffer HeapByteBuffer@5a0cb7be[p=1,l=42,c=16384,r=41]={\x03<<<\x00\x00*%\xE0\x00\x00\x00\x00\x00Cookie:...=Test\r\n\x01\x00\x08\x00\x03\x00\x00\x00>>>80\r\nConnection: k...to add resource} Dec 10, 2017 6:47:41 PM org.eclipse.jetty.util.log.JavaUtilLog warn WARNING: badMessage: 400 Illegal character 0x3 for HttpChannelOverHttp@54cb428f{r=0,c=false,a=IDLE,uri=} Dec 10, 2017 6:47:42 PM org.eclipse.jetty.util.log.JavaUtilLog warn WARNING: Illegal character 0x3 in state=START for buffer HeapByteBuffer@50f4dcce[p=1,l=42,c=16384,r=41]={\x03<<<\x00\x00*%\xE0\x00\x00\x00\x00\x00Cookie:...=Test\r\n\x01\x00\x08\x00\x03\x00\x00\x00>>>s.map.ReferenceMa...ns.slack.SlackN} Dec 10, 2017 6:47:42 PM org.eclipse.jetty.util.log.JavaUtilLog warn WARNING: badMessage: 400 Illegal character 0x3 for HttpChannelOverHttp@15f648b4{r=0,c=false,a=IDLE,uri=} Dec 10, 2017 11:23:04 PM hudson.ExpressionFactory2$JexlExpression evaluate WARNING: Caught exception evaluating: h.filterDescriptors(it,attrs.descriptors) in /job/csp-multipipe/configure. Reason: java.lang.NullPointerException java.lang.NullPointerException Dec 11, 2017 3:18:54 AM org.jenkinsci.plugins.durabletask.ProcessLiveness isAlive WARNING: hudson.Launcher$LocalLauncher@595604e5 on hudson.remoting.LocalChannel@47f4f94f does not seem able to determine whether processes are alive or not Dec 11, 2017 3:18:55 AM org.jenkinsci.plugins.durabletask.ProcessLiveness isAlive WARNING: hudson.Launcher$LocalLauncher@2ede7d5c on hudson.remoting.LocalChannel@47f4f94f does not seem able to determine whether processes are alive or not Dec 11, 2017 3:18:55 AM org.jenkinsci.plugins.durabletask.ProcessLiveness isAlive WARNING: hudson.Launcher$LocalLauncher@3b8ca3d5 on hudson.remoting.LocalChannel@47f4f94f does not seem able to determine whether processes are alive or not Dec 11, 2017 3:18:55 AM org.jenkinsci.plugins.durabletask.ProcessLiveness isAlive WARNING: hudson.Launcher$LocalLauncher@46bfcd1b on hudson.remoting.LocalChannel@47f4f94f does not seem able to determine whether processes are alive or not Dec 11, 2017 3:18:55 AM org.jenkinsci.plugins.durabletask.ProcessLiveness isAlive WARNING: hudson.Launcher$LocalLauncher@14c307e9 on hudson.remoting.LocalChannel@47f4f94f does not seem able to determine whether processes are alive or not Dec 11, 2017 3:18:56 AM org.jenkinsci.plugins.durabletask.ProcessLiveness isAlive WARNING: hudson.Launcher$LocalLauncher@6f4b5525 on hudson.remoting.LocalChannel@47f4f94f does not seem able to determine whether processes are alive or not Dec 11, 2017 3:18:56 AM org.jenkinsci.plugins.durabletask.ProcessLiveness isAlive WARNING: hudson.Launcher$LocalLauncher@23f674cc on hudson.remoting.LocalChannel@47f4f94f does not seem able to determine whether processes are alive or not Dec 11, 2017 6:34:05 AM hudson.ExpressionFactory2$JexlExpression evaluate WARNING: Caught exception evaluating: request.getSession() in /cli. Reason: java.lang.IllegalStateException: Response is committed java.lang.IllegalStateException: Response is committed Dec 11, 2017 7:11:00 AM org.eclipse.jetty.util.log.JavaUtilLog warn WARNING: Illegal character 0x16 in state=START for buffer HeapByteBuffer@5a0cb7be[p=1,l=177,c=16384,r=176]={\x16<<<\x03\x01\x00\xAc\x01\x00\x00\xA8\x03\x03M\x04\x8e\x01w\xAf\xFb...\x03\x02\x03\x03\x02\x01\x02\x02\x02\x03\x00\x0f\x00\x01\x01>>>ent: Go-http-clie...to add resource} Dec 11, 2017 7:11:00 AM org.eclipse.jetty.util.log.JavaUtilLog warn WARNING: badMessage: 400 Illegal character 0x16 for HttpChannelOverHttp@8cd8337{r=0,c=false,a=IDLE,uri=} Dec 11, 2017 9:31:42 AM hudson.init.impl.InstallUncaughtExceptionHandler$DefaultUncaughtExceptionHandler uncaughtException SEVERE: A thread (TCP agent connection handler #43 with /5.188.10.105:51004/86524) died unexpectedly due to an uncaught exception, this may leave your Jenkins in a bad way and is usually indicative of a bug in the code. java.lang.SecurityException: Rejected: sun.reflect.annotation.AnnotationInvocationHandler Dec 11, 2017 10:07:17 AM com.cloudbees.jenkins.plugins.bitbucket.hooks.WebhookAutoRegisterListener$1 doRun WARNING: Could not register hooks for csp-multipipe java.io.IOException: I/O error when parsing response from URL: https://bitbucket.org/api/2.0/repositories/nubeva/service_platform/hooks?page=1&pagelen=50 Dec 11, 2017 10:45:30 AM hudson.ExpressionFactory2$JexlExpression evaluate WARNING: Caught exception evaluating: request.getSession() in /cli. Reason: java.lang.IllegalStateException: Response is committed java.lang.IllegalStateException: Response is committed Dec 12, 2017 4:34:28 AM hudson.ExpressionFactory2$JexlExpression evaluate WARNING: Caught exception evaluating: h.filterDescriptors(it,attrs.descriptors) in /job/csp-multipipe/configure. Reason: java.lang.NullPointerException java.lang.NullPointerException Dec 12, 2017 9:29:15 AM hudson.TcpSlaveAgentListener$ConnectionHandler run WARNING: Connection #54 failed java.io.EOFException Dec 12, 2017 1:14:58 PM hudson.TcpSlaveAgentListener$ConnectionHandler run WARNING: Connection #60 failed java.io.EOFException: unexpected stream termination Dec 12, 2017 6:51:40 PM org.eclipse.jetty.util.log.JavaUtilLog warn WARNING: Illegal character 0x4 in state=START for buffer HeapByteBuffer@50f4dcce[p=1,l=10,c=16384,r=9]={\x04<<<\x01\x00P\xC0c\xF660\x00>>>Controller_Endpoi...backend.%22%2C+} Dec 12, 2017 6:51:40 PM org.eclipse.jetty.util.log.JavaUtilLog warn WARNING: badMessage: 400 Illegal character 0x4 for HttpChannelOverHttp@754b5fd6{r=0,c=false,a=IDLE,uri=} Dec 12, 2017 6:51:40 PM org.eclipse.jetty.util.log.JavaUtilLog warn WARNING: Illegal character 0x4 in state=START for buffer HeapByteBuffer@62f58182[p=1,l=10,c=16384,r=9]={\x04<<<\x01\x00P\xC0c\xF660\x00>>>/httpheader.net/ ...e+change+repos+} Dec 12, 2017 6:51:40 PM org.eclipse.jetty.util.log.JavaUtilLog warn WARNING: badMessage: 400 Illegal character 0x4 for HttpChannelOverHttp@3049df1b{r=0,c=false,a=IDLE,uri=} Dec 12, 2017 6:51:41 PM org.eclipse.jetty.util.log.JavaUtilLog warn WARNING: Illegal character 0x5 in state=START for buffer HeapByteBuffer@50f4dcce[p=1,l=3,c=16384,r=2]={\x05<<<\x01\x00>>>P\xC0c\xF660\x00Controller...backend.%22%2C+} Dec 12, 2017 6:51:41 PM org.eclipse.jetty.util.log.JavaUtilLog warn WARNING: badMessage: 400 Illegal character 0x5 for HttpChannelOverHttp@5639cbb0{r=0,c=false,a=IDLE,uri=} Dec 12, 2017 11:21:00 PM org.apache.commons.httpclient.HttpMethodBase getResponseBody WARNING: Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended.
1 Answers
Answers 1
This is not something I'll do, but if you're willing to use a hacky workaround, you can setup a parameter e.g. called OFFSET in your job config, then pass the OFFSET value along with BUILD_NUMBER environment variable. Subtract the OFFSET from the BUILD_NUMBER for the last digit in your version number. E.g. BUILD_NUMBER is 2691, OFFSET 2690, the number you want is 2691 - 2690 = 1. For the next build 2692, the number will be 2. And so on so forth. At one point, when you want to reset it back to 1, if the next build number is 3214, then you can simply change the offset to 3213, then you get 1, 2, 3... and so on again.
0 comments:
Post a Comment