go-ignite / ignite

A SS(R) panel for managing multiple users, powered by Go & Docker.
MIT License
455 stars 127 forks source link

容器方式安装后 ignite 无法进入,ignite-admin正常 #29

Open wz-wong opened 5 years ago

wz-wong commented 5 years ago

你好,我用容器方式安装后, ignite 面板无法进入, 管理界面正常 经检测 5000 端口关闭状态, 8000正常开启 有空的话麻烦指出下是什么问题. docker ps "./ignite" About a minute ago Up 58 seconds 0.0.0.0:5000->5000/tcp ignite "./ignite-admin" About an hour ago Up 58 seconds 0.0.0.0:8000->8000/tcp ignite-admin netstat -ntlp 服务器端口正常监听 tcp6 :::8000 :::* LISTEN 1277/docker-proxy tcp6 :::5000 :::* LISTEN 1264/docker-proxy 电脑测端口, 8000正常, 5000不通 telnet xx.xx.xx.xx 8000
telnet xx.xx.xx.xx 5000

不知道什么原因,导致 5000 端口无法使用,下面是我的 docker 配置文件 environment: - HOST_ADDRESS=123.123.123.123 # ip这样格式的 - HOST_FROM=5001 - HOST_TO=6000 ports: - "5000:5000" environment: - AUTH_USERNAME=123 - AUTH_PASSWORD=123 - Auth_SECRET=ignite2017 ports: - "8000:8000" 其他无改变 docker log 参考 docker logs -f 容器id config: map[address::5000 db_driver:sqlite3 db_connect:./data/ignite.db host_address:123.123.123.123 host_from:5001 host_to:6000] [GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production. - using env: export GIN_MODE=release - using code: gin.SetMode(gin.ReleaseMode) [GIN-debug] GET /panel/logout --> github.com/go-ignite/ignite/controllers.(*MainRouter).LogoutHandler-fm (5 handlers) [GIN-debug] POST /panel/create --> github.com/go-ignite/ignite/controllers.(*MainRouter).CreateServiceHandler-fm (5 handlers) [GIN-debug] Listening and serving HTTP on :5000 [xorm] [info] 2019/09/19 11:42:20.291986 PING DATABASE sqlite3 latest: Pulling from goignite/ss-libev Digest: sha256:fe5f894899aa434ee79e071877c86b3e07016edc3c9430e5684da0e75ddd2be0 Status: Image is up to date for goignite/ss-libev:latest latest: Pulling from goignite/ssr Digest: sha256:8c0dafd9902c341527c0d3b8f2812efa43ae9928c2299fecba8ed2da9abf9ab2 Status: Image is up to date for goignite/ssr:latest

希望能对你解决问题有所帮助.

wz-wong commented 5 years ago

已经关闭防火墙,关闭selinux, 输入过 关闭 ipv6 的命令,重启过, 但 似乎没效, 依旧有 tcp6 监听(ifconfig 查看ip,已经没有了 ipv6的信息你)

sharkwang commented 5 years ago

docker容器会优先使用IP6,安装docker之前关掉ip6协议

发自我的 iPhone

在 2019年9月19日,12:03,wzzxx7 notifications@github.com 写道:

你好,我用容器方式安装后, ignite 面板无法进入, 管理界面正常 经检测 5000 端口关闭状态, 8000正常开启 有空的话麻烦指出下是什么问题. docker ps "./ignite" About a minute ago Up 58 seconds 0.0.0.0:5000->5000/tcp ignite "./ignite-admin" About an hour ago Up 58 seconds 0.0.0.0:8000->8000/tcp ignite-admin netstat -ntlp 服务器端口正常监听 tcp6 :::8000 ::: LISTEN 1277/docker-proxy tcp6 :::5000 ::: LISTEN 1264/docker-proxy 电脑测端口, 8000正常, 5000不通 telnet xx.xx.xx.xx 8000 telnet xx.xx.xx.xx 5000

