New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

harbor_adminserver always restarting,can't open web #2208

Closed
Hackeruncle opened this Issue May 4, 2017 · 8 comments

Comments

Projects
None yet
3 participants
@Hackeruncle

Hackeruncle commented May 4, 2017

adminserver[14789]: 2017-05-04T03:09:55Z [INFO] initializing system configurations...
adminserver[14789]: 2017-05-04T03:09:55Z [INFO] the path of json configuration storage: /etc/adminserver/config/config.json
adminserver[14789]: 2017-05-04T03:09:55Z [DEBUG] [driver_json.go:46]: path of configuration file: /etc/adminserver/config/config.json
adminserver[14789]: 2017-05-04T03:09:55Z [INFO] the path of key used by key provider: /etc/adminserver/key
adminserver[14789]: 2017-05-04T03:09:55Z [INFO] configurations read from storage driver are null, will load them from environment variables
adminserver[14789]: 2017-05-04T03:09:55Z [FATAL] [main.go:46]: failed to initialize the system: read /etc/adminserver/key: is a directory

@Hackeruncle

This comment has been minimized.

Hackeruncle commented May 4, 2017

/etc/adminserver/config/config.json
/etc/adminserver/key
can't init.
I manaual mkdir the dir /etc/adminserver/ and /etc/adminserver/config,
use these command:
docker-compose down;
./prepare;
docker-compose up -d;

always these exception.

@ywk253100

This comment has been minimized.

Contributor

ywk253100 commented May 4, 2017

Run commands:
docker-compose down
rm -r /data/secretkey
./prepare
docker-compose up -d

@Hackeruncle

This comment has been minimized.

Hackeruncle commented May 4, 2017

@ywk253100 ,I run these commands, still harbor_adminserver restarting, i check the log:
[INFO] initializing system configurations...
[INFO] the path of json configuration storage: /etc/adminserver/config/config.json
[DEBUG] [driver_json.go:46]: path of configuration file: /etc/adminserver/config/config.json
[INFO] the path of key used by key provider: /etc/adminserver/key
[INFO] configurations read from storage driver are null, will load them from environment variables
[FATAL] [main.go:46]: failed to initialize the system: read /etc/adminserver/key: is a directory

@Hackeruncle

This comment has been minimized.

Hackeruncle commented May 4, 2017

@ywk253100 the /etc/adminserver/config/config.json and /etc/adminserver/key , what command is created?

@ywk253100

This comment has been minimized.

Contributor

ywk253100 commented May 4, 2017

The file /data/secretkey is generated by prepare script and is mounted into adminserver container as /etc/adminserver/key. So you should make sure the /data/secretkey is generated successfully after running prepare script.

@Hackeruncle

This comment has been minimized.

Hackeruncle commented May 4, 2017

@ywk253100 Thanks,it's ok.

I modify the path of secretkey storage in harbor.cfg,as follow:
secretkey_path = /usr/local/harbor/data , so cause this above error.
Now i recover the parameter of secretkey_path = /data, so harbor_adminserver is up.

And I think that the harbor code should have an error ,can't auto read the the parameter of secretkey_path in initing of using “./prepare”.

@ywk253100

This comment has been minimized.

Contributor

ywk253100 commented May 4, 2017

Yes, there is already an issue #2134 to track this.

@jmarceli

This comment has been minimized.

jmarceli commented Jan 20, 2018

To summarize: as for now secretkey_path in harbor.cfg should never be changed or if you have to change it you should remember to adjust paths in docker-compose.yml manually because they are hardcoded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment