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部署采集不成功 #11

Open
jkjoy opened this issue Jul 13, 2023 · 3 comments
Open

docker部署采集不成功 #11

jkjoy opened this issue Jul 13, 2023 · 3 comments

Comments

@jkjoy
Copy link

jkjoy commented Jul 13, 2023

  07/13/2023 05:28:30 : 开始采集任务

fail: Moments.Service.GatherService[0]
Flurl.Http.FlurlHttpException: Call failed. Resource temporarily unavailable (www.sunpeiwen.com:443): GET https://www.sunpeiwen.com/atom.xml
---> System.Net.Http.HttpRequestException: Resource temporarily unavailable (www.sunpeiwen.com:443)
---> System.Net.Sockets.SocketException (11): Resource temporarily unavailable
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
at System.Net.Sockets.Socket.g__WaitForConnectWithCancellation|281_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem queueItem)
at System.Threading.Tasks.TaskCompletionSourceWithCancellation1.WaitWithCancellationAsync(CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.HttpConnectionWaiter1.WaitForConnectionAsync(Boolean async, CancellationToken requestCancellationToken)
at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpClient.g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
at Flurl.Http.FlurlRequest.SendAsync(HttpMethod verb, HttpContent content, HttpCompletionOption completionOption, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at Flurl.Http.FlurlRequest.HandleExceptionAsync(FlurlCall call, Exception ex, CancellationToken token)
at Flurl.Http.FlurlRequest.SendAsync(HttpMethod verb, HttpContent content, HttpCompletionOption completionOption, CancellationToken cancellationToken)
at Flurl.Http.FlurlRequest.SendAsync(HttpMethod verb, HttpContent content, HttpCompletionOption completionOption, CancellationToken cancellationToken)
at Flurl.Http.ResponseExtensions.ReceiveString(Task1 response) at Moments.Service.GatherService.GetAtom(String url, Int32 fid) in /src/Service/GatherService.cs:line 173 fail: Moments.Service.GatherService[0] Flurl.Http.FlurlHttpException: Call failed. Resource temporarily unavailable (www.jkjoy.cn:443): GET https://www.jkjoy.cn/atom.xml ---> System.Net.Http.HttpRequestException: Resource temporarily unavailable (www.jkjoy.cn:443) ---> System.Net.Sockets.SocketException (11): Resource temporarily unavailable at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken) at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token) at System.Net.Sockets.Socket.g__WaitForConnectWithCancellation|281_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken) --- End of inner exception stack trace --- at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem queueItem) at System.Threading.Tasks.TaskCompletionSourceWithCancellation1.WaitWithCancellationAsync(CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.HttpConnectionWaiter1.WaitForConnectionAsync(Boolean async, CancellationToken requestCancellationToken) at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken) at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpClient.g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken) at Flurl.Http.FlurlRequest.SendAsync(HttpMethod verb, HttpContent content, HttpCompletionOption completionOption, CancellationToken cancellationToken) --- End of inner exception stack trace --- at Flurl.Http.FlurlRequest.HandleExceptionAsync(FlurlCall call, Exception ex, CancellationToken token) at Flurl.Http.FlurlRequest.SendAsync(HttpMethod verb, HttpContent content, HttpCompletionOption completionOption, CancellationToken cancellationToken) at Flurl.Http.FlurlRequest.SendAsync(HttpMethod verb, HttpContent content, HttpCompletionOption completionOption, CancellationToken cancellationToken) at Flurl.Http.ResponseExtensions.ReceiveString(Task1 response)
at Moments.Service.GatherService.GetAtom(String url, Int32 fid) in /src/Service/GatherService.cs:line 173

@Drizzle365
Copy link
Owner

可能是因为服务器无法连接这俩网站,我在本地测试了
https://www.[jkjoy.cn/atom.xml](https://www.jkjoy.cn/atom.xml)
https://www.[sunpeiwen.com/atom.xml](https://www.sunpeiwen.com/atom.xml)
可以正常采集,你可以尝试使用docker容器ping一下这两个网站看看是否可以联通

@AXFOX
Copy link

AXFOX commented Aug 19, 2023

你采集失败的时候会崩溃吗?我用Podman rootless跑的时候貌似采集失败会导致容器停止运行,暂时没空折腾,等明年再好好研究。

info: Moments.Service.StartService[0]

      启动朋友圈服务

warn: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[60]

      Storing keys in a directory '/root/.aspnet/DataProtection-Keys' that may not be persisted outside of the container. Protected data will be unavailable when container is destroyed.

info: Microsoft.Hosting.Lifetime[14]

      Now listening on: http://[::]:80

info: Microsoft.Hosting.Lifetime[0]

      Application started. Press Ctrl+C to shut down.

info: Microsoft.Hosting.Lifetime[0]

      Hosting environment: Production

info: Microsoft.Hosting.Lifetime[0]

      Content root path: /app

warn: Microsoft.AspNetCore.HttpsPolicy.HttpsRedirectionMiddleware[3]

      Failed to determine the https port for redirect.

warn: Moments.Service.GatherService[0]

      站点采集失败:https://iboy66lee.club/feed

warn: Moments.Service.GatherService[0]

      站点采集失败:https://www.fcall.cc/feed

fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]

      Unhandled exception in circuit 'uQNVlugPXoButI9RuYFGwKJYoiQEi1sedpK-6qe3EH0'.

      System.FormatException: The string 'Fri, 03 Feb 2023 14:59:30 CST' was not recognized as a valid DateTime. There is an unknown word starting at index '26'.

         at System.DateTime.Parse(String s)

         at Moments.Service.GatherService.GetRss(String url, Int32 fid) in /src/Service/GatherService.cs:line 105

         at Moments.Service.GatherService.GetFeed(String url, Rule rule, Int32 fid) in /src/Service/GatherService.cs:line 72

         at Moments.Service.GatherService.GatherRssItem(Friend target) in /src/Service/GatherService.cs:line 31

         at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)

         at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.ExecuteSynchronously(TaskCompletionSource completion, SendOrPostCallback d, Object state)

         at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)

      --- End of stack trace from previous location ---

         at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)

         at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.ExecuteBackground(WorkItem item)

