Scheduled tasks not working after upgrade to 4.0

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

I upgraded a store from 3.70 to 4.00 and now the scheduled task for sending email gives this result in system log(I have disabled all tasks except sending emails):

Short message:
Unable to connect to the remote server
Full message  
System.Net.WebException: Unable to connect to the remote server ---> 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 x.x.x.x:80
   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
   --- End of inner exception stack trace ---
   at System.Net.WebClient.UploadValues(Uri address, String method, NameValueCollection data)
   at System.Net.WebClient.UploadValues(String address, NameValueCollection data)
   at Nop.Services.Tasks.TaskThread.Run()

I have checked that the store URL are reflecting the real and all are green in warnings.

URL browser: https://oldebjerg.dk

Store settings:
Store URL: http://oldebjerg.dk ( I have tried with https:// as well)
Secure URL: https://oldebjerg.dk

What can cause this?

Can it be at the server some permits are not correct?

NOTE: I have read other forum topics with same problem but still the problem is present.

Br
Tommy
5 years ago
Did you test manually sending an email from the email settings page?

Are you on the same server you used before?  Maybe the server or firewall is blocking it.

4.00 did change how tasks are run:
   "Performance. Schedule tasks are rewritten to be run using HTTP requests (not in background)"
5 years ago
Thanks, the firewall was the problem 😄
5 years ago
I'm still having an issue with Task Scheduler in Nop commerce 40

Store name: storename (tried with storename.com and www.storename.com)
store url: http://www.storename.com
secure url: https://www.storename.com  (tried with leaving it empty but enabled SSL and also tried with https://www.storename.com/admin).  Need help urgently since all schedules are not running.
I'm using Nopcommerce 4.0

Here are the error log
Log level  Error
Short message  The request was aborted: The connection was closed unexpectedly.
Full message  
System.Net.WebException: The request was aborted: The connection was closed unexpectedly.
   at System.Net.WebClient.UploadValues(Uri address, String method, NameValueCollection data)
   at System.Net.WebClient.UploadValues(String address, NameValueCollection data)
   at Nop.Services.Tasks.TaskThread.Run()
IP address  
Customer  Page URL  
Referrer URL  
Created on  5/10/2018 12:03:07 PM


And


Log level Error
Short message   Error 404. The requested page (/scheduletask/runtask) was not found
Full message  
IP address  209.132.252.10
Customer  [email protected]
Page URL        https://www.storename.com/scheduletask/runtask
Referrer URL  
Created on  5/10/2018 12:07:11 PM

Note that I have Nop API plugin installed. Could this be an issue. This is my production environment so I have no way of debugging to find what the issue is. My Dev version is working perfectly
5 years ago
Did you get a resolution on this? I am getting

Error 404. The requested page (/scheduletask/runtask) was not found

and I am on nopCommerce 4.0.


Thanks,

David Taylor
5 years ago
I get the same scheduletask/runtask error on 4.10 every minute (the mailer schedule). it seemed to start happening after I put my site behind cloudflare. if I restart the app it starts logging these errors right away.

sending the test email works fine (it doesn't get put in the queue).
5 years ago
gvanosdol wrote:
I get the same scheduletask/runtask error on 4.10 every minute (the mailer schedule). it seemed to start happening after I put my site behind cloudflare. if I restart the app it starts logging these errors right away.

sending the test email works fine (it doesn't get put in the queue).


I updated my store settings to point to https instead of http and put the www.domain.com header in front of the domain.com header and it started working again.
3 years ago
Thanks this resolved my issue.
Basically changed http to https and added "www." in front of the domain name and schedule tasks are now all running!
3 years ago
I had this problem also after the upgrade to 4.x, but discovered Sucuri Firewall was blocking the HTTP requests. Had to whitelist the server IP and all is well again.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.