Bitbucket doesnt start with "Cannot assign requested address (Bind failed)" error

Hi All,

suddenly our BitBucket server installation does not start anymore. We are on the latest version (5.7.0).

OS is Ubuntu 14.04.5 LTS. And installation was runnign smootly for two years.

Did someone had the same problem? Thanks in advance

This is the log.

2018-01-17 11:54:48,052 ERROR [spring-startup] c.a.j.s.w.s.JohnsonDispatcherServlet SpringMVC dispatcher [springMvc] could not be started
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hookService': Invocation of init method failed; nested exception is java.net.BindException: Cannot assign requested address (Bind failed)
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:137)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at java.lang.Thread.run(Thread.java:748)
... 17 frames trimmed
Caused by: java.net.BindException: Cannot assign requested address (Bind failed)
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:387)
at java.net.ServerSocket.bind(ServerSocket.java:375)
at java.net.ServerSocket.<init>(ServerSocket.java:237)
at com.atlassian.stash.internal.hook.DefaultHookService.startHookCallbackListener(DefaultHookService.java:175)
at com.atlassian.stash.internal.hook.DefaultHookService.startup(DefaultHookService.java:112)
... 5 common frames omitted

 

1 answer

1 accepted

0 vote

Hi Alessandro! This error is sometimes caused by the fact that the OS is unable to resolve localhost due to a missing entry in your OS' hosts file, which is required to shutdown and startup. Have you followed Unable to start due to Java net bindexception cannot assign requested address already? (this page mentions Confluence but it's applicable in this case too).

It's also worth verifying the recommended settings page for Bitbucket and make sure the dependencies are in the correct versions, you can find that at Supported platforms and Install Bitbucket Server on Linux.

Also, from which version did you jump to 5.7? If you're coming from an old one, like for example 4.1, Spring boot would have assigned the default port 7990 as no bitbucket.properties file exists, and this will cause the above error.

Let us know!

Ana

Hi Ana,

thanks for the reply. I found the Confluence article and was able to solve the problem

Thank you very much!!

Awesome! Glad to hear that, Alessandro.

Have a nice evening, 

Ana

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

2,047 views 1 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you