JohnsonHttpRequestHandlerServlet message in the Bitbucket Server log

Still need help?

The Atlassian Community is here for you.

Ask the community

Problem

The following appears in the atlassian-bitbucket.log:

 
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:

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

or

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

Last modified on Jul 29, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.