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

在云服务器上指定mysql部署,无法用ip+端口打开网页 #1899

Open
1 of 5 tasks
805934132 opened this issue Oct 29, 2024 · 2 comments
Open
1 of 5 tasks
Labels
bug Something isn't working

Comments

@805934132
Copy link

805934132 commented Oct 29, 2024

例行检查

  • 我已确认目前没有类似 issue
  • 我已确认我已升级到最新版本
  • 我已完整查看过项目 README,尤其是常见问题部分
  • 我理解并愿意跟进此 issue,协助测试和提供反馈
  • 我理解并认可上述内容,并理解项目维护者精力有限,不遵循规则的 issue 可能会被无视或直接关闭

问题描述

docker run --name one-api -d --restart always -p 3000:3000 -e SQL_DSN="root:123456@tcp(localhost:3306)/oneapi" -e TZ=Asia/Shanghai -v /home/ubuntu/data/one-api:/data justsong/one-api

在云服务器上用这个命令 指定SQL_DSN
无法通过服务器ip+3000端口打开网页

发现指定SQL_DSN后 仅仅开放了ipv6的3000端口
tcp6 0 0 :::3000 :::* LISTEN

复现步骤

预期结果

相关截图
如果没有的话,请删除此节。

@805934132 805934132 added the bug Something isn't working label Oct 29, 2024
@QAbot-zh
Copy link

docker logs -f one-api 进去看看日志,多半是连接数据库失败,没有启动起来

@805934132
Copy link
Author

知道原因了 云服务器有两层防火墙。跟代码没关系

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants