harbor: After upgrade, docker login breaks
I have been using Harbor version 1.1.1 ok. When I do an upgrade to version 1.1.2 (https://github.com/vmware/harbor/releases/tag/v1.1.2), it works ok too.
But when I try to upgrade to a newer version found on https://console.cloud.google.com/storage/browser/harbor-builds/ using the same upgrade steps, I am not able to do a docker login anymore, due to these errors:
$ docker login ${HARBOR_IP}:443
Username (admin):
Password:
Error response from daemon: Login: <html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>nginx/1.11.5</center>
</body>
</html>
(Code: 404; Headers: map[Server:[nginx/1.11.5] Date:[Tue, 11 Jul 2017 22:19:19 GMT] Content-Type:[text/html] Content-Length:[169]])
docker login failed
I have done this with version 640 and 734. Both fail the same way. Logs and more info below:
If you are reporting a problem, please make sure the following information are provided: 1)Version of docker engine and docker-compose.
Docker version 1.13.1, build 092cba3 docker-compose version 1.11.1, build 7c5d5e4
2)Config files of harbor, you can get them by packaging “harbor.cfg” and files in the same directory, including subdirectory.
See harbor_logs.ZIP below (actually a .tgz file).
3)Log files, you can get them by package the /var/log/harbor/ .
- steps to reproduce the problem Download any of the v1.1.2 installers from https://console.cloud.google.com/storage/browser/harbor-builds/
Run install script (which I got from https://github.com/vmware/harbor/issues/2208 ):
tar -xzvf harbor-offline-installer-v1.1.2-734-g4fcbece.tgz
cp -v /etc/vmware/harbor/docker-compose.yml harbor/docker-compose.yml
cp -v /data/harbor/harbor.cfg harbor/harbor.cfg
# Shut down old harbor
pushd /etc/vmware/harbor
docker-compose down
rm -v /data/harbor/secretkey
popd
# Install new harbor
pushd harbor
./prepare
if [ -f /data/harbor/secretkey ]; then
docker-compose up -d
fi
docker-compose ps
popd
See Output:
Generated and saved secret to file: /data/harbor/secretkey
Generated configuration file: ./common/config/nginx/nginx.conf
Generated configuration file: ./common/config/adminserver/env
Generated configuration file: ./common/config/ui/env
Generated configuration file: ./common/config/registry/config.yml
Generated configuration file: ./common/config/db/env
Generated configuration file: ./common/config/jobservice/env
Generated configuration file: ./common/config/jobservice/app.conf
Generated configuration file: ./common/config/ui/app.conf
Generated certificate, key file: ./common/config/ui/private_key.pem, cert file: ./common/config/registry/root.crt
The configuration files are ready, please use docker-compose to start the service.
Creating network "harbor_harbor" with the default driver
Found orphan containers (notary-server, notary-signer, notary-db) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
Creating harbor-log
Creating registry
Creating harbor-db
Creating harbor-adminserver
Creating harbor-ui
Creating harbor-jobservice
Creating nginx
stty: 'standard input': Inappropriate ioctl for device
Name Command State Ports
------------------------------------------------------------------------------------------------------------------
harbor-adminserver /harbor/harbor_adminserver Up
harbor-db docker-entrypoint.sh mysqld Up 3306/tcp
harbor-jobservice /harbor/harbor_jobservice Up
harbor-log /bin/sh -c crond && rm -f ... Up 127.0.0.1:1514->514/tcp
harbor-ui /harbor/harbor_ui Up
nginx nginx -g daemon off; Up 0.0.0.0:443->443/tcp, 0.0.0.0:4443->4443/tcp, 80/tcp
registry /entrypoint.sh serve /etc/ ... Up 5000/tcp
~
# exit
Now try to log into harbor after the install:
$ docker login ${HARBOR_VM}:443
Logging into harbor ...
Username (admin):
Password:
Error response from daemon: Login: <html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>nginx/1.11.5</center>
</body>
</html>
(Code: 404; Headers: map[Server:[nginx/1.11.5] Date:[Tue, 11 Jul 2017 22:19:19 GMT] Content-Type:[text/html] Content-Length:[169]])
docker login failed
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 15 (7 by maintainers)
Hi @carlsone,
For the latest version of harbor, the DB scheme changes. You need update DB firstly, and then to start latest harbor. I will let you know how to update DB, but it’s still changing before FC.
-Yan