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

部署出错 #11

Open
redkins opened this issue Nov 17, 2023 · 1 comment
Open

部署出错 #11

redkins opened this issue Nov 17, 2023 · 1 comment

Comments

@redkins
Copy link

redkins commented Nov 17, 2023

docker-compose 部署
mysql链接我外部的mysql
只有数据库名,表结构没有

2023/11/17 14:40:00 执行一次影片更新任务...

2023/11/17 14:40:03 /opt/server/model/Search.go:279 Error 1146 (42S02): Table 'FilmSite.search' doesn't exist
[1.370ms] [rows:0] SELECT count(*) FROM `search` WHERE `mid` = 73841 AND `search`.`deleted_at` IS NULL

2023/11/17 14:40:03 /opt/server/model/Search.go:290 Error 1146 (42S02): Table 'FilmSite.search' doesn't exist
[0.473ms] [rows:0] INSERT INTO `search` (`created_at`,`updated_at`,`deleted_at`,`mid`,`cid`,`pid`,`name`,`sub_title`,`c_name`,`class_tag`,`area`,`language`,`year`,`initial`,`score`,`update_stamp`,`hits`,`state`,`remarks`,`release_stamp`) VALUES ('2023-11-17 14:40:03.635','2023-11-17 14:40:03.635',NULL,73841,14,2,'罗密欧与祝英台国语','Romeo And His Butterfly Lover','香港剧','','香港','国语',2023,'L',0.000000,1700260290,0,'正片','已完结',1697552566)

2023/11/17 14:40:03 /opt/server/model/Search.go:279 sql: transaction has already been committed or rolled back
[0.010ms] [rows:0] SELECT count(*) FROM `search` WHERE `mid` = 73840 AND `search`.`deleted_at` IS NULL

2023/11/17 14:40:03 /opt/server/model/Search.go:290 sql: transaction has already been committed or rolled back
[0.024ms] [rows:0] INSERT INTO `search` (`created_at`,`updated_at`,`deleted_at`,`mid`,`cid`,`pid`,`name`,`sub_title`,`c_name`,`class_tag`,`area`,`language`,`year`,`initial`,`score`,`update_stamp`,`hits`,`state`,`remarks`,`release_stamp`) VALUES ('2023-11-17 14:40:03.637','2023-11-17 14:40:03.637',NULL,73840,14,2,'罗密欧与祝英台粤语','Romeo And His Butterfly Lover','香港剧','','香港','粤语',2023,'L',0.000000,1700260259,0,'正片','已完结',1697552563)
[GIN] 2023/11/17 - 14:40:10 | 200 |      277.71µs |      172.26.0.4 | GET      "/index"
[GIN] 2023/11/17 - 14:40:10 | 200 |     139.537µs |      172.26.0.4 | GET      "/navCategory"
2023/11/17 14:40:30 请求异常: URL: http://by.bfzyapi.com/api.php/provide/vod/?ac=detail&h=3&pg=2 Error: Get "http://by.bfzyapi.com/api.php/provide/vod/?ac=detail&h=3&pg=2": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
2023/11/17 14:40:30 获取数据失败:  Get "http://by.bfzyapi.com/api.php/provide/vod/?ac=detail&h=3&pg=2": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
2023/11/17 14:40:30 Update bf playDetail failed

对了还有代码里默认开了代理,我注释过了。

@ProudMuBai
Copy link
Owner

部署的话就用 film文件夹下的server, 修改也是在那个基础上修改的, 根目录下的server是我加一些新东西更的, 因为是本地环境所以开了代理, 一般不会同步到 film这个部署文件内容中, 至于数据表没创建的话可以开一下gorm的info 级别输出信息或者手动执行一下 CreateSearchTable()查看是否能够创建数据表, 也有可能是你外部服务器上mysql默认大小写敏感所导致的, 具体情况可以加一下我TG 或者留一个你的联系方式交流一下

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