wahyd4 / aria2-ariang-x-docker-compose

Docker compose files for Aria2+ AriaNg+ filerun/ Nextcloud/ h5ai + Plex. 图形化BT,磁力,离线下载,文件管理,播放,投屏
1.79k stars 281 forks source link

502 Bad Gateway #35

Closed cqgis closed 6 years ago

cqgis commented 6 years ago

Hello,我通过运行

  git clone https://github.com/wahyd4/aria2-ariang-x-docker-compose.git
  cd aria2-ariang-x-docker-compose/nextcloud
  docker-compose up

后访问 http://localhost:8000 返回 502 Bad Gateway,请问这有可能是什么原因造成的? 访问 http://localhost:8000/aria2 可以正常访问。

输出的信息如下:

D:\Users\zhya\Desktop\filerun\aria2-ariang-x-docker-compose\nextcloud>docker-compose up
Creating network "nextcloud_default" with the default driver
Creating nextcloud_nextcloud_1 ... done
Creating nextcloud_aria2_1     ... done
Attaching to nextcloud_nextcloud_1, nextcloud_aria2_1
nextcloud_1  | Updating permissions...
nextcloud_1  | Updating permissions in /nextcloud...
aria2_1      | Run aria2c and ariaNG
aria2_1      | false
aria2_1      | Start aria2 with standard mode
aria2_1      | Activating privacy features... done.
aria2_1      | http://
aria2_1      | http:///aria2
aria2_1      | 10/Apr/2018:14:57:10 +0000 [ERROR 502 /] dial tcp 172.19.0.2:8888: getsockopt: connection refused
aria2_1      | 172.19.0.1 - - [10/Apr/2018:14:57:10 +0000] "GET / HTTP/1.1" 502 40
aria2_1      | 10/Apr/2018:14:57:10 +0000 [ERROR 502 /favicon.ico] dial tcp 172.19.0.2:8888: getsockopt: connection refused
aria2_1      | 172.19.0.1 - - [10/Apr/2018:14:57:10 +0000] "GET /favicon.ico HTTP/1.1" 502 16
aria2_1      | 10/Apr/2018:14:57:11 +0000 [ERROR 502 /] dial tcp 172.19.0.2:8888: getsockopt: connection refusedaria2_1      | 172.19.0.1 - - [10/Apr/2018:14:57:11 +0000] "GET / HTTP/1.1" 502 40
aria2_1      | 10/Apr/2018:14:57:11 +0000 [ERROR 502 /favicon.ico] dial tcp 172.19.0.2:8888: getsockopt: connection refusedaria2_1      | 172.19.0.1 - - [10/Apr/2018:14:57:11 +0000] "GET /favicon.ico HTTP/1.1" 502 16
aria2_1      | 10/Apr/2018:14:57:11 +0000 [ERROR 502 /] dial tcp 172.19.0.2:8888: getsockopt: connection refused
aria2_1      | 172.19.0.1 - - [10/Apr/2018:14:57:11 +0000] "GET / HTTP/1.1" 502 40aria2_1      | 10/Apr/2018:14:57:11 +0000 [ERROR 502 /favicon.ico] dial tcp 172.19.0.2:8888: getsockopt: connection refused
aria2_1      | 172.19.0.1 - - [10/Apr/2018:14:57:11 +0000] "GET /favicon.ico HTTP/1.1" 502 16aria2_1      | 10/Apr/2018:14:57:11 +0000 [ERROR 502 /] dial tcp 172.19.0.2:8888: getsockopt: connection refused
aria2_1      | 172.19.0.1 - - [10/Apr/2018:14:57:11 +0000] "GET / HTTP/1.1" 502 40
aria2_1      | 10/Apr/2018:14:57:11 +0000 [ERROR 502 /favicon.ico] dial tcp 172.19.0.2:8888: getsockopt: connection refused
cqgis commented 6 years ago

噢,对了,我的docker 版本如下:

Client:
 Version:       18.03.0-ce
 API version:   1.37
 Go version:    go1.9.4
 Git commit:    0520e24
 Built: Wed Mar 21 23:06:28 2018
 OS/Arch:       windows/amd64
 Experimental:  false
 Orchestrator:  swarm

Server:
 Engine:
  Version:      18.03.0-ce
  API version:  1.37 (minimum version 1.12)
  Go version:   go1.9.4
  Git commit:   0520e24
  Built:        Wed Mar 21 23:14:32 2018
  OS/Arch:      linux/amd64
  Experimental: true
wahyd4 commented 6 years ago

因为你在windows 上面运行,对吧?在docker-compose.yml 里面有这样的代码:

services:
  nextcloud:
    image: wonderfall/nextcloud
    volumes:
      - /data/nextcloud:/data
      - /data:/user-files
    restart: always

volumes 下面的目录,在windows 下面是不存在的哦,所有你可以去掉或者对应修改成windows 下面的目录试试。

通常情况在在windows 上直接运行都会有或多或少一些问题,你可以试试下载 ubuntu 子系统, 在ubuntu 里面安装docker 再试试

cqgis commented 6 years ago

是的,我是在windows下运行的。那个映射地址我是修改了的,否则运行docker-compose up就会报错,windows 10的ubuntu子系统好像不能安装docker吧?

wahyd4 commented 6 years ago

那你可以运行docker ps 看看,是否两个container 都正常运行? windows 10 上面的ubuntu 可以安装任何东西

cqgis notifications@github.com于2018年4月11日周三 下午2:56写道:

是的,我是在windows下运行的。那个映射地址我是修改了的,否则运行docker-compose up就会报错,windows 10的 ubuntu子系统好像不能安装docker吧?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/wahyd4/aria2-ariang-x-docker-compose/issues/35#issuecomment-380327203, or mute the thread https://github.com/notifications/unsubscribe-auth/AAzD4IMWCk4_OtkwBKwhCQpUiIUPRh1dks5tnY0HgaJpZM4TOcLt .

cqgis commented 6 years ago

我在另外一个windows10的电脑上同样的问题。运行 docker ps两个容器运行正常:

CONTAINER ID        IMAGE                                COMMAND                  CREATED             STATUS              PORTS                                                                          NAMES
67936e7aae14        wahyd4/aria2-ui:nextcloud            "/bin/sh /root/conf/…"   2 minutes ago       Up 17 seconds       0.0.0.0:443->443/tcp, 0.0.0.0:6800->6800/tcp, 2015/tcp, 0.0.0.0:8000->80/tcp   nextcloud_aria2_1
4963bd489efd        wonderfall/nextcloud                 "run.sh"                 2 minutes ago       Up 18 seconds       8888/tcp                                                                       nextcloud_nextcloud_1
cqgis commented 6 years ago

Hello,我想我应该是找到原因了。容器启动后,有一个比较长的配置过程,我在配置完成之前访问,所以返回了502。

nextcloud_1  | Updating permissions in /data...
nextcloud_1  | Updating permissions in /config...
nextcloud_1  | Updating permissions in /apps2...
nextcloud_1  | Updating permissions in /var/log...
nextcloud_1  | Updating permissions in /php...
nextcloud_1  | Updating permissions in /nginx...
nextcloud_1  | Updating permissions in /tmp...
nextcloud_1  | Updating permissions in /etc/s6.d...
nextcloud_1  | Done updating permissions.
nextcloud_1  | Starting automatic configuration...
nextcloud_1  | Automatic configuration finished.