JIRA SELF-MANAGED
Also relates to the following exception errors:
GitLabPropertiesNotInitializedException
GitHubPropertiesNotInitializedException
GerritPropertiesNotInitializedException
Problem
An error is encountered with the next exception ( GitLabPropertiesNotInitializedException
) and you are using NFS.
Example Error log
/rest/gitplugin/1.0/repository/12300/pullRequest [c.b.j.g.rest.exceptionmappers.LoggerHolder] REST API has thrown exception.
com.bigbrassband.jira.git.exceptions.operations.GitLabPropertiesNotInitializedException: Initialization
at com.bigbrassband.jira.git.services.integration.gitlab.GitLabApiService$GitLabRepoApi.getExternalRepoProps(GitLabApiService.java:107)
at com.bigbrassband.jira.git.services.integration.gitlab.GitLabApiService$GitLabRepoApi.getRepoExternalIdForMergeRequests(GitLabApiService.java:113)
at com.bigbrassband.jira.git.services.integration.gitlab.GitLabApiService$GitLabRepoApi.createMergeRequest(GitLabApiService.java:68)
at com.bigbrassband.jira.git.rest.repository.RepositoryResource.createPullRequest(RepositoryResource.java:832)
at com.bigbrassband.jira.git.rest.repository.RepositoryResource.restCreatePullRequest(RepositoryResource.java:796)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
Diagnosis
Check the root of the reason by turning on DEBUG logging for the package – com.bigbrassband.jira.git.services.integration.
The root reason of the exception error can be one of the following:
-
not a valid json entry in
repo.auto.json
-
incapability to lock file (
java.io.IOException: No locks available
)
Solution 1
Make sure that repo.auto.json
(jira/data/git-plugin/###-somerepo/repo.auto.json
) contains a valid json.
Solution 2
The lock daemon (lockd) may not be running on the NFS server. Check whether your NFS server supports locking. Update the NFS version, if required.
NFSv4 supporting locking by default was released in 2000. So, it’s a rare case to encounter an NFS server which is not able to lock the /jira/data/git-plugin/###-somerepo/repo.auto.json
file these days.