简体   繁体   English

org.eclipse.jgit.errors.LockFailedException 使用 Hawtio 时

[英]org.eclipse.jgit.errors.LockFailedException when using Hawtio

I am using HawtIo war in my code.我在我的代码中使用 HawtIo 战争。 When I run this code in local, it works fine, but on unix box I get the following exception:当我在本地运行此代码时,它工作正常,但在 unix 机器上我得到以下异常:

Failed to pull from remote repo io.hawt.git.RuntimeIOException: org.eclipse.jgit.api.errors.JGitInternalException: Stashing local changes did not successfully complete: io.hawt.git.RuntimeIOException: org.eclipse.jgit.api.errors.JGitInternalException: Stashing local changes did not successfully complete
    at io.hawt.git.GitFacade.gitOperation(GitFacade.java:737)
    at io.hawt.git.GitFacade$2.run(GitFacade.java:108)
    at java.util.TimerThread.mainLoop(Timer.java:555)
    at java.util.TimerThread.run(Timer.java:505)
Caused by: org.eclipse.jgit.api.errors.JGitInternalException: Stashing local changes did not successfully complete
    at org.eclipse.jgit.api.StashCreateCommand.call(StashCreateCommand.java:327)
    at io.hawt.git.GitFacade.gitOperation(GitFacade.java:730)
    ... 3 more
Caused by: org.eclipse.jgit.errors.LockFailedException: Cannot lock /remote/projusers/aptdevjboss/.hawtio/config/.git/index
    at org.eclipse.jgit.dircache.DirCache.lock(DirCache.java:224)
    at org.eclipse.jgit.dircache.DirCache.lock(DirCache.java:301)
    at org.eclipse.jgit.dircache.DirCache.lock(DirCache.java:267)
    at org.eclipse.jgit.lib.Repository.lockDirCache(Repository.java:1051)
    at org.eclipse.jgit.api.StashCreateCommand.call(StashCreateCommand.java:225)
    ... 4 more

Please tell me what am I missing?请告诉我我错过了什么?

Also most likely what's happening is your home directory is on an NFS (or other distributed filesystem) share that doesn't support distributed locks, which is common enough.此外,最有可能发生的情况是您的主目录位于不支持分布式锁的 NFS(或其他分布式文件系统)共享上,这很常见。

You may want to set hawtio.config.dir to point to a local filesystem location that your user account has read/write permissions for.您可能希望将 hawtio.config.dir 设置为指向您的用户帐户具有读/写权限的本地文件系统位置。 You can set this either via a blueprint.properties file or building a custom hawtio-web.war with this parameter set as per our configuration guide.您可以通过 blueprint.properties 文件进行设置,也可以根据我们的配置指南使用此参数设置构建自定义 hawtio-web.war。

The configuration guide for hawtio is at http://hawt.io/configuration/index.html hawtio 的配置指南位于http://hawt.io/configuration/index.html

Hawtio tries to copy a git repo for showing things in Dashboards and Wiki tabs. Hawtio 尝试复制 git 存储库以在仪表板和 Wiki 选项卡中显示内容。 You are probably facing a permissions issue in /remote/projusers/aptdevjboss/.hawtio/config/.git/index .您可能在/remote/projusers/aptdevjboss/.hawtio/config/.git/index面临权限问题。

Also, If you don't want to copy the git repo everytime you start hawtio, there is a offline version you can download: https://oss.sonatype.org/content/repositories/public/io/hawt/hawtio-default-offline/1.2.1/hawtio-default-offline-1.2.1.war另外,如果不想每次启动 hawtio 都复制 git repo,可以下载离线版本: https ://oss.sonatype.org/content/repositories/public/io/hawt/hawtio-default -offline/1.2.1/hawtio-default-offline-1.2.1.war

Try with below command:尝试使用以下命令:

rm -f ./.git/index.lock rm -f ./.git/index.lock

below link might helpful.下面的链接可能会有所帮助。 Git - fatal: Unable to create '/path/my_project/.git/index.lock': File exists Git - 致命:无法创建“/path/my_project/.git/index.lock”:文件存在

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在JGit上获取异常“ org.eclipse.jgit.api.errors.InvalidConfigurationException:远程密钥没有值” - Getting exception “org.eclipse.jgit.api.errors.InvalidConfigurationException: No value for key remote” at JGit 无法收集更改,错误:列出远程引用失败:org.eclipse.jgit.errors.TransportException: - Failed to collect changes, error: List remote refs failed: org.eclipse.jgit.errors.TransportException: JGIT:致命:无法初始化类 org.eclipse.jgit.transport.Transport - JGIT: FATAL: Could not initialize class org.eclipse.jgit.transport.Transport 使用JGit Eclipse提交特定日期 - Commit with specific date using JGit Eclipse 在Eclipse Luna中使用JGit时出现NoClassDefFoundError - Getting NoClassDefFoundError while using JGit in eclipse luna Eclipse Thym 需要 'osgi.bundle; org.eclipse.jgit [3.0.0,5.0.0)' 但找不到 - Eclipse Thym requires 'osgi.bundle; org.eclipse.jgit [3.0.0,5.0.0)' but it could not be found 使用Gradle或Maven时Eclipse构建错误? - Eclipse build errors when using Gradle or Maven? 从Jenkins进行Sonarqube扫描:ClassNotFoundException:org.eclipse.jgit.api.Git - Sonarqube scan from Jenkins : ClassNotFoundException: org.eclipse.jgit.api.Git Android Studio找不到JAR'org.eclipse.jgit-4.5.3.201708160445-r.jar' - Android Studio Cannot find JAR 'org.eclipse.jgit-4.5.3.201708160445-r.jar' NoClassDefFoundError:使用DropWizard时的org / eclipse / jetty / io / ByteBufferPool - NoClassDefFoundError: org/eclipse/jetty/io/ByteBufferPool when using DropWizard
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM