Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Could not load bootstrap from environment (java.lang.NullPointerException)

Igor Solkin January 22, 2018

On any server / Bamboo configuration server goes down after admin user creation.

New server, clean install Bamboo 6.3.1, empty PostreSQL database, new Bamboo home directory.

There is an exception in atlassian-bamboo.log

2018-01-22 13:40:53,975 FATAL [localhost-startStop-1] [BuildNumberInHomeMatchesDatabase] Bamboo home directory comes from version 6.2 or older (build number [60306]) but database does not contain build number

2018-01-22 13:40:53,976 ERROR [localhost-startStop-1] [BootstrapUpgradeManagerImpl] Task 3 failed

java.lang.NullPointerException

at com.atlassian.bamboo.spring.StrutsContainer.lambda$static$0(StrutsContainer.java:15)

at io.atlassian.fugue.Suppliers$MemoizingSupplier.get(Suppliers.java:161)

at com.atlassian.struts.DefaultTextProvider.getTextProvider(DefaultTextProvider.java:188)

at com.atlassian.struts.DefaultTextProvider.getText(DefaultTextProvider.java:39)

at com.atlassian.bamboo.upgrade.tasks.validation.BuildNumberInHomeMatchesDatabase.doUpgrade(BuildNumberInHomeMatchesDatabase.java:59)

at com.atlassian.bamboo.upgrade.BootstrapUpgradeManagerImpl.runValidationTask(BootstrapUpgradeManagerImpl.java:129)

at com.atlassian.bamboo.upgrade.BootstrapUpgradeManagerImpl.lambda$runValidationTasks$0(BootstrapUpgradeManagerImpl.java:90)

at com.atlassian.bamboo.upgrade.AbstractUpgradeManager.forEachTask(AbstractUpgradeManager.java:150)

at com.atlassian.bamboo.upgrade.BootstrapUpgradeManagerImpl.runValidationTasks(BootstrapUpgradeManagerImpl.java:90)

at com.atlassian.bamboo.setup.DefaultBootstrapManager.runValidationTasks(DefaultBootstrapManager.java:373)

at com.atlassian.bamboo.setup.DefaultBootstrapManager.performPersistenceUpgrade(DefaultBootstrapManager.java:277)

at com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager.init(DefaultAtlassianBootstrapManager.java:77)

at com.atlassian.bamboo.setup.BootstrapLoaderListener.contextInitialized(BootstrapLoaderListener.java:118)

at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4842)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5303)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1407)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1397)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

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)

What does it mean and how can I fix it?

2 answers

0 votes
jgauthier January 23, 2018

Hello, we currently have a Bamboo 5.10 version using an Oracle database.
I wanted to test an upgrade to the latest Bamboo 6.3 so installed a trial version locally, exported/imported Oracle data on a new schema then updated the bamboo.cfg.xml to connect to this db.

Once I start bamboo I get the following - similar to Igor's one - error:

2018-01-23 15:05:31,854 FATAL [localhost-startStop-1] [BuildNumberInHomeMatchesDatabase] Bamboo home directory comes from version 6.2 or older (build number [60306]) but database does not contain build number
2018-01-23 15:05:31,858 ERROR [localhost-startStop-1] [BootstrapUpgradeManagerImpl] Task 3 failed
java.lang.NullPointerException
at com.atlassian.bamboo.spring.StrutsContainer.lambda$static$0(StrutsContainer.java:15)
at io.atlassian.fugue.Suppliers$MemoizingSupplier.get(Suppliers.java:161)
at com.atlassian.struts.DefaultTextProvider.getTextProvider(DefaultTextProvider.java:188)
at com.atlassian.struts.DefaultTextProvider.getText(DefaultTextProvider.java:39)
at com.atlassian.bamboo.upgrade.tasks.validation.BuildNumberInHomeMatchesDatabase.doUpgrade(BuildNumberInHomeMatchesDatabase.java:59)
at com.atlassian.bamboo.upgrade.BootstrapUpgradeManagerImpl.runValidationTask(BootstrapUpgradeManagerImpl.java:129)
at com.atlassian.bamboo.upgrade.BootstrapUpgradeManagerImpl.lambda$runValidationTasks$0(BootstrapUpgradeManagerImpl.java:90)
at com.atlassian.bamboo.upgrade.AbstractUpgradeManager.forEachTask(AbstractUpgradeManager.java:150)
at com.atlassian.bamboo.upgrade.BootstrapUpgradeManagerImpl.runValidationTasks(BootstrapUpgradeManagerImpl.java:90)
at com.atlassian.bamboo.setup.DefaultBootstrapManager.runValidationTasks(DefaultBootstrapManager.java:373)
at com.atlassian.bamboo.setup.DefaultBootstrapManager.performPersistenceUpgrade(DefaultBootstrapManager.java:277)
at com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager.init(DefaultAtlassianBootstrapManager.java:77)
at com.atlassian.bamboo.setup.BootstrapLoaderListener.contextInitialized(BootstrapLoaderListener.java:118)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4842)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5303)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1407)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1397)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Could you please  let me know if this can be related with the same issue?

Thanks,
Jerome

Igor Solkin January 30, 2018

Hi, Jerome!

With my issue I decided to write to the Atlassian support and after few days and logs exchanging we discover my problem cause - memory limits.

So, I think your problem is not related with my issue.

jgauthier February 1, 2018

Thank you Igor. Actually I have found this "first step issue" and it was coming from some wrong settings I did. I am now on another issue but it is another story :)

