Code Monkey home page Code Monkey logo

Comments (14)

RayWangQvQ avatar RayWangQvQ commented on June 1, 2024 1

image

这里错了

from bilibilitoolpro.

hang333 avatar hang333 commented on June 1, 2024 1

dev分支里的 bili_branch 应该就是_develop,不需要手动改,你可能还是哪里的什么导致两个混了。

或者,不嫌麻烦的话,把2个bili的库都删了,重新拉呗

我搞懂了,是订阅拉取的白名单未更改导致没用 dev 的脚本

from bilibilitoolpro.

hang333 avatar hang333 commented on June 1, 2024 1

问题解决了,感谢!

from bilibilitoolpro.

RayWangQvQ avatar RayWangQvQ commented on June 1, 2024

bili仓库目录: /ql/data/repo/RayWangQvQ_BiliBiliToolPro

你如果是使用dev分支的话,它应该是/ql/data/repo/RayWangQvQ_BiliBiliToolPro_develop才对,可以看下/ql/data/repo/目录下实际啥情况。

脚本里dotnet确实有报错,你说的“手动执行的话可以正常运行”具体指什么,是进容器执行什么指令吗?

然后,实在不行,也可以选择切换运行模式为bilitool,这样就不用安装dotnet了

from bilibilitoolpro.

hang333 avatar hang333 commented on June 1, 2024

bili仓库目录: /ql/data/repo/RayWangQvQ_BiliBiliToolPro

你如果是使用dev分支的话,它应该是/ql/data/repo/RayWangQvQ_BiliBiliToolPro_develop才对,可以看下/ql/data/repo/目录下实际啥情况。

脚本里dotnet确实有报错,你说的“手动执行的话可以正常运行”具体指什么,是进容器执行什么指令吗?

然后,实在不行,也可以选择切换运行模式为bilitool,这样就不用安装dotnet了

我注意到你说的情况了,repo 文件夹有两个不同分支(我只在定时任务界面把原来分支的任务删掉)

total 8.0K
drwxr-xr-x 16 root root 4.0K May  9 22:06 RayWangQvQ_BiliBiliToolPro
drwxr-xr-x 15 root root 4.0K May  8 19:58 RayWangQvQ_BiliBiliToolPro_develop

但定时任务执行的指令应该是
task RayWangQvQ_BiliBiliToolPro_develop/qinglong/DefaultTasks/bili_task_login.sh 才对

手动执行的意思是在青龙面板 --> 定时任务 --> 运行

