Bamboo Data Center fails to start with 'Error creating bean with name 'grpcServer' message
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Startup of Bamboo fails with an "Error creating bean with name 'grpcServer
'" message because port 9090, introduced in Bamboo 9.5 for the warm standby takeover feature, is not available. This can happen during fresh installation or upgrade to a Bamboo version 9.5 or later.
Environment
The solution has been validated in Bamboo 9.5 but may be applicable to other versions.
Diagnosis
The following error message can be seen in the <bamboo-home>/logs/atlassian-bamboo.log
and suggests that another service might be using port 9090 on the Bamboo server:
ERROR [main] [ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'grpcServer': Invocation of init method failed; nested exception is java.io.IOException: Failed to bind to address 0.0.0.0/0.0.0.0:9090
Cause
Starting from Bamboo 9.5, Bamboo clustering architecture is upgraded by introducing warm standby. To keep all the secondary Data Center nodes running and up-to-date with the primary node at all times, Bamboo uses gRPC protocol over the port 9090.
The error indicates that port 9090 is already bound by another application, preventing Bamboo from using it.
Solution
Check Port Usage: Determine if another application is using port 9090 by running the following commands:
netstat -anp | grep 9090 netstat -tuln -p | grep 9090
Windows: netstat -an
to see all connections and listening ports in numerical format).Linux: netstat -tuln
to display TCP and UDP ports that are listening).Change the gRPC Port: If port 9090 is in use, you can change the gRPC port by editing the
<bamboo-home>/cluster-node.properties
file. Update thenode.internal.communication.port
to a different, available port to allow secondary nodes to communicate with the Bamboo server:node.internal.communication.port=9090