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

Docker安装完成后访问ip:port返回HTTP500 #259

Open
AlexanderWolfZhang opened this issue Dec 28, 2023 · 5 comments
Open

Docker安装完成后访问ip:port返回HTTP500 #259

AlexanderWolfZhang opened this issue Dec 28, 2023 · 5 comments

Comments

@AlexanderWolfZhang
Copy link

Discussed in https://github.com/MoeNetwork/Tieba-Cloud-Sign/discussions/258

Originally posted by AlexanderWolfZhang December 28, 2023
Ubuntu22.04.3版本,对照docker compose中的环境变量手动配置添加了容器,启动后访问ip:端口出现http500报错。数据库使用了服务器上原本的数据库(docker部署,mariadb:latest),host、用户名和库名都填写了,tiebacloud的docker中可以ping通数据库的docker,并且如果故意在env中填错数据库名的话还会提示“对数据库xx的访问被拒绝”,也说明数据库是可以连上的,但是只要把数据库名修改为正确的名称则访问就会出现500报错,查看数据库里也没有数据表。
docker的配置和问题相关截图如下图所示
clip 2023-12-28
clip 2023-12-28 (2)
clip 2023-12-28 (3)
clip 2023-12-28 (4)

@AlexanderWolfZhang
Copy link
Author

AlexanderWolfZhang commented Dec 28, 2023

查看docker日志,部分截取和全文如下:

PHP Fatal error:  Uncaught mysqli_sql_exception: Table 'tiebacloud.tc_options' doesn't exist in /var/www/lib/class.mysqli.php:119
Stack trace:
#0 /var/www/lib/class.mysqli.php(119): mysqli->query()
#1 /var/www/lib/reg.php(25): wmysql->query()
#2 /var/www/init.php(53): require('...')
#3 /var/www/do.php(4): require('...')
#4 {main}
  thrown in /var/www/lib/class.mysqli.php on line 119
[tiebacloud_logs.txt](https://github.com/MoeNetwork/Tieba-Cloud-Sign/files/13783516/tiebacloud_logs.txt)

@BANKA2017
Copy link
Collaborator

你的配置的数据库用户 tieba 没有对应数据库的读写权限,去 phpMyAdmin 设置一下应该就好了

@AlexanderWolfZhang
Copy link
Author

你的配置的数据库用户 tieba 没有对应数据库的读写权限,去 phpMyAdmin 设置一下应该就好了

tieba用户对tieba数据库有all privileges权限,并且尝试使用root用户操作也是一样的问题
clip 2023-12-29

@AlexanderWolfZhang
Copy link
Author

AlexanderWolfZhang commented Jan 3, 2024

在另一台机器上全新安装了Ubuntu和docker环境,直接用原本的yml一字未改启动容器,手动在容器的/var/www/setup/下新建install.lock后仍然出现相同的报错
clip 2024-01-03

@AlexanderWolfZhang
Copy link
Author

修好了,不能一开始起容器的时候就配置volume选项,需要先进入一次页面然后安装相关依赖并填写配置项,正常安装完成后才可以重新配置容器并启用volume导出

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants