Skip to content

Benign java.io.IOException from JGit on startup #2028

@seanmmills

Description

@seanmmills

Upgrading our Spring Cloud Config server from Spring Cloud 2020.0.3 to 2021.0.0 caused a seemingly benign error reported in the logs when deploying to kubernetes.

2022-01-03 20:04:02,892 [tributeWriter-2] ERROR org.eclipse.jgit.util.FS$FileStoreAttributes.saveToConfig - Cannot save config file 'FileBasedConfig[/.config/jgit/config]'
java.io.IOException: Creating directories for /.config/jgit failed
  at org.eclipse.jgit.util.FileUtils.mkdirs(FileUtils.java:412)
  at org.eclipse.jgit.internal.storage.file.LockFile.lock(LockFile.java:138)
  at org.eclipse.jgit.storage.file.FileBasedConfig.save(FileBasedConfig.java:219)
  at org.eclipse.jgit.util.FS$FileStoreAttributes.saveToConfig(FS.java:740)
  at org.eclipse.jgit.util.FS$FileStoreAttributes.lambda$4(FS.java:426)
  at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
  at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
  at java.base/java.lang.Thread.run(Thread.java:829)

I found this stackoverflow describing the problem and solution. I can add the XDG_CONFIG_HOME environment variable, however I think it would be great if a solution was provided in SCC.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions