Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-55370

Exception during the Jenkins startup

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: pipeline-maven-plugin
    • Labels:
      None
    • Environment:
      Jenkins 1.156
      pipeline-maven:3.6.5
    • Similar Issues:

      Description

      With latest plugin the following exception is thrown upon each time Jenkins starts. I think we are not yet ready to try the dependencies feature, so we haven't configured any database. is there any way that we can avoid this exception to keep the logs clean? Thank you.

       

      Dec 31, 2018 3:15:15 PM org.jenkinsci.plugins.pipeline.maven.GlobalPipelineMavenConfig getDao
      INFO: Connect to database jdbc:h2:file:/var/jenkins/jenkins-jobs/jenkins-jobs;AUTO_SERVER=TRUE;MULTI_THREADED=1;QUERY_CACHE_SIZE=25;JMX=TRUE with username sa and properties {}
      Dec 31, 2018 3:15:15 PM com.zaxxer.hikari.HikariDataSource <init>
      INFO: HikariPool-1 - Starting...
      Dec 31, 2018 3:15:16 PM com.zaxxer.hikari.HikariDataSource <init>
      INFO: HikariPool-1 - Start completed.
      Dec 31, 2018 3:15:17 PM org.jenkinsci.plugins.pipeline.maven.GlobalPipelineMavenConfig getDao
      WARNING: Exception creating database dao, skip
      java.sql.SQLException: Exception connecting to 'null' with credentials 'null' (sa/***) and DAO PipelineMavenPluginH2Dao
      at org.jenkinsci.plugins.pipeline.maven.GlobalPipelineMavenConfig.getDao(GlobalPipelineMavenConfig.java:346)
      at org.jenkinsci.plugins.pipeline.maven.NonProductionGradeDatabaseWarningAdministrativeMonitor.isActivated(NonProductionGradeDatabaseWarningAdministrativeMonitor.java:19)
      at jenkins.model.Jenkins.lambda$getActiveAdministrativeMonitors$0(Jenkins.java:2142)
      at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174)
      at java.util.Iterator.forEachRemaining(Iterator.java:116)
      at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
      at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
      at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
      at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
      at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
      at jenkins.model.Jenkins.getActiveAdministrativeMonitors(Jenkins.java:2142)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
      at groovy.lang.MetaBeanProperty.getProperty(MetaBeanProperty.java:59)
      at groovy.lang.PropertyValue.getValue(PropertyValue.java:42)
      at org.codehaus.groovy.runtime.DefaultGroovyMethods.getProperties(DefaultGroovyMethods.java:389)
      at org.codehaus.groovy.runtime.dgm$297.invoke(Unknown Source)
      at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274)
      at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)
      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
      at main.jenkinsHome(main.groovy:21)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
      at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
      at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:384)
      at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
      at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:69)
      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:158)
      at main$_main_closure1.doCall(main.groovy:15)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
      at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
      at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
      at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
      at groovy.lang.Closure.call(Closure.java:414)
      at groovy.lang.Closure.call(Closure.java:430)
      at org.codehaus.groovy.runtime.DefaultGroovyMethods.callClosureForMapEntry(DefaultGroovyMethods.java:5278)
      at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2117)
      at org.codehaus.groovy.runtime.dgm$164.invoke(Unknown Source)
      at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoMetaMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:251)
      at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.call(PogoMetaMethodSite.java:71)
      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
      at main.main(main.groovy:12)
      at main$main.call(Unknown Source)
      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
      at executor.runMain(executor.groovy:44)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
      at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
      at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:384)
      at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
      at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:69)
      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:182)
      at executor$_main_closure2$_closure5.doCall(executor.groovy:27)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
      at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
      at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
      at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
      at groovy.lang.Closure.call(Closure.java:414)
      at groovy.lang.Closure.call(Closure.java:430)
      at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2040)
      at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2025)
      at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2066)
      at org.codehaus.groovy.runtime.dgm$163.invoke(Unknown Source)
      at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274)
      at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)
      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
      at executor$_main_closure2.doCall(executor.groovy:23)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
      at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
      at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
      at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
      at groovy.lang.Closure.call(Closure.java:414)
      at org.codehaus.groovy.runtime.DefaultGroovyMethods.callClosureForMapEntry(DefaultGroovyMethods.java:5276)
      at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2117)
      at org.codehaus.groovy.runtime.dgm$164.invoke(Unknown Source)
      at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274)
      at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)
      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
      at executor.main(executor.groovy:21)
      at executor$main.call(Unknown Source)
      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
      at runner.run(runner.groovy:10)
      at groovy.lang.GroovyShell.evaluate(GroovyShell.java:585)
      at jenkins.util.groovy.GroovyHookScript.execute(GroovyHookScript.java:136)
      at jenkins.util.groovy.GroovyHookScript.execute(GroovyHookScript.java:127)
      at jenkins.util.groovy.GroovyHookScript.run(GroovyHookScript.java:110)
      at hudson.init.impl.GroovyInitScript.init(GroovyInitScript.java:41)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:104)
      at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:175)
      at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
      at jenkins.model.Jenkins$5.runTask(Jenkins.java:1083)
      at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
      at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at java.lang.Thread.run(Thread.java:748)
      Caused by: java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      at org.jenkinsci.plugins.pipeline.maven.GlobalPipelineMavenConfig.getDao(GlobalPipelineMavenConfig.java:342)
      ... 137 more
      Caused by: java.lang.RuntimeException: org.h2.jdbc.JdbcSQLException: NULL not allowed for column "URL"; SQL statement:
      INSERT INTO JENKINS_MASTER(LEGACY_INSTANCE_ID, URL) values (?, ?) [23502-196]
      at org.jenkinsci.plugins.pipeline.maven.dao.AbstractPipelineMavenPluginDao.initializeDatabase(AbstractPipelineMavenPluginDao.java:518)
      at org.jenkinsci.plugins.pipeline.maven.dao.AbstractPipelineMavenPluginDao.<init>(AbstractPipelineMavenPluginDao.java:88)
      at org.jenkinsci.plugins.pipeline.maven.dao.PipelineMavenPluginH2Dao.<init>(PipelineMavenPluginH2Dao.java:44)
      ... 142 more
      Caused by: org.h2.jdbc.JdbcSQLException: NULL not allowed for column "URL"; SQL statement:
      INSERT INTO JENKINS_MASTER(LEGACY_INSTANCE_ID, URL) values (?, ?) [23502-196]
      at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
      at org.h2.message.DbException.get(DbException.java:179)
      at org.h2.message.DbException.get(DbException.java:155)
      at org.h2.table.Column.validateConvertUpdateSequence(Column.java:345)
      at org.h2.table.Table.validateConvertUpdateSequence(Table.java:797)
      at org.h2.command.dml.Insert.insertRows(Insert.java:151)
      at org.h2.command.dml.Insert.update(Insert.java:114)
      at org.h2.command.CommandContainer.update(CommandContainer.java:101)
      at org.h2.command.Command.executeUpdate(Command.java:260)
      at org.h2.jdbc.JdbcPreparedStatement.execute(JdbcPreparedStatement.java:207)
      at com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44)
      at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java)
      at org.jenkinsci.plugins.pipeline.maven.db.migration.h2.MigrationStep8.execute(MigrationStep8.java:27)
      at org.jenkinsci.plugins.pipeline.maven.dao.AbstractPipelineMavenPluginDao.initializeDatabase(AbstractPipelineMavenPluginDao.java:512)
      ... 144 more
      

        Attachments

          Activity

          Hide
          nrayapati Naresh Rayapati added a comment -

          Awesome, quickly tested with the beta version and now I can't see the exception, but looks like we are spinning up the H2 database,
          I guess it is going to take some resources on the server side, is there anyway that we can disable this feature or disable by default and enabled only when required. anyways thanks a bunch for very quick fix on the exception.

          https://gist.github.com/nrayapati/da3ba2aa0e9624fa1b6c5c956395a5e4

          Show
          nrayapati Naresh Rayapati added a comment - Awesome, quickly tested with the beta version and now I can't see the exception, but looks like we are spinning up the H2 database, I guess it is going to take some resources on the server side, is there anyway that we can disable this feature or disable by default and enabled only when required. anyways thanks a bunch for very quick fix on the exception. https://gist.github.com/nrayapati/da3ba2aa0e9624fa1b6c5c956395a5e4
          Hide
          cleclerc Cyrille Le Clerc added a comment -

          > but looks like we are spinning up the H2 database,
          > I guess it is going to take some resources on the server side,
          > is there anyway that we can disable this feature or disable by default and enabled only when required. anyways thanks a bunch for very quick fix on the exception.

          Please see answer https://wiki.jenkins.io/display/JENKINS/Pipeline+Maven+Plugin#PipelineMavenPlugin-HowcanIreducethefootprintofthedatabaseoftheJenkinsPipelineMavenPlugin?

          Show
          cleclerc Cyrille Le Clerc added a comment - > but looks like we are spinning up the H2 database, > I guess it is going to take some resources on the server side, > is there anyway that we can disable this feature or disable by default and enabled only when required. anyways thanks a bunch for very quick fix on the exception. Please see answer https://wiki.jenkins.io/display/JENKINS/Pipeline+Maven+Plugin#PipelineMavenPlugin-HowcanIreducethefootprintofthedatabaseoftheJenkinsPipelineMavenPlugin?
          Hide
          cleclerc Cyrille Le Clerc added a comment -

          Delivered in 3.6.6

          Show
          cleclerc Cyrille Le Clerc added a comment - Delivered in 3.6.6
          Hide
          nrayapati Naresh Rayapati added a comment - - edited

          Awesome! thank you very much for very quick response. 

           

          Please see answer https://wiki.jenkins.io/display/JENKINS/Pipeline+Maven+Plugin#PipelineMavenPlugin-HowcanIreducethefootprintofthedatabaseoftheJenkinsPipelineMavenPlugin?

          By chance do you have an example of init script to disable this please? Thanks again. 

          Show
          nrayapati Naresh Rayapati added a comment - - edited Awesome! thank you very much for very quick response.    Please see answer  https://wiki.jenkins.io/display/JENKINS/Pipeline+Maven+Plugin#PipelineMavenPlugin-HowcanIreducethefootprintofthedatabaseoftheJenkinsPipelineMavenPlugin? By chance do you have an example of init script to disable this please? Thanks again. 
          Hide
          cleclerc Cyrille Le Clerc added a comment -

          Naresh Rayapati it should look like

          // display existing publishers (empty when the plugin is initialized)
          println(org.jenkinsci.plugins.pipeline.maven.GlobalPipelineMavenConfig.get().getPublisherOptions());
          
          
          // overwrite publishers
          List<org.jenkinsci.plugins.pipeline.maven.MavenPublisher> publishers = new ArrayList<>();
          org.jenkinsci.plugins.pipeline.maven.publishers.PipelineGraphPublisher pipelineGraphPublisher = new org.jenkinsci.plugins.pipeline.maven.publishers.PipelineGraphPublisher();
          pipelineGraphPublisher.setDisabled(true);
          publishers.add(pipelineGraphPublisher);
          
          org.jenkinsci.plugins.pipeline.maven.GlobalPipelineMavenConfig.get().setPublisherOptions(publishers);
          
          Show
          cleclerc Cyrille Le Clerc added a comment - Naresh Rayapati it should look like // display existing publishers (empty when the plugin is initialized) println(org.jenkinsci.plugins.pipeline.maven.GlobalPipelineMavenConfig.get().getPublisherOptions()); // overwrite publishers List<org.jenkinsci.plugins.pipeline.maven.MavenPublisher> publishers = new ArrayList<>(); org.jenkinsci.plugins.pipeline.maven.publishers.PipelineGraphPublisher pipelineGraphPublisher = new org.jenkinsci.plugins.pipeline.maven.publishers.PipelineGraphPublisher(); pipelineGraphPublisher.setDisabled( true ); publishers.add(pipelineGraphPublisher); org.jenkinsci.plugins.pipeline.maven.GlobalPipelineMavenConfig.get().setPublisherOptions(publishers);

            People

            • Assignee:
              cleclerc Cyrille Le Clerc
              Reporter:
              nrayapati Naresh Rayapati
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: