goharbor / harbor

An open source trusted cloud native registry project that stores, signs, and scans content.
https://goharbor.io
Apache License 2.0
24.11k stars 4.76k forks source link

The uploaded images can't be displayed in repositories on the web UI #108

Closed ganting closed 8 years ago

ganting commented 8 years ago

i got this problem also, but it's not the upcase reason my config.yml

version: 0.1
log:
  level: debug
  fields:
    service: registry
storage:
    cache:
        layerinfo: inmemory
    filesystem:
        rootdirectory: /storage
    maintenance:
        uploadpurging:
            enabled: false
http:
    addr: :5000
    secret: placeholder
    debug:
        addr: localhost:5001
auth:
  token:
    issuer: registry-token-issuer
    realm: https://10.33.40.144/service/token
    rootcertbundle: /etc/registry/root.crt
    service: token-service

notifications:
  endpoints:
      - name: harbor
        disabled: false
        url: http://ui/service/notifications
        timeout: 500
        threshold: 5
        backoff: 1000

log: log.tar.gz

after 1 minute, ui response

<html>
 <head><title>504 Gateway Time-out</title></head>
 <body bgcolor="white">
 <center><h1>504 Gateway Time-out</h1></center>
 <hr><center>nginx/1.9.4</center>
 </body>
 </html>
 <!-- a padding to disable MSIE and Chrome friendly error page -->
 <!-- a padding to disable MSIE and Chrome friendly error page -->
 <!-- a padding to disable MSIE and Chrome friendly error page -->
 <!-- a padding to disable MSIE and Chrome friendly error page -->
 <!-- a padding to disable MSIE and Chrome friendly error page -->
 <!-- a padding to disable MSIE and Chrome friendly error page -->

but i can use docker client pull image

pls help me

reasonerjt commented 8 years ago

I see this in your log

Apr 14 15:16:45 172.18.0.1 docker/ui[2307]: <html><head>
Apr 14 15:16:45 172.18.0.1 docker/ui[2307]: <title>Proxy error: 502 Server dropped connection.</title>
Apr 14 15:16:45 172.18.0.1 docker/ui[2307]: </head><body>
Apr 14 15:16:45 172.18.0.1 docker/ui[2307]: <h1>502 Server dropped connection</h1>
Apr 14 15:16:45 172.18.0.1 docker/ui[2307]: <p>The following error occurred while trying to access <strong>http://registry:5000/v2/_catalog</strong>:<br><br>
Apr 14 15:16:45 172.18.0.1 docker/ui[2307]: <strong>502 Server dropped connection</strong></p>
Apr 14 15:16:45 172.18.0.1 docker/ui[2307]: <hr>Generated Thu, 14 Apr 2016 15:16:44 CST by Polipo on <em>ubuntu:8123</em>.

Are you running "Polipo" on your machine?

ganting commented 8 years ago

yes, i climb the company firewall and GFC by polipo, ok, I will verify whether this is the problem

ganting commented 8 years ago

yes, it's the polipo prevent the request. thanks

reasonerjt commented 8 years ago

Thanks. But I'm just curious how why it impacts the connection "between" containers, the containers have their own network.

ganting commented 8 years ago

i use the proxy env when build ui image because of firewall. so the env get into the container. but i do not set the no_proxy env to skip the harbor_registry ip, so in the ui container, all the request for harbor_registry proxied by polipo. which restult 502 error.