我正在尝试将我的 gocd/go-server 移动到更强大的机器上。它目前是 dockerized,但简而言之,我使用主机卷,所以我只是将我的整个项目从系统 A 同步到系统 B。
作曲家服务入口:
go-server:
restart: unless-stopped
image: gocd/gocd-server:v17.12.0
ports:
- "8153:8153"
- "8154:8154"
environment:
- GO_SERVER_SYSTEM_PROPERTIES=-Dcruise.material.update.interval=10000
volumes:
- /opt/go/volume:/godata
- ./password.properties:/godata/config/password.properties
但是,当我重新启动实例时,会出现各种权限错误:
go-server_1 | 22:59:53,756 |-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[PerformanceFileAppender] - openFile(/go-working-dir/logs/go-server-perf.log,true) call failed. java.io.FileNotFoundException: /go-working-dir/logs/go-server-perf.log (Permission denied)
go-server_1 | at java.io.FileNotFoundException: /go-working-dir/logs/go-server-perf.log (Permission denied)
go-server_1 | at at java.io.FileOutputStream.open0(Native Method)
go-server_1 | at at java.io.FileOutputStream.open(FileOutputStream.java:270)
go-server_1 | at at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
go-server_1 | at at ch.qos.logback.core.recovery.ResilientFileOutputStream.<init>(ResilientFileOutputStream.java:26)
go-server_1 | at at ch.qos.logback.core.FileAppender.openFile(FileAppender.java:204)
go-server_1 | at at ch.qos.logback.core.FileAppender.start(FileAppender.java:127)
go-server_1 | at at ch.qos.logback.core.rolling.RollingFileAppender.start(RollingFileAppender.java:100)
go-server_1 | at at ch.qos.logback.core.joran.action.AppenderAction.end(AppenderAction.java:90)
go-server_1 | at at ch.qos.logback.core.joran.spi.Interpreter.callEndAction(Interpreter.java:309)
go-server_1 | at at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:193)
go-server_1 | at at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:179)
go-server_1 | at at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:62)
go-server_1 | at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:165)
go-server_1 | at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:152)
go-server_1 | at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:110)
go-server_1 | at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:53)
go-server_1 | at at com.thoughtworks.go.logging.LogConfigurator.configureWith(LogConfigurator.java:109)
go-server_1 | at at com.thoughtworks.go.logging.LogConfigurator.initialize(LogConfigurator.java:89)
go-server_1 | at at com.thoughtworks.go.server.util.GoLauncher.main(GoLauncher.java:41)
go-server_1 | at at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
go-server_1 | at at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
go-server_1 | at at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
go-server_1 | at at java.lang.reflect.Method.invoke(Method.java:498)
go-server_1 | at at com.thoughtworks.gocd.Boot.run(Boot.java:104)
go-server_1 | at at com.thoughtworks.gocd.Boot.main(Boot.java:55)
go-server_1 | 22:59:53,756 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to WARN
go-server_1 | 22:59:53,757 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [FileAppender] to Logger[ROOT]
go-server_1 | 22:59:53,757 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [com.thoughtworks.go] to INFO
go-server_1 | 22:59:53,757 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [com.thoughtworks.studios.shine] to WARN
go-server_1 | 22:59:53,757 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [ShineFileAppender] to Logger[com.thoughtworks.studios.shine]
go-server_1 | 22:59:53,757 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [com.thoughtworks.go.server.Rails] to WARN
go-server_1 | 22:59:53,758 |-INFO in ch.qos.logback.core.joran.util.ConfigurationWatchListUtil@3532ec19 - Adding [file:/go-working-dir/config/logback-include.xml] to configuration watch list.
go-server_1 | 22:59:53,763 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
go-server_1 | 22:59:53,763 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [CONSOLE]
go-server_1 | 22:59:53,764 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
go-server_1 | 22:59:53,766 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [CONSOLE] to Logger[ROOT]
go-server_1 | 22:59:53,766 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
go-server_1 | 22:59:53,766 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@68c4039c - Registering current configuration as safe fallback point
go-server_1 |
go-server_1 | File /go-working-dir/config/cruise-config.xml is not readable or writeable.
go-server_1 | Error trying to validate file cruise-config.xsd: java.io.FileNotFoundException: /go-working-dir/config/cruise-config.xsd (Permission denied)
go-server_1 | File /go-working-dir/config/jetty.xml is not readable or writeable.
go-server_1 | File /go-working-dir/config/go_update_server.pub is not readable or writeable.
go-server_1 | /go-working-dir/db/h2deltas/10_add_stage_timestamp.sql (Permission denied)
go-server_1 | /go-working-dir/db/h2db/cruise.h2.db (Permission denied)
我已确保整个/opt/go/volume
系统归登录的非 root 用户所有。即:弗雷德
$ ls -l
total 9964
-rw-r--r--. 1 fred fred 9754624 Jan 4 23:20 cruise.h2.db
-rw-r--r--. 1 fred fred 444299 Jan 4 22:11 cruise.trace.db
将 gocd/go-server 迁移到新系统以绕过权限错误需要哪些步骤?