Error 500 occurring upon accessing any Bitbucket Data Center repository in Bitbucket UI

Still need help?

The Atlassian Community is here for you.

Ask the community

Problem

Bitbucket Data Center can no longer display the repository and returns a 500 error on the screen.

Scenario 1: The following appears in the atlassian-bitbucket.log:

2013-05-07 12:58:59,958 INFO  [http-bio-7990-exec-7] admin 778x94x1 kexnuf 0:0:0:0:0:0:0:1%0 "POST /projects/PROJ/repos HTTP/1.1" c.a.s.internal.scm.git.CreateCommand Repository PROJ/repo2 (12) has been created and configured successfully
2013-05-07 13:14:33,573 ERROR [http-bio-7990-exec-4] admin 794x115x1 kexnuf 0:0:0:0:0:0:0:1%0 "GET /projects/PROJ/repos/repo/browse HTTP/1.1" c.a.s.i.w.HandlerExceptionResolverImpl An error occurred while executing an external process: 1
com.atlassian.bitbucket.exception.ServerException: An error occurred while executing an external process: 1
	at com.atlassian.bitbucket.internal.scm.git.GitCommandExitHandler.evaluateThrowable(GitCommandExitHandler.java:116) ~[na:na]
	at com.atlassian.bitbucket.internal.scm.git.GitCommandExitHandler.onError(GitCommandExitHandler.java:159) ~[na:na]
	at com.atlassian.bitbucket.scm.DefaultCommandExitHandler.onExit(DefaultCommandExitHandler.java:35) ~[bitbucket-spi-2.4.0.jar:na]
	at com.atlassian.bitbucket.scm.BaseCommand.callExitHandler(BaseCommand.java:142) ~[bitbucket-spi-2.4.0.jar:na]
	at com.atlassian.bitbucket.scm.BaseCommand$CommandFuture.internalGet(BaseCommand.java:262) ~[bitbucket-spi-2.4.0.jar:na]
	at com.atlassian.bitbucket.scm.BaseCommand$CommandFuture.get(BaseCommand.java:229) ~[bitbucket-spi-2.4.0.jar:na]
	at com.atlassian.bitbucket.scm.BaseCommand.call(BaseCommand.java:79) ~[bitbucket-spi-2.4.0.jar:na]
	at com.atlassian.bitbucket.internal.content.ContentServiceImpl.streamDirectory(ContentServiceImpl.java:148) ~[bitbucket-service-impl-2.4.0.jar:na]
.
.
.
Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
	at com.atlassian.bitbucket.internal.scm.git.config.ConfigOutputHandler.processReader(ConfigOutputHandler.java:60) ~[na:na]
	at com.atlassian.bitbucket.io.LineReaderOutputHandler.process(LineReaderOutputHandler.java:26) ~[bitbucket-scm-common-2.4.0.jar:na]
	at com.atlassian.utils.process.PluggableProcessHandler.processOutput(PluggableProcessHandler.java:127) ~[atlassian-processutils-1.5.9.jar:na]
	at com.atlassian.utils.process.ExternalProcessImpl$3.doTask(ExternalProcessImpl.java:331) ~[atlassian-processutils-1.5.9.jar:na]
	at com.atlassian.utils.process.LatchedRunnable.run(LatchedRunnable.java:36) ~[atlassian-processutils-1.5.9.jar:na]
	at com.atlassian.bitbucket.internal.concurrent.StateTransferringExecutor$StateTransferringRunnable.run(StateTransferringExecutor.java:68) ~[bitbucket-platform-2.4.0.jar:na]
	... 3 common frames omitted


Scenario 2:
The following error visible in the Bitbucket UI:



The following appears in atlassian-bitbucket.log:

2024-07-02 07:34:29,214 WARN  [http-nio-7990-exec-2] e123456 *NX9HIHx454x1938264x1 e789456 10.xx.xx.xx,10.xx.xx.xx "GET /plugins/servlet/troubleshooting/view/system-info/view HTTP/1.1" c.z.n.internal.BasePosixProcess Failed to start process
java.io.IOException: error=2, No such file or directory
	at com.zaxxer.nuprocess.internal.LibJava10.Java_java_lang_ProcessImpl_forkAndExec(Native Method)
	at com.zaxxer.nuprocess.linux.LinuxProcess.prepareProcess(LinuxProcess.java:158)
	at com.zaxxer.nuprocess.linux.LinuxProcess.run(LinuxProcess.java:98)

2024-07-02 07:34:29,214 DEBUG [http-nio-7990-exec-2] e123456 *NX9HIHx454x1938264x1 e789456 10.xx.xx.xx,10.xx.xx.xx "GET /plugins/servlet/troubleshooting/view/system-info/view HTTP/1.1" c.a.bitbucket.dmz.process.NioProcess 0: [/xyz/abc/gitclient-2.35.7/git-2.35.7/git version] exited -2147483648 in 1719920069214ms (stdin: 0, stdout: 0, stderr: 0)
2024-07-02 07:34:29,215 WARN  [http-nio-7990-exec-2] e123456 *NX9HIHx454x1938264x1 e789456 10.xx.xx.xx,10.xx.xx.xx "GET /plugins/servlet/troubleshooting/view/system-info/view HTTP/1.1" c.a.s.i.scm.git.stp.GitSupportInfo Failed to retrieve Git version
com.atlassian.bitbucket.scm.CommandFailedException: '/xyz/abc/gitclient-2.35.7/git-2.35.7/git version' could not be started
	at com.atlassian.bitbucket.internal.process.nu.NioNuProcessHandler.ensureStarted(NioNuProcessHandler.java:351)
	at com.atlassian.bitbucket.internal.process.nu.NioNuProcessHandler.finish(NioNuProcessHandler.java:374)
	at com.atlassian.bitbucket.internal.process.nu.NioNuProcessHandler.onExit(NioNuProcessHandler.java:138)

Environment:

Tested on Bitbucket 8.9.9 version.

Applies to Bitbucket Data Center 7.x and 8.x

Cause:

Scenario 1: There can be two possible causes for this scenario to occur:

Cause 1:

The .gitmodules file contains extra lines with space or tab before or after the submodule section:

[submodule "subrepo1"]
	path = subrepo1
	url = http://locahost:7990/scm/sub/subrepo1.git
<SPACE><TAB>

Cause 2:

Incompatible plugins.


Scenario2: 
This scenario can occur due to issue with the git binaries which can be either missing or corrupted on Bitbucket nodes. 

Resolution

Scenario 1: For scenario1, there can be two possible solutions:

Cause 1:

Checkout the .gitmodules file and edit out the extra spaces/tabs and re-commit.

Cause 2:

Disable all user plugins by enabling Safe Mode on your instance and try to reproduce the issue. Uninstall incompatible plugin.

This bug has been reported here: BSERV-3411 - Getting issue details... STATUS .


Scenario 2: To resolve the issue with git binaries, either user can compare the git binaries of non-working Bitbucket environment with the working Bitbucket environment and copy the missing binaries from working Bitbucket environment or you can install a required git version using Install Git article and set the following properties in bitbucket.properties file with the location of newly installed git version. For more details on these properties, you can follow Configuration Properties document.

plugin.bitbucket-git.path.executable=<path to git executable>
plugin.bitbucket-git.path.libexec=<path to git libexec directory>


Note: After applying the changes in bitbucket.properties file, Bitbucket need to be restarted.

Last modified on Jul 2, 2024

Was this helpful?

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