手动执行的日志显示它似乎也还是在原来的分支运行(?

## 开始执行... 2024-05-09 22:06:24

bilitool: 青龙repo目录: /ql/data/repo
bilitool: bili仓库目录: /ql/data/repo/RayWangQvQ_BiliBiliToolPro
bilitool: 当前系统发行版本:alpine.3.19.1
bilitool: 当前系统:linux-musl
bilitool: 当前架构:x64
bilitool: 当前选择的运行方式:dotnet
bilitool: 已安装dotnet,当前版本:6.0.129
bilitool: which dotnet: /usr/bin/dotnet
bilitool: 环境正常,本次无需安装
  ____               ____    _   _____           _  
 |  _ \ __ _ _   _  | __ ) _| |_|_   _|__   ___ | | 
 | |_) / _` | | | | |  _ \(_) (_) | |/ _ \ / _ \| | 
 |  _ < (_| | |_| | | |_) | | | | | | (_) | (_) | | 
 |_| \_\__,_|\__, | |____/|_|_|_| |_|\___/ \___/|_| 
             |___/                                  

[22:06:39 INF] BiliBiliToolPro 开始运行...

[22:06:39 INF] 【账号个数】1个

[22:06:39 INF] 【目标任务】Daily
[22:06:39 INF] ######### 账号 1 #########

我把原来分支的文件夹删掉,只保留 _develop 分支的文件夹然后手动运行报错

## 开始执行... 2024-05-09 23:18:26

bilitool: 青龙repo目录: /ql/data/repo
bilitool: bili仓库目录: 
bilitool: 当前系统发行版本:alpine.3.19.1
bilitool: 当前系统:linux-musl
bilitool: 当前架构:x64
bilitool: 当前选择的运行方式:dotnet
bilitool: 已安装dotnet,当前版本:6.0.129
bilitool: which dotnet: /usr/bin/dotnet
bilitool: 环境正常,本次无需安装
./bili_task_base.sh: line 459: cd: /src/Ray.BiliBiliTool.Console: No such file or directory

## 执行结束... 2024-05-09 23:18:27  耗时 1 秒    

from bilibilitoolpro.

hang333 avatar hang333 commented on June 1, 2024

尝试删除了 ~/ql/data/scripts/RayWangQvQ_BiliBiliToolPro 仅保留 ~/ql/data/scripts/RayWangQvQ_BiliBiliToolPro_develop
报错情况依旧
./bili_task_base.sh: line 459: cd: /src/Ray.BiliBiliTool.Console: No such file or directory

from bilibilitoolpro.

hang333 avatar hang333 commented on June 1, 2024

手动修改了

bili_branch="" # 分支名,空或_develop

为 _develop
手动运行正常了,接下来是否会运行失败需要等明日的 cron 周期

from bilibilitoolpro.

RayWangQvQ avatar RayWangQvQ commented on June 1, 2024

dev分支里的 bili_branch 应该就是_develop,不需要手动改,你可能还是哪里的什么导致两个混了。

或者,不嫌麻烦的话,把2个bili的库都删了,重新拉呗

from bilibilitoolpro.

RayWangQvQ avatar RayWangQvQ commented on June 1, 2024

嗯是的,那块文档强调的不太够,稍后我来改下

from bilibilitoolpro.

hang333 avatar hang333 commented on June 1, 2024

嗯是的,那块文档强调的不太够,稍后我来改下

dev 版出现同样的问题

## 开始执行... 2024-05-10 04:42:00

bilitool: 青龙repo目录: /ql/data/repo
bilitool: bili仓库目录: /ql/data/repo/RayWangQvQ_BiliBiliToolPro_develop
bilitool: 当前系统发行版本:alpine.3.19.1
bilitool: 当前系统:linux-musl
bilitool: 当前架构:x64
bilitool: 当前选择的运行方式:dotnet
System.TypeInitializationException: The type initializer for 'Microsoft.DotNet.Cli.Parser' threw an exception.
 ---> System.TypeInitializationException: The type initializer for 'Microsoft.DotNet.Cli.AddCommandParser' threw an exception.
 ---> System.IO.FileNotFoundException: Unable to find the specified file.
   at Interop.Sys.GetCwdHelper(Byte* ptr, Int32 bufferSize)
   at Interop.Sys.GetCwd()
   at System.IO.Directory.GetCurrentDirectory()
   at Microsoft.DotNet.Cli.CommonOptions.DefaultToCurrentDirectory[T](Argument`1 arg)
   at Microsoft.DotNet.Cli.AddCommandParser..cctor()
   --- End of inner exception stack trace ---
   at Microsoft.DotNet.Cli.AddCommandParser.GetCommand()
   at Microsoft.DotNet.Cli.Parser..cctor()
   --- End of inner exception stack trace ---
   at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, TimeSpan startupTime, ITelemetry telemetryClient)
   at Microsoft.DotNet.Cli.Program.Main(String[] args)
bilitool: 未安装
bilitool: 开始安装环境
bilitool: 开始安装dotnet
bilitool: 当前系统:alpine
bilitool: 使用apk安装
ERROR: Unable to lock database: temporary error (try again later)
ERROR: Failed to open apk database: temporary error (try again later)
bilitool: 再尝试使用官方脚本安装
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
dotnet-install: Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:
dotnet-install: - The SDK needs to be installed without user interaction and without admin rights.
dotnet-install: - The SDK installation doesn't need to persist across multiple CI runs.
dotnet-install: To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.

dotnet-install: Calling: machine_has curl
dotnet-install: Calling: calculate_vars 
dotnet-install: Calling: get_normalized_architecture_from_architecture <auto>
dotnet-install: Calling: get_machine_architecture 
dotnet-install: Normalized architecture: 'x64'.
dotnet-install: Calling: get_normalized_os 
dotnet-install: Calling: get_current_os_name 
dotnet-install: Calling: get_linux_platform_name 
dotnet-install: Normalized OS: 'linux-musl'.
dotnet-install: Calling: get_normalized_quality 
dotnet-install: Normalized quality: ''.
dotnet-install: Calling: get_normalized_channel 6.0
dotnet-install: Normalized channel: '6.0'.
dotnet-install: Calling: get_normalized_product 
dotnet-install: Normalized product: 'dotnet-sdk'.
dotnet-install: Calling: resolve_installation_path <auto>
dotnet-install: Calling: get_user_install_path 
dotnet-install: resolve_installation_path: user_install_path=/root/.dotnet
dotnet-install: InstallRoot: '/root/.dotnet'.
dotnet-install: Calling: get_normalized_architecture_for_specific_sdk_version Latest 6.0 x64
dotnet-install: Calling: get_current_os_name 
dotnet-install: Calling: get_linux_platform_name 
dotnet-install: Calling: get_download_link_from_aka_ms 
dotnet-install: Retrieving primary payload URL from aka.ms for channel: '6.0', quality: '', product: 'dotnet-sdk', os: 'linux-musl', architecture: 'x64'.
dotnet-install: Constructed aka.ms link: 'https://aka.ms/dotnet/6.0/dotnet-sdk-linux-musl-x64.tar.gz'.
dotnet-install: Calling: get_http_header https://aka.ms/dotnet/6.0/dotnet-sdk-linux-musl-x64.tar.gz true
dotnet-install: Calling: machine_has curl
dotnet-install: Calling: get_http_header_curl https://aka.ms/dotnet/6.0/dotnet-sdk-linux-musl-x64.tar.gz true
dotnet-install: Received response: HTTP/1.1 301 Moved Permanently
Server: Kestrel
Location: https://dotnetcli.azureedge.net/dotnet/Sdk/6.0.421/dotnet-sdk-6.0.421-linux-musl-x64.tar.gz
Request-Context: appId=cid-v1:7d63747b-487e-492a-872d-762362f77974
X-Response-Cache-Status: True
Content-Length: 0
Expires: Thu, 09 May 2024 20:42:06 GMT
Cache-Control: max-age=0, no-cache, no-store
Pragma: no-cache
Date: Thu, 09 May 2024 20:42:06 GMT
Connection: keep-alive
Strict-Transport-Security: max-age=31536000 ; includeSubDomains

HTTP/2 200 
accept-ranges: bytes
age: 598273
content-md5: lH/GSf5izc73YqEKf2ZkyA==
content-type: application/octet-stream
date: Thu, 09 May 2024 20:42:06 GMT
etag: 0x8DC5896EE8FD714
last-modified: Tue, 09 Apr 2024 13:14:05 GMT
server: ECAcc (sgc/56CC)
x-cache: HIT
x-ms-blob-type: BlockBlob
x-ms-lease-status: unlocked
x-ms-request-id: 76e7586f-001e-00a7-14e0-9c018a000000
x-ms-version: 2009-09-19
content-length: 185517695

dotnet-install: The redirect location retrieved: 'https://dotnetcli.azureedge.net/dotnet/Sdk/6.0.421/dotnet-sdk-6.0.421-linux-musl-x64.tar.gz'.
dotnet-install: Retrieved primary payload URL from aka.ms link: 'https://dotnetcli.azureedge.net/dotnet/Sdk/6.0.421/dotnet-sdk-6.0.421-linux-musl-x64.tar.gz'.
dotnet-install: Downloading using legacy url will not be attempted.
dotnet-install: Version: '6.0.421'.
dotnet-install: Calling: get_specific_product_version  6.0.421 https://dotnetcli.azureedge.net/dotnet/Sdk/6.0.421/dotnet-sdk-6.0.421-linux-musl-x64.tar.gz
dotnet-install: Calling: get_specific_product_version_url  6.0.421 true https://dotnetcli.azureedge.net/dotnet/Sdk/6.0.421/dotnet-sdk-6.0.421-linux-musl-x64.tar.gz
dotnet-install: Constructed productVersion link: https://dotnetcli.azureedge.net/dotnet/Sdk/6.0.421/sdk-productVersion.txt
dotnet-install: Calling: get_specific_product_version_url  6.0.421 false https://dotnetcli.azureedge.net/dotnet/Sdk/6.0.421/dotnet-sdk-6.0.421-linux-musl-x64.tar.gz
dotnet-install: Constructed productVersion link: https://dotnetcli.azureedge.net/dotnet/Sdk/6.0.421/productVersion.txt
dotnet-install: Checking for the existence of https://dotnetcli.azureedge.net/dotnet/Sdk/6.0.421/sdk-productVersion.txt
dotnet-install: Calling: machine_has curl
dotnet-install: Calling: is_dotnet_package_installed /root/.dotnet sdk 6.0.421
dotnet-install: Calling: combine_paths /root/.dotnet sdk
dotnet-install: combine_paths: root_path=/root/.dotnet
dotnet-install: combine_paths: child_path=sdk
dotnet-install: Calling: combine_paths /root/.dotnet/sdk 6.0.421
dotnet-install: combine_paths: root_path=/root/.dotnet/sdk
dotnet-install: combine_paths: child_path=6.0.421
dotnet-install: is_dotnet_package_installed: dotnet_package_path=/root/.dotnet/sdk/6.0.421
dotnet-install: .NET Core SDK with version '6.0.421' is already installed.
bilitool: 添加到PATH
System.TypeInitializationException: The type initializer for 'Microsoft.DotNet.Cli.Parser' threw an exception.
 ---> System.TypeInitializationException: The type initializer for 'Microsoft.DotNet.Cli.AddCommandParser' threw an exception.
 ---> System.IO.FileNotFoundException: Unable to find the specified file.
   at Interop.Sys.GetCwdHelper(Byte* ptr, Int32 bufferSize)
   at Interop.Sys.GetCwd()
   at System.IO.Directory.GetCurrentDirectory()
   at Microsoft.DotNet.Cli.CommonOptions.DefaultToCurrentDirectory[T](Argument`1 arg)
   at Microsoft.DotNet.Cli.AddCommandParser..cctor()
   --- End of inner exception stack trace ---
   at Microsoft.DotNet.Cli.AddCommandParser.GetCommand()
   at Microsoft.DotNet.Cli.Parser..cctor()
   --- End of inner exception stack trace ---
   at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, TimeSpan startupTime, ITelemetry telemetryClient)
   at Microsoft.DotNet.Cli.Program.Main(String[] args)
bilitool: Error: 安装失败
bilitool: Error: 请根据文档自行在青龙容器中安装dotnet:https://learn.microsoft.com/zh-cn/dotnet/core/install/linux-alpine
bilitool: Error: 或者尝试切换运行模式为bilitool,它不需要安装dotnet:https://github.com/RayWangQvQ/BiliBiliToolPro/blob/develop/qinglong/README.md

## 执行结束... 2024-05-10 04:42:08  耗时 8 秒     

from bilibilitoolpro.

RayWangQvQ avatar RayWangQvQ commented on June 1, 2024

那就再检查下权限问题吧。
容器内默认是root 用户,所以dotnet一般都会被安装到root目录下,也就是需要root权限。
正常青龙的定时任务就是以root权限执行的。
看下你的两种方式,成功的和失败的,分别都是以什么权限执行的?是否一致?是否自己做过什么权限相关的限制?

from bilibilitoolpro.

github-actions avatar github-actions commented on June 1, 2024

🕸️ This has been inactive for 3 days, please confirm if it still needs attention~~

from bilibilitoolpro.

hang333 avatar hang333 commented on June 1, 2024

那就再检查下权限问题吧。 容器内默认是root 用户,所以dotnet一般都会被安装到root目录下,也就是需要root权限。 正常青龙的定时任务就是以root权限执行的。 看下你的两种方式,成功的和失败的,分别都是以什么权限执行的?是否一致?是否自己做过什么权限相关的限制?

我在那之后修改了脚本来在最开始输出 whoami,输出结果皆是 root
另外我发现如果执行单个任务的话都会成功,但是如果把全部任务勾选上一起执行,则会有几个任务失败/全部任务失败

那之后我也尝试了 BILI_MODE="bilitool"
也是一样如果全部一起执行会有概率出问题
该模式下的报错是

## bili批量取关主播[dev先行版]
## 开始执行... 2024-05-15 13:05:01

bilitool: current_user: root
bilitool: 青龙repo目录: /ql/data/repo
bilitool: bili仓库目录: /ql/data/repo/RayWangQvQ_BiliBiliToolPro_develop
bilitool: 当前系统发行版本:alpine.3.19.1
bilitool: 当前系统:linux-musl
bilitool: 当前架构:x64
bilitool: 当前选择的运行方式:bilitool
touch: cannot touch './tag.txt': No such file or directory
bilitool: tag.txt为空,未安装过
bilitool: 开始安装环境
bilitool: 开始安装bilitool
bilitool: 最新版本:2.1.1
bilitool: 下载地址:https://github.com/RayWangQvQ/BiliBiliToolPro/releases/download/2.1.1/bilibili-tool-pro-v2.1.1-linux-musl-x64.zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0 9353k    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0Warning: Failed to open the file bilitool-2.1.1.zip: No such file or directory
  0 9353k    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
curl: (23) Failure writing output to destination
unzip:  cannot find or open bilitool-2.1.1.zip, bilitool-2.1.1.zip.zip or bilitool-2.1.1.zip.ZIP.
./bili_dev_task_base.sh: line 417: ./tag.txt: No such file or directory
bilitool: Error: 安装失败,请检查日志并重试
bilitool: Error: 或者尝试切换运行模式为dotnet:https://github.com/RayWangQvQ/BiliBiliToolPro/blob/develop/qinglong/README.md

## 执行结束... 2024-05-15 13:05:05  耗时 4 秒     

或者

## bili每日任务[dev先行版]
## 开始执行... 2024-05-15 13:05:01

bilitool: current_user: root
bilitool: 青龙repo目录: /ql/data/repo
bilitool: bili仓库目录: /ql/data/repo/RayWangQvQ_BiliBiliToolPro_develop
bilitool: 当前系统发行版本:alpine.3.19.1
bilitool: 当前系统:linux-musl
bilitool: 当前架构:x64
bilitool: 当前选择的运行方式:bilitool
bilitool: tag.txt记录的版本:2.1.1
bilitool: bilitool已安装
bilitool: 环境正常,本次无需安装
cp: cannot open '/ql/data/repo/RayWangQvQ_BiliBiliToolPro_develop/bin/Ray.BiliBiliTool.Console' for reading: No such file or directory

## 执行结束... 2024-05-15 13:05:02  耗时 1 秒     

或者

## bili测试ck[dev先行版]
## 开始执行... 2024-05-15 13:05:01

bilitool: current_user: root
bilitool: 青龙repo目录: /ql/data/repo
find: /ql/data/repo/RayWangQvQ_BiliBiliToolPro_develop/bin: No such file or directory

## 执行结束... 2024-05-15 13:05:02  耗时 1 秒     

from bilibilitoolpro.

hang333 avatar hang333 commented on June 1, 2024

我看了一下最近的版本记录,似乎最新版有在尝试解决这个问题?我拉取一下看看明天的执行结果

from bilibilitoolpro.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.