While browsing a specific repository, an error "500 UNKNOWN" seen in Bitbucket Data Center
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
Summary
While browsing to the specific repository in Bitbucket shows error 500 below:

Environment
Bitbucket 8.x onwards
Diagnosis
Scenario 1: When mesh.log has "java.lang.IllegalArgumentException: A non-blank path is required
" entry
The bitbucket application log file shows the following error
1
2
3
4
5
6
7
ERROR [http-nio-7990-exec-40] Spring @VDM0L2x686x15196891x0 admin 172.xx.xx.xx "GET /projects/<project-key>/repos/<repo-slug>/browse HTTP/1.1" c.a.s.i.w.HandlerExceptionResolverImpl UNKNOWN
io.grpc.StatusRuntimeException: UNKNOWN
at io.grpc.Status.asRuntimeException(Status.java:535)
at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onClose(ClientCalls.java:479)
at io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:39)
at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23)
at io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClient
Mesh logs show the following message:
1
2
WARN [grpc-async:thread-52808] - c.a.b.m.g.LoggingServerInterceptor RPC failed with an UNKNOWN error: null
java.lang.IllegalArgumentException: A non-blank path is required
Scenario 2: When atlassian-bitbucket.log have "git version could not be started
" message:
1
2
3
4
5
6
7
8
9
10
11
12
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)
Cause
Scenario 1: As per the Mesh logs, we see "A non-blank path is required"
. The error indicates that the file with a blank filename exists under the repository location. For example, a file with " " filename (the name only has an empty whitespace).
This can happen when a file with a blank name is pushed to the repository location by the user.
Scenario 2: This scenario can occur due to an issue with the git binaries, which can be either missing or corrupted on Bitbucket nodes.
Solution
Scenario 1: Have the user remove the file with no name from the local copy and re-push the changes to the remote repository on the Bitbucket server. That should fix the issue.
Scenario 2: To resolve the issue with git binaries, you can either compare the git binaries of the non-working Bitbucket environment with the working Bitbucket environment and copy the missing binaries from the working Bitbucket environment, or you can install a required git version using the Install Git article and set the following properties in the bitbucket.properties file with the location of the newly installed git version.
For more details on these properties, you can follow Configuration Properties document.
1
2
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 the bitbucket.properties file, Bitbucket needs to be restarted.
Was this helpful?