JohnsonHttpRequestHandlerServlet message in the Bitbucket Server log

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs 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

Problem

The following appears in the atlassian-bitbucket.log:

1 2   c.a.j.s.w.c.s.JohnsonHttpRequestHandlerServlet HttpRequestHandlerServlet [scmServlet] cannot be initialised to service an incoming request; redirecting to /unavailable

Problem

To replicate this issue in a test environment at will do the following:

Assumption:

  • Have a remote repository defined as Bitbucket Server on your system (or modify the shell scripts below to use an appropriate remote name)

  • Clear out all the old logs from $BITBUCKET_HOME/logs

  • Bitbucket Server is running on a *nix style OS. If running on Windows change the shell script to appropriately configured batch files

  • Bitbucket Server is running

Create one of the following shell scripts:

1 2 3 4 5 for i in {1..150000} do echo Fetching from bitbucket git fetch bitbucket done

or

1 2 3 4 5 for i in {1..150000} do echo Pulling from bitbucket git pull bitbucket done

(chmod +x the .sh file to make it executable)

Open two terminal windows to the server.

  1. In Terminal Window A (TWA) start the shell script that you created.

  2. In Terminal Window B (TWB) stop Bitbucket Server ./stop-bitbucket.sh

  3. In TWA note that you will start getting "connection refused" messages

  4. In TWB start Bitbucket Server ./start-bitbucket.sh

  5. In TWA the connection refused messages will stop and you will start to get errors saying something about "not valid: is this a git repository". Eventually the messages will return to Fetching/Pulling from Bitbucket Server. At this point you can stop the shell script (control-c) and then review the atlassian-bitbucket.log

Cause

These warning messages are a result of git fetch or git pull commands that are being sent to the the Bitbucket Server instance while Bitbucket Server is stopping\starting and is not in a state that it can actually process the requests

Resolution

  • These messages in the log can be safely ignored

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.