os centos7.4 64bit
Docker version 18.03.0-ce, build 0520e24
docker-compose version 1.21.2, build a133471
在安装V1.5.0时harbor-jobservice and harbor-adminserver无法启动,提示
Error response from daemon: configured logging driver does not support reading
help me!
发现其它容器均提示:
Error response from daemon: configured logging driver does not support reading
无法启动的那两个窗口一直是Restarting (1) 19 seconds ago 状态
I also face the same issue when using 'docker log container', however the logs are all consolidated into /var/log/harbor
Also when doing 'docker-compose logs' it shows warnings for each container
nginx | WARNING: no logs are available with the 'syslog' log driver
harbor-jobservice | WARNING: no logs are available with the 'syslog' log driver
harbor-ui | WARNING: no logs are available with the 'syslog' log driver
registry | WARNING: no logs are available with the 'syslog' log driver
harbor-adminserver | WARNING: no logs are available with the 'syslog' log driver
harbor-db | WARNING: no logs are available with the 'syslog' log driver
redis | WARNING: no logs are available with the 'syslog' log driver
@sakufo This is expected because the log are redirected to /var/log/harbor
Please check the log files in /var/log/harbor to see the reason why the containers are Restarting
according to https://github.com/docker/compose/issues/3873
it seems using syslog drivers in docker-compose will cause issues such as the warnings to appear.
thank @chin zhiqiang @reasonerjt
error:
[13:44:37 root@harbor131 harbor]#more adminserver.log
May 8 13:43:40 172.18.0.1 adminserver[10307]: 2018-05-08T05:43:40Z [INFO] the path of json configuration storage: /etc/adminserver/config/config.json
May 8 13:43:40 172.18.0.1 adminserver[10307]: 2018-05-08T05:43:40Z [INFO] initializing database: type-MySQL host-mysql port-3306 user-root database-registry
May 8 13:43:40 172.18.0.1 adminserver[10307]: 2018-05-08T05:43:40Z [ERROR] [utils.go:98]: failed to connect to tcp://mysql:3306, retry after 2 seconds :dial tcp 172.18.0.6:3306: getsockopt: connection refused
May 8 13:43:42 172.18.0.1 adminserver[10307]: 2018-05-08T05:43:42Z [ERROR] [utils.go:98]: failed to connect to tcp://mysql:3306, retry after 2 seconds :dial tcp 172.18.0.6:3306: getsockopt: connection refused
May 8 13:43:44 172.18.0.1 adminserver[10307]: 2018-05-08T05:43:44Z [ERROR] [utils.go:98]: failed to connect to tcp://mysql:3306, retry after 2 seconds :dial tcp 172.18.0.6:3306: getsockopt: connection refused
May 8 13:43:46 172.18.0.1 adminserver[10307]: 2018-05-08T05:43:46Z [INFO] initialize database completed
May 8 13:43:46 172.18.0.1 adminserver[10307]: 2018-05-08T05:43:46Z [INFO] the path of key used by key provider: /etc/adminserver/key
May 8 13:43:46 172.18.0.1 adminserver[10307]: 2018-05-08T05:43:46Z [FATAL] [main.go:46]: failed to initialize the system: read /etc/adminserver/key: is a directory
[13:44:03 root@harbor131 harbor]#more jobservice.log
May 8 13:43:42 172.18.0.1 jobservice[10307]: 2018-05-08T05:43:42Z [FATAL] [service_logger.go:73]: Failed to initialize job context: Get http://adminserver:8080/api/configurations: dial tcp 172.18.0.5:8080: getsockopt: connection refuse
d
May 8 13:43:42 172.18.0.1 jobservice[10307]: 2018-05-08T05:43:42Z [FATAL] [service_logger.go:73]: Failed to initialize job context: Get http://adminserver:8080/api/configurations: dial tcp 172.18.0.5:8080: getsockopt: connection refuse
d
May 8 13:43:43 172.18.0.1 jobservice[10307]: 2018-05-08T05:43:43Z [FATAL] [service_logger.go:73]: Failed to initialize job context: Get http://adminserver:8080/api/configurations: dial tcp 172.18.0.5:8080: getsockopt: connection refuse
d
May 8 13:43:44 172.18.0.1 jobservice[10307]: 2018-05-08T05:43:44Z [FATAL] [service_logger.go:73]: Failed to initialize job context: Get http://adminserver:8080/api/configurations: dial tcp 172.18.0.5:8080: getsockopt: connection refuse
d
May 8 13:43:45 172.18.0.1 jobservice[10307]: 2018-05-08T05:43:45Z [FATAL] [service_logger.go:73]: Failed to initialize job context: Get http://adminserver:8080/api/configurations: dial tcp 172.18.0.5:8080: getsockopt: connection refuse
d
May 8 13:43:48 172.18.0.1 jobservice[10307]: 2018-05-08T05:43:48Z [FATAL] [service_logger.go:73]: Failed to initialize job context: Get http://adminserver:8080/api/configurations: dial tcp 172.18.0.5:8080: getsockopt: connection refuse
d
May 8 13:43:52 172.18.0.1 jobservice[10307]: 2018-05-08T05:43:52Z [FATAL] [service_logger.go:73]: Failed to initialize job context: Get http://adminserver:8080/api/configurations: dial tcp: lookup adminserver: no such host
May 8 13:43:59 172.18.0.1 jobservice[10307]: 2018-05-08T05:43:59Z [FATAL] [service_logger.go:73]: Failed to initialize job context: Get http://adminserver:8080/api/configurations: dial tcp: lookup adminserver: no such host
Clear everything in /data and re-run prepare
已经好了
经过检查好像和harbor.cfg内的secretkey_path = /data配置路径有关
如果这里做了修改,由docker-compose.yml内相关配置也要做修改,否则部分容器会启动失败
这里的设计不够完善,应该让用户修改一个地方,其它地方也同步做修改
@sakufo 我这里没有更改过secretkey_path的任何配置,也是这样,有没有什么解决办法?现在跟你的情形一模一样
Do we still need to keep this open?
yes, it's a bug, tail /var/log/harbor still says
Aug 23 13:25:56 172.23.0.1 adminserver[14413]: 2018-08-23T05:25:56Z [INFO] the path of key used by key provider: /etc/adminserver/key
Aug 23 13:25:56 172.23.0.1 adminserver[14413]: 2018-08-23T05:25:56Z [FATAL] [main.go:46]: failed to initialize the system: open /etc/adminserver/key: no such file or directory
Aug 23 13:26:57 172.23.0.1 adminserver[14413]: 2018-08-23T05:26:57Z [INFO] initializing system configurations...
Aug 23 13:26:57 172.23.0.1 adminserver[14413]: 2018-08-23T05:26:57Z [INFO] the path of json configuration storage: /etc/adminserver/config/config.json
Aug 23 13:26:57 172.23.0.1 adminserver[14413]: 2018-08-23T05:26:57Z [INFO] initializing database: type-MySQL host-192.168.5.31 port-3306 user-root database-registry
Aug 23 13:26:57 172.23.0.1 adminserver[14413]: 2018-08-23T05:26:57Z [INFO] initialize database completed
Aug 23 13:26:57 172.23.0.1 adminserver[14413]: 2018-08-23T05:26:57Z [INFO] the path of key used by key provider: /etc/adminserver/key
Aug 23 13:26:57 172.23.0.1 adminserver[14413]: 2018-08-23T05:26:57Z [FATAL] [main.go:46]: failed to initialize the system: open /etc/adminserver/key: no such file or directory
==> /var/log/harbor/jobservice.log <==
~/harbor# docker-compose ps
harbor-adminserver /harbor/start.sh Restarting
harbor-jobservice /harbor/start.sh Up
harbor-log /bin/sh -c /usr/local/bin/ ... Up (healthy) 127.0.0.1:1514->10514/tcp
harbor-ui /harbor/start.sh Up (health: starting)
nginx nginx -g daemon off; Up (unhealthy) 0.0.0.0:443->443/tcp, 0.0.0.0:4443->4443/tcp, 80/tcp, 0.0.0.0:8080->8080/tcp
redis docker-entrypoint.sh redis ... Up 6379/tcp
registry /entrypoint.sh serve /etc/ ... Up (healthy) 5000/tcp
even setup absolute path /root/data/key/secretkey is no use ,
log says failed to initialize the system: read /etc/adminserver/key: is a directory
@nszhsl same to you
@afrojewelz
Please double check if there's a directory "/data/secretkey" on your docker host, if there is, remove it, re-run prepare.
It's a quite different issue than the title describes, if you can't fix it in your env please open a new issue.
@nszhsl 你是怎么解决的,我的问题和你的一样
Most helpful comment
Clear everything in
/dataand re-runprepare