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

Azure部署问题 #17

Closed
snicoe opened this issue Sep 17, 2023 · 7 comments
Closed

Azure部署问题 #17

snicoe opened this issue Sep 17, 2023 · 7 comments

Comments

@snicoe
Copy link

snicoe commented Sep 17, 2023

部署到Azure的应用程序服务,现在可以正常响应,但是客户端依然报错{"code":-1,"error":{"readyState":0,"responseText":"","status":0,"statusText":"error"}}

info: player msg: 从自定义服务器拉取视频地址中...
info: player msg: 使用首选代理服务器拉取视频地址...
debug: retryUntil.ajaxBy$: function(a,b){return new e.fn.init(a,b,h)}
debug: ajax: https://bilia***.azurewebsites.net/?cid=1086349651&qn=120&type=&otype=json&fourk=1&bvid=BV1aT411x7GC&ep_id=744345&fnver=0&fnval=80&session=621e5161abd10fdc6f8e56cf3ff45491&module=bangumi&access_key={{access_key}}
debug: atRun: 2, complete
debug: /pgc/player/web/playurl origin block: true {"code":-10403,"message":"抱歉您所在地区不可观看!"}
debug: __playinfo__ set
debug: set jQuery function(a,b){return new e.fn.init(a,b,h)} -> function i(t,a){return new i.fn.init(t,a,e)}
debug: injectAjax at: function i(t,a){return new i.fn.init(t,a,e)}
debug: __playinfo__ get
debug: __playinfo__ get
debug: __playinfo__ get
debug: __playinfo__ get
debug: __playinfo__ get
debug: __playinfo__ get
debug: __playinfo__ get
debug: season_type: 1
debug: playurl add 'module=bangumi' param
info: player msg: 从自定义服务器拉取视频地址中...
info: player msg: 使用首选代理服务器拉取视频地址...
debug: retryUntil.ajaxBy$: function i(t,a){return new i.fn.init(t,a,e)}
debug: ajax: https://bilia***.azurewebsites.net/?avid=undefined&cid=1086349651&bvid=BV1aT411x7GC&qn=120&type=&otype=json&ep_id=744345&fourk=1&fnver=0&fnval=80&session=ecbe4469d88fe5322c73ad56d8ee44fb&module=bangumi&balh_ajax=1&access_key=ccc24a54f91c44e2175fd4f1c75abb91
debug: /x/web-interface/nav {"uname":"D***","isLogin":true,"level":5,"vipType":1,"vipStatus":1,"isFromReport":false}
debug: /bfs/subtitle https://aisubtitle.hdslb.com/bfs/subtitle/e113d5f2319678c6d20721033cbc7463baabf2a4.json?auth_key=1694959719-f2354fdec84547bb878af27ee19d4b23-0-17f2001815723f6425ac21335b29ecf2
debug: userAgent Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36

App Service Log

2023-09-17T14:27:23.232362329Z: [ERROR]  NOTICE: PHP message: PHP Warning:  Undefined array key 1 in /home/site/wwwroot/index.php on line 23
2023-09-17T14:27:23.250616198Z: [ERROR]  NOTICE: PHP message: PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/site/wwwroot/index.php:1) in /home/site/wwwroot/index.php on line 90
2023-09-17T14:27:23.250628701Z: [ERROR]  NOTICE: PHP message: PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/site/wwwroot/index.php:1) in /home/site/wwwroot/index.php on line 91
2023-09-17T14:27:23.250633821Z: [ERROR]  127.0.0.1 -  17/Sep/2023:14:27:23 +0000 "GET /index.php" 200
2023-09-17T14:33:33.958069086Z: [ERROR]  NOTICE: PHP message: PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/site/wwwroot/index.php:1) in /home/site/wwwroot/index.php on line 90
2023-09-17T14:33:33.960028188Z: [ERROR]  NOTICE: PHP message: PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/site/wwwroot/index.php:1) in /home/site/wwwroot/index.php on line 91
2023-09-17T14:33:33.960075556Z: [ERROR]  127.0.0.1 -  17/Sep/2023:14:33:33 +0000 "GET /index.php" 200
2023-09-17T14:33:35.276176301Z: [ERROR]  NOTICE: PHP message: PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/site/wwwroot/index.php:1) in /home/site/wwwroot/index.php on line 90
2023-09-17T14:33:35.276209503Z: [ERROR]  127.0.0.1 -  17/Sep/2023:14:33:35 +0000 "GET /index.php" 200
2023-09-17T14:33:35.276458947Z: [ERROR]  NOTICE: PHP message: PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/site/wwwroot/index.php:1) in /home/site/wwwroot/index.php on line 91

不过看了下Azure的出口IP,归属地确实是属于香港,而且Azure VM上部署反代是可以的,说明不是IP问题,但是部署在Azure App service拉取不了视频,感觉Azure的环境很奇葩
image

image

@zzc10086
Copy link
Owner

看日志是php报错了,先解决报错吧.

@snicoe
Copy link
Author

snicoe commented Sep 18, 2023

看日志是php报错了,先解决报错吧.

2023-09-18T13:24:04.896539688Z: [ERROR]  [18-Sep-2023 13:24:04] NOTICE: fpm is running, pid 65
2023-09-18T13:24:04.897768994Z: [ERROR]  [18-Sep-2023 13:24:04] NOTICE: ready to handle connections
2023-09-18T13:24:06.436781533Z: [ERROR]  127.0.0.1 -  18/Sep/2023:13:24:06 +0000 "GET /index.php" 200
2023-09-18T13:24:16.833521975Z: [ERROR]  127.0.0.1 -  18/Sep/2023:13:24:16 +0000 "GET /index.php" 200
2023-09-18T13:24:27.341548222Z: [ERROR]  127.0.0.1 -  18/Sep/2023:13:24:27 +0000 "GET /index.php" 200

目前解决了Log中出现Cannot modify header information - headers already sent by,现在直接访问会出现
image

@zzc10086
Copy link
Owner

你的配置页面的后面是不是多了一个/,正确配置后面会有一个对号
image

@zzc10086
Copy link
Owner

直接访问后面加上uri和参数.例如/playurl?avid=undefined&cid=1086349651&bvid=BV1aT411x7GC&qn=120&type=&otype=json&ep_id=744345&fourk=1&fnver=0&fnval=80&session=ecbe4469d88fe5322c73ad56d8ee44fb&module=bangumi&balh_ajax=1

@snicoe
Copy link
Author

snicoe commented Sep 18, 2023

直接访问后面加上uri和参数.例如/playurl?avid=undefined&cid=1086349651&bvid=BV1aT411x7GC&qn=120&type=&otype=json&ep_id=744345&fourk=1&fnver=0&fnval=80&session=ecbe4469d88fe5322c73ad56d8ee44fb&module=bangumi&balh_ajax=1

配置是正确的
image
直接带上参数会直接404
image

@zzc10086
Copy link
Owner

你这个访问路径不能设置的话就直接用最原始的那个版本吧,没有路径判断
https://github.com/zzc10086/grocery_store/blob/f96543171c298b9a91eebe86d85a2793f339447a/bili_proxy/BPplayurl.php

@snicoe
Copy link
Author

snicoe commented Sep 18, 2023

你这个访问路径不能设置的话就直接用最原始的那个版本吧,没有路径判断 https://github.com/zzc10086/grocery_store/blob/f96543171c298b9a91eebe86d85a2793f339447a/bili_proxy/BPplayurl.php

目前还是报错,已经确定是Azure自带的php runtime或者策略有问题,准备放弃,Azure的这个面板逻辑太烂了,大部分时间都是在研究这个烂面板,总之感谢大佬的回复,我想想其他办法。

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