Thanks again for your feedback

0 votes
Alexey Chystoprudov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 22, 2018

Hi, it's existing issue https://jira.atlassian.com/browse/BAM-19589

Looks like your Bamboo DB doesn't match Bamboo home folder and exception occurs when Bamboo tries to show message about it. Try to check what's the version in BAMBOO_HOME/bamboo.cfg.xml and what's in DB table BANDANA, record with a key bamboo.db.version 

Igor Solkin January 22, 2018

In bamboo.cfg.xml:

<buildNumber>60306</buildNumber>

And there is no such record with key bamboo.db.version in database.

Alexey Chystoprudov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 22, 2018

Can you please describe your steps? I just tried to install 6.3.1 from scratch on PostgreSQL and it was installed.

Do you use import from previous versions of Bamboo?

Igor Solkin January 22, 2018

It can sounds strange, but it is clean install on newly-created VPS with 1 Gb RAM and CentOS x86_64 installed.

I just tried to follow express installation (with internal Bamboo DB) and result is the same. I can attach video with installation process.

2018-01-22 15:06:15,967 INFO [localhost-startStop-1] [C3P0Registry] Initializing c3p0-0.9.5.2 [built 08-December-2015 22:06:04 -0800; debug? true; trace: 10]

2018-01-22 15:06:16,170 INFO [localhost-startStop-1] [AbstractPoolBackedDataSource] Initializing c3p0 pool... com.mchange.v2.c3p0.PoolBackedDataSource@e4ee8643 [ connectionPoolDataSource -> com.mchange.v2.c3p0.WrapperConnectionPoolDataSource@632fd46c [ acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, contextClassLoaderSource -> caller, debugUnreturnedConnectionStackTraces -> false, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, forceSynchronousCheckins -> false, identityToken -> qcqdpj9t8fpnf25th4wj|2d1e0ab2, idleConnectionTestPeriod -> 30, initialPoolSize -> 3, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 120, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 100, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 3, nestedDataSource -> com.mchange.v2.c3p0.DriverManagerDataSource@da4a46bf [ description -> null, driverClass -> null, factoryClassLocation -> null, forceUseNamedDriverClass -> false, identityToken -> qcqdpj9t8fpnf25th4wj|683897c2, jdbcUrl -> jdbc:h2:/var/atlassian/application/bamboo/database/h2, properties -> {user=******, password=******} ], preferredTestQuery -> null, privilegeSpawnedThreads -> false, propertyCycle -> 0, statementCacheNumDeferredCloseThreads -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false; userOverrides: {} ], dataSourceName -> null, extensions -> {}, factoryClassLocation -> null, identityToken -> qcqdpj9t8fpnf25th4wj|342b3387, numHelperThreads -> 3 ]

2018-01-22 15:06:17,245 FATAL [localhost-startStop-1] [BuildNumberInHomeMatchesDatabase] Bamboo home directory comes from version 6.2 or older (build number [60306]) but database does not contain build number

2018-01-22 15:06:17,247 ERROR [localhost-startStop-1] [BootstrapUpgradeManagerImpl] Task 3 failed

java.lang.NullPointerException

at com.atlassian.bamboo.spring.StrutsContainer.lambda$static$0(StrutsContainer.java:15)

at io.atlassian.fugue.Suppliers$MemoizingSupplier.get(Suppliers.java:161)

at com.atlassian.struts.DefaultTextProvider.getTextProvider(DefaultTextProvider.java:188)

at com.atlassian.struts.DefaultTextProvider.getText(DefaultTextProvider.java:39)

at com.atlassian.bamboo.upgrade.tasks.validation.BuildNumberInHomeMatchesDatabase.doUpgrade(BuildNumberInHomeMatchesDatabase.java:59)

at com.atlassian.bamboo.upgrade.BootstrapUpgradeManagerImpl.runValidationTask(BootstrapUpgradeManagerImpl.java:129)

at com.atlassian.bamboo.upgrade.BootstrapUpgradeManagerImpl.lambda$runValidationTasks$0(BootstrapUpgradeManagerImpl.java:90)

at com.atlassian.bamboo.upgrade.AbstractUpgradeManager.forEachTask(AbstractUpgradeManager.java:150)

at com.atlassian.bamboo.upgrade.BootstrapUpgradeManagerImpl.runValidationTasks(BootstrapUpgradeManagerImpl.java:90)

at com.atlassian.bamboo.setup.DefaultBootstrapManager.runValidationTasks(DefaultBootstrapManager.java:373)

at com.atlassian.bamboo.setup.DefaultBootstrapManager.performPersistenceUpgrade(DefaultBootstrapManager.java:277)

at com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager.init(DefaultAtlassianBootstrapManager.java:77)

at com.atlassian.bamboo.setup.BootstrapLoaderListener.contextInitialized(BootstrapLoaderListener.java:118)

at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4842)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5303)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1407)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1397)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

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)

Also, tried to install Bamboo server on Ubuntu 16 and has the same result. 

Alexey Chystoprudov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 22, 2018

Igor, can you please check if you have line 

Setup complete

in Bamboo logs before exception occurs.

Also if you can, please create an issue at support.atlassian.com so our Support engineers can review logs and identify a reason of the issue.

Igor Solkin January 22, 2018

Yes, logs contains such line:

INFO [finishsetupBackgroundThread] [DefaultSetupPersister] Setup complete

Okay, I'll create an issue.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events