RayWangQvQ / BiliBiliToolPro

B 站(bilibili)自动任务工具,支持docker、青龙、k8s等多种部署方式。敏感肌也能用。
MIT License
6.05k stars 1.74k forks source link

【Bug】青龙 cron 运行报错找不到 dotnet #715

Closed hang333 closed 4 months ago

hang333 commented 4 months ago

版本号:dev branch ade2a2aef4fdece1383104a5d2aa81e1bcd98bfd 运行环境:青龙 podman (已尝试重新部署)

问题描述: Crontab 运行的时候会报错找不到 dotnet 然后尝试安装 dotnet 失败,手动执行的话可以正常运行

日志信息:

## 开始执行... 2024-05-09 17:44:00

bilitool: 青龙repo目录: /ql/data/repo
bilitool: bili仓库目录: /ql/data/repo/RayWangQvQ_BiliBiliToolPro
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:26ef1154-5995-4d24-ad78-ef0b04f11587
X-Response-Cache-Status: True
Content-Length: 0
Expires: Thu, 09 May 2024 09:44:05 GMT
Cache-Control: max-age=0, no-cache, no-store
Pragma: no-cache
Date: Thu, 09 May 2024 09:44:05 GMT
Connection: keep-alive
Strict-Transport-Security: max-age=31536000 ; includeSubDomains

HTTP/2 200 
accept-ranges: bytes
age: 558793
content-md5: lH/GSf5izc73YqEKf2ZkyA==
content-type: application/octet-stream
date: Thu, 09 May 2024 09:44: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: Generated 1 links.
dotnet-install: Link 0: aka.ms, 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: install_dotnet 
dotnet-install: Archive path: /tmp/dotnet.c6a8CflOE
dotnet-install: Attempting to download using aka.ms link https://dotnetcli.azureedge.net/dotnet/Sdk/6.0.421/dotnet-sdk-6.0.421-linux-musl-x64.tar.gz
dotnet-install: Calling: download https://dotnetcli.azureedge.net/dotnet/Sdk/6.0.421/dotnet-sdk-6.0.421-linux-musl-x64.tar.gz /tmp/dotnet.c6a8CflOE
dotnet-install: Calling: machine_has curl
dotnet-install: Calling: downloadcurl https://dotnetcli.azureedge.net/dotnet/Sdk/6.0.421/dotnet-sdk-6.0.421-linux-musl-x64.tar.gz /tmp/dotnet.c6a8CflOE
dotnet-install: Calling: machine_has curl
dotnet-install: Remote file https://dotnetcli.azureedge.net/dotnet/Sdk/6.0.421/dotnet-sdk-6.0.421-linux-musl-x64.tar.gz size is 185517695 bytes.
dotnet-install: Extracting archive from https://dotnetcli.azureedge.net/dotnet/Sdk/6.0.421/dotnet-sdk-6.0.421-linux-musl-x64.tar.gz
dotnet-install: Calling: extract_dotnet_package /tmp/dotnet.c6a8CflOE /root/.dotnet 185517695
dotnet-install: Calling: copy_files_or_dirs_from_list /tmp/dotnet.AMEC1IyWO /root/.dotnet false
dotnet-install: Calling: get_current_os_name 
dotnet-install: Calling: get_linux_platform_name 
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Private.DataContractSerialization.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Runtime.Loader.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Dynamic.Runtime.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.IO.UnmanagedMemoryStream.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Console.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Net.Ping.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Collections.Immutable.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Security.Cryptography.Encoding.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Xml.XDocument.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/libSystem.Security.Cryptography.Native.OpenSsl.so': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Threading.Thread.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Diagnostics.Contracts.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Runtime.InteropServices.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Xml.Linq.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.IO.FileSystem.Primitives.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Threading.Tasks.Dataflow.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Globalization.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/mscorlib.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Runtime.Numerics.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Net.WebProxy.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Text.RegularExpressions.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Security.Cryptography.Algorithms.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Linq.Queryable.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Runtime.Extensions.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Web.HttpUtility.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Resources.ResourceManager.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Security.Claims.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Diagnostics.Tracing.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Net.NetworkInformation.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/libclrjit.so': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/libSystem.Globalization.Native.so': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/libmscordbi.so': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Runtime.Serialization.Formatters.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/libcoreclrtraceptprovider.so': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/Microsoft.VisualBasic.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Net.Security.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Diagnostics.Process.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/createdump': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Security.Cryptography.Primitives.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.ComponentModel.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Threading.ThreadPool.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.ComponentModel.TypeConverter.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/Microsoft.Win32.Registry.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Security.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.IO.MemoryMappedFiles.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Diagnostics.TextWriterTraceListener.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Runtime.Serialization.Xml.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/Microsoft.VisualBasic.Core.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Xml.XmlDocument.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Globalization.Extensions.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Collections.Concurrent.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Data.DataSetExtensions.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Collections.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Xml.XPath.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.ValueTuple.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Threading.Tasks.Extensions.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Runtime.Handles.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Collections.Specialized.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.IO.FileSystem.AccessControl.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Private.Xml.Linq.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Collections.NonGeneric.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Security.Principal.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Reflection.DispatchProxy.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Net.WebClient.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.IO.Pipes.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Windows.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Private.Xml.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Xml.ReaderWriter.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Threading.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Net.Mail.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/.version': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Security.Principal.Windows.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Xml.Serialization.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Net.ServicePoint.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.IO.FileSystem.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Net.WebHeaderCollection.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Diagnostics.DiagnosticSource.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.IO.FileSystem.DriveInfo.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Reflection.TypeExtensions.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Drawing.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/Microsoft.Win32.Primitives.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Diagnostics.TraceSource.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Text.Encoding.CodePages.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/libhostpolicy.so': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Linq.Parallel.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Reflection.Emit.Lightweight.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Runtime.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Threading.Channels.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Buffers.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Net.Primitives.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Net.Requests.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Threading.Timer.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/WindowsBase.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Security.Cryptography.Csp.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.IO.Pipes.AccessControl.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Diagnostics.Tools.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/libdbgshim.so': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Reflection.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Runtime.InteropServices.RuntimeInformation.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/libSystem.Native.so': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Security.Cryptography.Cng.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Net.Quic.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Diagnostics.FileVersionInfo.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Threading.Overlapped.dll': File exists
cp: cannot create regular file '/root/.dotnet/shared/Microsoft.NETCore.App/6.0.29/System.Xml.XmlSerializer.dll': File exists
dotnet-install: Calling: copy_files_or_dirs_from_list /tmp/dotnet.AMEC1IyWO /root/.dotnet true
dotnet-install: Calling: get_current_os_name 
dotnet-install: Calling: get_linux_platform_name 
dotnet-install: Calling: validate_remote_local_file_sizes /tmp/dotnet.c6a8CflOE 185517695
dotnet-install: Either downloaded or local package size can not be measured. One of them may be corrupted.
dotnet-install: Temporary archive file /tmp/dotnet.c6a8CflOE was removed
dotnet-install: Checking installation: version = 6.0.421
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: Installed version is 6.0.421
dotnet-install: Calling: combine_paths /root/.dotnet 
dotnet-install: combine_paths: root_path=/root/.dotnet
dotnet-install: combine_paths: child_path=
dotnet-install: Calling: get_absolute_path /root/.dotnet/
chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
dotnet-install: Adding to current process PATH: `/root/.dotnet`. Note: This change will be visible only when sourcing script.
dotnet-install: Note that the script does not resolve dependencies during installation.
dotnet-install: To check the list of dependencies, go to https://learn.microsoft.com/dotnet/core/install, select your operating system and check the "Dependencies" section.
dotnet-install: Installation finished successfully.
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-09 17:45:05  耗时 65 秒     
RayWangQvQ commented 4 months ago

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

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

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

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

hang333 commented 4 months ago

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 秒    
hang333 commented 4 months ago

尝试删除了 ~/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

hang333 commented 4 months ago

手动修改了 https://github.com/RayWangQvQ/BiliBiliToolPro/blob/156b02789464e705251669f1abd7aa3fee1d8882/qinglong/DefaultTasks/bili_task_base.sh#L15 为 _develop 手动运行正常了,接下来是否会运行失败需要等明日的 cron 周期

RayWangQvQ commented 4 months ago

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

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

RayWangQvQ commented 4 months ago

image

这里错了

hang333 commented 4 months ago

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

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

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

RayWangQvQ commented 4 months ago

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

hang333 commented 4 months ago

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

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 秒     
RayWangQvQ commented 4 months ago

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

github-actions[bot] commented 4 months ago

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

hang333 commented 4 months ago

那就再检查下权限问题吧。 容器内默认是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 秒     
hang333 commented 4 months ago

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

hang333 commented 4 months ago

问题解决了,感谢!