vic
vic copied to clipboard
VIC Appliance API 502 Bad Gateway
Summary
All API Calls to VIC Appliance responds with 502 Bad Gateway. Tried to restart multiple times.
vSphere and vCenter Server version
7.0
VIC version
v1.5.6-7849-bd6fe58a
Same issue, it seems the registry is in a restart loop because of: https://github.com/goharbor/harbor/issues/11633
Jan 12 16:07:18 192.168.128.1 registry[344]: Changing password for root.
Jan 12 16:07:18 192.168.128.1 registry[344]: sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
Jan 12 16:07:18 192.168.128.1 registry[344]: sudo: unable to change expired password: Authentication token manipulation error
Jan 12 16:08:19 192.168.128.1 registry[344]: sudo: Account or password is expired, reset your password and try again
Jan 12 16:08:19 192.168.128.1 registry[344]: Changing password for root.
Jan 12 16:08:19 192.168.128.1 registry[344]: sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
Jan 12 16:08:19 192.168.128.1 registry[344]: sudo: unable to change expired password: Authentication token manipulation error
Jan 12 16:09:19 192.168.128.1 registry[344]: sudo: Account or password is expired, reset your password and try again
Jan 12 16:09:19 192.168.128.1 registry[344]: Changing password for root.
Jan 12 16:09:19 192.168.128.1 registry[344]: sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
Jan 12 16:09:19 192.168.128.1 registry[344]: sudo: unable to change expired password: Authentication token manipulation error
My Workaround:
Extract Harbor Pre-release offline artifact:
https://github.com/goharbor/harbor/releases/tag/v1.7.8-rc1
Import images on VIC Appliance:
docker load -i ./harbor*.tar.gz
Edit docker-compose.yml on VIC Appliance to use fixed images
vi /etc/vmware/harbor/docker-compose.yml
Thanks @samized !
To fill a couple of the blanks, here's the steps I went through. Not sure if it was all necessary, but it seems to be working now.
- Download 1.7.8 using link above: https://github.com/goharbor/harbor/releases/tag/v1.7.8-rc1
- Extract the harbor folder in the download.
- Transfer the harbor folder and its contents to the VIC Appliance /root folder using scp/winscp.
- SSH into VIC appliance.
- Go into the transferred harbor folder:
cd /root/harbor
- Loaded the new docker images per the command above:
docker load -i ./harbor*.tar.gz
- Just took note of all the images by running:
docker images
- Took a backup of the /etc/vmware/harbor folder in case anything blew up.
- Edited 3 docker-compose files located in /etc/vmware/harbor and replaced all image instances of v1.7.7 with v1.7.8:
docker-compose.yml docker-compose.notary.yml docker-compose.clair.yml
- Made sure I was in the /etc/vmware/harbor directory:
cd /etc/vmware/harbor
- Took notes of the running containers:
docker ps -a
- Bring down the harbor containers:
docker-compose down
- Bring up the new images:
/usr/local/bin/docker-compose -f /etc/vmware/harbor/docker-compose.yml -f /etc/vmware/harbor/docker-compose.notary.yml -f /etc/vmware/harbor/docker-compose.clair.yml up -d
- Verified the containers were running using the new images:
docker ps -a
After a minute or two for the containers to start, they all reported healthy, and I no longer received the 502 error.