不知道什么原因,导致 5000 端口无法使用,下面是我的 docker 配置文件 environment:

  • HOST_ADDRESS=123.123.123.123 # ip这样格式的
  • HOST_FROM=5001
  • HOST_TO=6000 ports:
  • "5000:5000" environment:
  • AUTH_USERNAME=123
  • AUTH_PASSWORD=123
  • Auth_SECRET=ignite2017 ports:
  • "8000:8000" 其他无改变 docker log 参考 docker logs -f 容器id config: map[address::5000 db_driver:sqlite3 db_connect:./data/ignite.db host_address:123.123.123.123 host_from:5001 host_to:6000] [GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
  • using env: export GIN_MODE=release
  • using code: gin.SetMode(gin.ReleaseMode) [GIN-debug] GET /panel/logout --> github.com/go-ignite/ignite/controllers.(MainRouter).LogoutHandler-fm (5 handlers) [GIN-debug] POST /panel/create --> github.com/go-ignite/ignite/controllers.(MainRouter).CreateServiceHandler-fm (5 handlers) [GIN-debug] Listening and serving HTTP on :5000 [xorm] [info] 2019/09/19 11:42:20.291986 PING DATABASE sqlite3 latest: Pulling from goignite/ss-libev Digest: sha256:fe5f894899aa434ee79e071877c86b3e07016edc3c9430e5684da0e75ddd2be0 Status: Image is up to date for goignite/ss-libev:latest latest: Pulling from goignite/ssr Digest: sha256:8c0dafd9902c341527c0d3b8f2812efa43ae9928c2299fecba8ed2da9abf9ab2 Status: Image is up to date for goignite/ssr:latest

希望能对你解决问题有所帮助.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

wz-wong commented 5 years ago

docker容器会优先使用IP6,安装docker之前关掉ip6协议 发自我的 iPhone 在 2019年9月19日,12:03,wzzxx7 @.**> 写道: 你好,我用容器方式安装后, ignite 面板无法进入, 管理界面正常 经检测 5000 端口关闭状态, 8000正常开启 有空的话麻烦指出下是什么问题. docker ps "./ignite" About a minute ago Up 58 seconds 0.0.0.0:5000->5000/tcp ignite "./ignite-admin" About an hour ago Up 58 seconds 0.0.0.0:8000->8000/tcp ignite-admin netstat -ntlp 服务器端口正常监听 tcp6 :::8000 ::: LISTEN 1277/docker-proxy tcp6 :::5000 ::: LISTEN 1264/docker-proxy 电脑测端口, 8000正常, 5000不通 telnet xx.xx.xx.xx 8000 telnet xx.xx.xx.xx 5000 不知道什么原因,导致 5000 端口无法使用,下面是我的 docker 配置文件 environment: - HOST_ADDRESS=123.123.123.123 # ip这样格式的 - HOST_FROM=5001 - HOST_TO=6000 ports: - "5000:5000" environment: - AUTH_USERNAME=123 - AUTH_PASSWORD=123 - Auth_SECRET=ignite2017 ports: - "8000:8000" 其他无改变 docker log 参考 docker logs -f 容器id config: map[address::5000 db_driver:sqlite3 db_connect:./data/ignite.db host_address:123.123.123.123 host_from:5001 host_to:6000] [GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production. - using env: export GIN_MODE=release - using code: gin.SetMode(gin.ReleaseMode) [GIN-debug] GET /panel/logout --> github.com/go-ignite/ignite/controllers.(MainRouter).LogoutHandler-fm (5 handlers) [GIN-debug] POST /panel/create --> github.com/go-ignite/ignite/controllers.(*MainRouter).CreateServiceHandler-fm (5 handlers) [GIN-debug] Listening and serving HTTP on :5000 [xorm] [info] 2019/09/19 11:42:20.291986 PING DATABASE sqlite3 latest: Pulling from goignite/ss-libev Digest: sha256:fe5f894899aa434ee79e071877c86b3e07016edc3c9430e5684da0e75ddd2be0 Status: Image is up to date for goignite/ss-libev:latest latest: Pulling from goignite/ssr Digest: sha256:8c0dafd9902c341527c0d3b8f2812efa43ae9928c2299fecba8ed2da9abf9ab2 Status: Image is up to date for goignite/ssr:latest 希望能对你解决问题有所帮助. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

谢谢你的回复, 遗憾的是,刚才按照你的方法,重装了系统,事先关闭了 ipv6, 再执行的时候,依旧是描述的状态 ,查看端口,仍然是 tcp6 tcp6 0 0 :::8000 :::* LISTEN 2301/docker-proxy tcp6 0 0 :::5000 :::* LISTEN 2314/docker-proxy 有运行 关闭命令 vi /etc/sysctl.conf 添加 : net.ipv6.conf.all.disable_ipv6 =1 net.ipv6.conf.default.disable_ipv6 =1 sysctl -p 使生效 你有其他好的思路吗

wz-wong commented 5 years ago

再次追加 :
非 ipv6 问题 已关闭ipv6 , 用 netstat -lnpt 查看 tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1264/master tcp 0 0 0.0.0.0:8000 0.0.0.0:* LISTEN 1903/docker-proxy tcp 0 0 0.0.0.0:5000 0.0.0.0:* LISTEN 2186/docker-proxy 测试端口 5000 依旧不通, 贴下 ignite 配置 :
ignite: container_name: ignite image: goignite/ignite volumes: - "./data:/root/ignite/data" - "/var/run/docker.sock:/var/run/docker.sock" environment: - HOST_ADDRESS=localhost #- DB_DRIVER=sqlite3 #- DB_CONNECT=./data/ignite.db #- HOST_FROM=5001 #- HOST_TO=6000 ports: - "5000:5000" restart: always `

wz-wong commented 5 years ago

再次更新: 找到了一个凑合用的解决方法

ignite:

- "8000:5000" # 可以正常用8000端口,5000不可用, ignite-admin不可用
# - "3000:3000" # 使用 ignite-admin 时用这行替换

ignite-admin:

- "5000:5000" # 不可用状态, ignite 和 ignite 只能存一 # - "8000:8000" # 可用状态,管理时替换 按理说 不同端口是可以挂不同网站的,不知道为什么会失败. 系统 : centOS7 vps服务商 : justhost 供参考

wz-wong commented 5 years ago

@sharkwang 你好,现在找到一个凑合的解决方式, 可能不是 ipv6 问题,后台重新关了, 查看端口没有 tcp6 了,依然不行,最后的解决方式是 不正常的 ignite 用 8000 端口, 正常的 ignite-admin 用其他端口( 两个只能存在一个正常), 谢谢你的回答.