Log File Errors

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
4 years ago
Hi All,

Since upgrading to Nop 4.20 I'm see errors similjar to the following in my logs.  This is preventing emails from being sent, and other tasks from running correctly.  If someone can please check and advise would be much appreciated.



scheduled task failed with the "One or more errors occurred. (No such host is known)" error


Full Error Messages


The "Keep alive" scheduled task failed with the "One or more errors occurred. (No such host is known)" error (Task type: "Nop.Services.Common.KeepAliveTask, Nop.Services". Store name: "Urban Personal Training". Task run address: "http://www.urban-pt.com.au/scheduletask/runtask").

System.AggregateException: One or more errors occurred. (No such host is known) ---> System.Net.Http.HttpRequestException: No such host is known ---> System.Net.Sockets.SocketException: No such host is known
   at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)
   at System.Threading.Tasks.ValueTask`1.get_Result()
   at System.Net.Http.HttpConnectionPool.CreateConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Threading.Tasks.ValueTask`1.get_Result()
   at System.Net.Http.HttpConnectionPool.WaitForCreatedConnectionAsync(ValueTask`1 creationTask)
   at System.Threading.Tasks.ValueTask`1.get_Result()
   at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.FinishSendAsyncBuffered(Task`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts)
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at Nop.Services.Tasks.TaskThread.Run() in C:\andrei\nopcommerce\sources\src\Libraries\Nop.Services\Tasks\TaskThread.cs:line 71
---> (Inner Exception #0) System.Net.Http.HttpRequestException: No such host is known ---> System.Net.Sockets.SocketException: No such host is known
   at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)
   at System.Threading.Tasks.ValueTask`1.get_Result()
   at System.Net.Http.HttpConnectionPool.CreateConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Threading.Tasks.ValueTask`1.get_Result()
   at System.Net.Http.HttpConnectionPool.WaitForCreatedConnectionAsync(ValueTask`1 creationTask)
   at System.Threading.Tasks.ValueTask`1.get_Result()
   at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.FinishSendAsyncBuffered(Task`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts)<---


Other errors include . . .

The "Send emails" scheduled task failed with the "One or more errors occurred. (A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond)" error (Task type: "Nop.Services.Messages.QueuedMessagesSendTask, Nop.Services". Store name: "Pro Dive Central Coast". Task run address: "http://www.prodivecentralcoast.com.au/scheduletask/runtask").

System.AggregateException: One or more errors occurred. (A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) ---> System.Net.Http.HttpRequestException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
   at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)
   at System.Threading.Tasks.ValueTask`1.get_Result()
   at System.Net.Http.HttpConnectionPool.CreateConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Threading.Tasks.ValueTask`1.get_Result()
   at System.Net.Http.HttpConnectionPool.WaitForCreatedConnectionAsync(ValueTask`1 creationTask)
   at System.Threading.Tasks.ValueTask`1.get_Result()
   at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.FinishSendAsyncBuffered(Task`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts)
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at Nop.Services.Tasks.TaskThread.Run() in C:\andrei\nopcommerce\sources\src\Libraries\Nop.Services\Tasks\TaskThread.cs:line 71
---> (Inner Exception #0) System.Net.Http.HttpRequestException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
   at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)
   at System.Threading.Tasks.ValueTask`1.get_Result()
   at System.Net.Http.HttpConnectionPool.CreateConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Threading.Tasks.ValueTask`1.get_Result()
   at System.Net.Http.HttpConnectionPool.WaitForCreatedConnectionAsync(ValueTask`1 creationTask)
   at System.Threading.Tasks.ValueTask`1.get_Result()
   at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.FinishSendAsyncBuffered(Task`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts)<---



Regards,

Paul
4 years ago
Interestingly, in the case of the mail send schedule for example, it seems that only the runs done via schedule fail, the ones that are manually started appear to go through fine.  At least they do not raise an error log.

Cheers,
Paul
4 years ago
Hi,

Make sure the Store URL is correct. You can find this setting in Configuration -> Stores.

Regards,
Stoyan
4 years ago
Hi, thanks for the response.  Problem solved.

In my case it could not resolve the hostname of the website from within the server.  The hosts file contained the ip address for the external IP address and not the internal so would never have resolved.  Once the hosts file was fixed up we're all good.


Cheers,
Paul
4 years ago
pspeirs wrote:
Hi, thanks for the response.  Problem solved.

In my case it could not resolve the hostname of the website from within the server.  The hosts file contained the ip address for the external IP address and not the internal so would never have resolved.  Once the hosts file was fixed up we're all good.


Cheers,
Paul


Can you explain how did you resolved this issue, I am also getting this issue.

especially this thing

The hosts file contained the ip address for the external IP address and not the internal so would never have resolved.
4 years ago
fahad99 wrote:
Hi, thanks for the response.  Problem solved.

In my case it could not resolve the hostname of the website from within the server.  The hosts file contained the ip address for the external IP address and not the internal so would never have resolved.  Once the hosts file was fixed up we're all good.


Cheers,
Paul

Can you explain how did you resolved this issue, I am also getting this issue.

especially this thing

The hosts file contained the ip address for the external IP address and not the internal so would never have resolved.


I had the same issue in which I resolved as well. We are self hosting our website at our office. Let's say our website is "www.website.com".

Our ISP provided router does not allow Loopback. Inside the office, we cannot access "www.website.com". Since we are a small office, we modified the "hosts" file on everyone's computer so "www.website.com" would resolve to the internal IP address of the server / computer the site is hosted on.

However, we did NOT do this on the server hosting the site itself. We modified the "hosts" file, so the address of the server / computer the site is hosted on would resolve to the internal IP address of the server.

This solved our problem.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.