Bitbucket Server cannot create to new connections due to "No buffer space available (maximum connections reached?)"
プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。
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.
*Fisheye および Crucible は除く
問題
Bitbucket Server cannot open new sockets.
atlassian-bitbucket.log
に次のメッセージが表示される。
ERROR [Caesium-1-4] c.a.scheduler.core.JobLauncher Scheduled job with ID '<job id>' failed
java.lang.IllegalStateException: org.apache.http.nio.reactor.IOReactorException: Failure opening selector
Caused by: org.apache.http.nio.reactor.IOReactorException: Failure opening selector
Caused by: java.io.IOException: Unable to establish loopback connection
Caused by: java.net.SocketException: No buffer space available (maximum connections reached?): bind
原因
Bitbucket Server can't create any new sockets when it's trying to talk to other services (e.g. database or external user directory). This could be caused by another application on the same server as Bitbucket Server and exhausting the available sockets.
The following command can be used to report the sockets in use:
netstat -n
ソリューション
There are various options to resolve this:
- identify what's using the sockets and reduce the numbers
- increase the number of available sockets