最新的 gitlab 无法使用 8929 端口访问了吗?

最新的 gitlab 无法使用 8929 端口访问了吗?

version: "3.6"
services:
  gitlab:
    container_name: gitlab
    image: "gitlab/gitlab-ce:16.5.4-ce.0"
    restart: always
    hostname: "192.168.31.245"
    environment:
      # GITLAB_OMNIBUS_CONFIG: |
      #   external_url 'http://192.168.31.245:8929'
      #   gitlab_rails['gitlab_shell_ssh_port'] = 2224
      EXTERNAL_URL: http://192.168.31.245:8929
      GITLAB_ROOT_PASSWORD: ponponon
    ports:
      - "8929:8929"
      - "2224:22"
    volumes:
      - ./volumes/config:/etc/gitlab
      - ./volumes/logs:/var/log/gitlab
      - ./volumes/data:/var/opt/gitlab
    shm_size: "256m"

使用 docker-compose 跑了一个 gitlab 玩玩,但是容器已经正常了,但是在浏览器无法访问

图片.png

但是从日志看不出异常

==> /var/log/gitlab/gitlab-exporter/current <==
2023-12-14_14:59:47.06331 127.0.0.1 - - [14/Dec/2023:14:59:47 UTC] "GET /database HTTP/1.1" 200 1671
2023-12-14_14:59:47.06334 - -> /database
2023-12-14_14:59:47.97277 127.0.0.1 - - [14/Dec/2023:14:59:47 UTC] "GET /ruby HTTP/1.1" 200 1066
2023-12-14_14:59:47.97279 - -> /ruby

==> /var/log/gitlab/gitlab-workhorse/current <==
{"error":"keywatcher: pubsub receive: EOF","level":"error","msg":"","time":"2023-12-14T14:59:49Z"}
{"address":"/var/opt/gitlab/redis/redis.socket","level":"info","msg":"redis: dialing","network":"unix","time":"2023-12-14T14:59:49Z"}

==> /var/log/gitlab/gitlab-exporter/current <==
2023-12-14_14:59:49.82465 127.0.0.1 - - [14/Dec/2023:14:59:49 UTC] "GET /sidekiq HTTP/1.1" 200 119346
2023-12-14_14:59:49.82466 - -> /sidekiq

==> /var/log/gitlab/gitlab-rails/production_json.log <==
{"method":"GET","path":"/-/metrics","format":"html","controller":"MetricsController","action":"index","status":200,"time":"2023-12-14T14:59:54.605Z","params":[],"db_count":0,"db_write_count":0,"db_cached_count":0,"db_replica_count":0,"db_primary_count":0,"db_main_count":0,"db_ci_count":0,"db_main_replica_count":0,"db_ci_replica_count":0,"db_replica_cached_count":0,"db_primary_cached_count":0,"db_main_cached_count":0,"db_ci_cached_count":0,"db_main_replica_cached_count":0,"db_ci_replica_cached_count":0,"db_replica_wal_count":0,"db_primary_wal_count":0,"db_main_wal_count":0,"db_ci_wal_count":0,"db_main_replica_wal_count":0,"db_ci_replica_wal_count":0,"db_replica_wal_cached_count":0,"db_primary_wal_cached_count":0,"db_main_wal_cached_count":0,"db_ci_wal_cached_count":0,"db_main_replica_wal_cached_count":0,"db_ci_replica_wal_cached_count":0,"db_replica_duration_s":0.0,"db_primary_duration_s":0.0,"db_main_duration_s":0.0,"db_ci_duration_s":0.0,"db_main_replica_duration_s":0.0,"db_ci_replica_duration_s":0.0,"cpu_s":0.032286,"mem_objects":5389,"mem_bytes":1440056,"mem_mallocs":1177,"mem_total_bytes":1655616,"pid":990,"worker_id":"puma_1","rate_limiting_gates":[],"correlation_id":"c87947a1-5527-4d45-bb4b-99d49b1764be","db_duration_s":0.0,"view_duration_s":0.00036,"duration_s":0.02926}

我能保证网络是通的,因为上面的日志,是一次请求后 gitlab 输出的日志

docker logs --tail=100 -f gitlab
阅读 1.1k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进