Skip to content
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

Use docker to login, get "connection refused" #21199

Open
lengcangche-gituhub opened this issue Nov 17, 2024 · 3 comments
Open

Use docker to login, get "connection refused" #21199

lengcangche-gituhub opened this issue Nov 17, 2024 · 3 comments
Labels
help wanted The issues that is valid but needs help from community

Comments

@lengcangche-gituhub
Copy link

Expected behavior and actual behavior:
When I try to use docker to login to my Harbor registy (reg.lccdomain.com), the conncetion is refused. The output is:
Error response from daemon: Get http://reg.lccdomain.com/v2/: dial tcp 192.168.2.144:80: connect: connection refused

Tips: 192.168.2.144 is the IP address of one of the network interface of the machine where Harbor is installed.

The content of /etc/docker/daemon.json is as follows:
{
"registry-mirrors": ["https://b9pmyelo.mirror.aliyuncs.com"],
"insecure-registries":["reg.lccdomain.com"]
}

The related content (without the commented content) of harbor.yml is as follows:
hostname: reg.lccdomain.com
http:
port: 80

Steps to reproduce the problem:

  1. systemctl restart docker
  2. docker compose down -v
  3. ./install.sh (I didn't use "docker compose up -d" to restart harbor)
  4. docker login reg.lccdomain.com
  5. enter username and password

Versions:
Please specify the versions of following systems.

  • harbor version:
    Loaded image: goharbor/redis-photon:v2.3.4
    Loaded image: goharbor/nginx-photon:v2.3.4
    Loaded image: goharbor/harbor-core:v2.3.4
    Loaded image: goharbor/harbor-log:v2.3.4
    Loaded image: goharbor/harbor-db:v2.3.4
    Loaded image: goharbor/harbor-exporter:v2.3.4
    Loaded image: goharbor/registry-photon:v2.3.4
    Loaded image: goharbor/prepare:v2.3.4
    Loaded image: goharbor/harbor-portal:v2.3.4
    Loaded image: goharbor/harbor-jobservice:v2.3.4
    Loaded image: goharbor/harbor-registryctl:v2.3.4

  • docker engine version: [y.y.y]
    20.10.7

  • docker-compose version: [z.z.z]
    1.25.0

Additional context:

  • Harbor config files: You can get them by packaging harbor.yml and files in the same directory, including subdirectory.
  • Log files: You can get them by package the /var/log/harbor/ .
@lengcangche-gituhub
Copy link
Author

Additional context:

  • netstat -tuln | grep 80
    tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
    tcp6 0 0 :::80 :::* LISTEN
    udp 0 0 0.0.0.0:8085 0.0.0.0:*

  • lsof -i:80
    COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
    docker-pr 108337 root 4u IPv4 452903 0t0 TCP *:http (LISTEN)
    docker-pr 108343 root 4u IPv6 451814 0t0 TCP *:http (LISTEN)

@MinerYang MinerYang added the help wanted The issues that is valid but needs help from community label Nov 18, 2024
@MinerYang
Copy link
Contributor

Hi @lengcangche-gituhub ,

Please update to the latest harbor version. And make sure your harbor hostname is accessible at your side.

@bangzzzz
Copy link

You might want to try using telnetto verify that the servers are connected to each other first

telnet 192.168.2.144 80

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted The issues that is valid but needs help from community
Projects
None yet
Development

No branches or pull requests

3 participants