info: Microsoft.Hosting.Lifetime[0]

      Application is shutting down...

顺便说一下,这个日志里的俩站一个是套了cf站长没刷新缓存所以根本无法正常访问,另一个是压根就没/feed,我上机测试的时候刚好有这俩特例。
后来我删了这俩再测试就没再复现出来崩溃。

@Drizzle365
Copy link
Owner

你采集失败的时候会崩溃吗?我用Podman rootless跑的时候貌似采集失败会导致容器停止运行,暂时没空折腾,等明年再好好研究。

info: Moments.Service.StartService[0]

      启动朋友圈服务

warn: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[60]

      Storing keys in a directory '/root/.aspnet/DataProtection-Keys' that may not be persisted outside of the container. Protected data will be unavailable when container is destroyed.

info: Microsoft.Hosting.Lifetime[14]

      Now listening on: http://[::]:80

info: Microsoft.Hosting.Lifetime[0]

      Application started. Press Ctrl+C to shut down.

info: Microsoft.Hosting.Lifetime[0]

      Hosting environment: Production

info: Microsoft.Hosting.Lifetime[0]

      Content root path: /app

warn: Microsoft.AspNetCore.HttpsPolicy.HttpsRedirectionMiddleware[3]

      Failed to determine the https port for redirect.

warn: Moments.Service.GatherService[0]

      站点采集失败:https://iboy66lee.club/feed

warn: Moments.Service.GatherService[0]

      站点采集失败:https://www.fcall.cc/feed

fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]

      Unhandled exception in circuit 'uQNVlugPXoButI9RuYFGwKJYoiQEi1sedpK-6qe3EH0'.

      System.FormatException: The string 'Fri, 03 Feb 2023 14:59:30 CST' was not recognized as a valid DateTime. There is an unknown word starting at index '26'.

         at System.DateTime.Parse(String s)

         at Moments.Service.GatherService.GetRss(String url, Int32 fid) in /src/Service/GatherService.cs:line 105

         at Moments.Service.GatherService.GetFeed(String url, Rule rule, Int32 fid) in /src/Service/GatherService.cs:line 72

         at Moments.Service.GatherService.GatherRssItem(Friend target) in /src/Service/GatherService.cs:line 31

         at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)

         at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.ExecuteSynchronously(TaskCompletionSource completion, SendOrPostCallback d, Object state)

         at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)

      --- End of stack trace from previous location ---

         at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)

         at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.ExecuteBackground(WorkItem item)

info: Microsoft.Hosting.Lifetime[0]

      Application is shutting down...

顺便说一下,这个日志里的俩站一个是套了cf站长没刷新缓存所以根本无法正常访问,另一个是压根就没/feed,我上机测试的时候刚好有这俩特例。 后来我删了这俩再测试就没再复现出来崩溃。

看日志是日期格式化的问题,这个问题前面修复过但是没有打包到 docker仓库,我也最近备考可能没时间整,年底考完好好完善完善╮(‵▽′)╭

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

3 participants