• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Please beaware of a breaking change in the REST API on the next Plesk release (18.0.62).
    Starting from Plesk Obsidian 18.0.62, requests to REST API containing the Content-Type header with a media-type directive other than “application/json” will result in the HTTP “415 Unsupported Media Type” client error response code. Read more here

Scheduled task failing with Connection Refused

Brian Taylor

New Pleskian
Trying to run scheduled tasks (cron) which worked fine on an easyspace virtual server using plesk 11.5 , we're now on a dedicated server using Plesk 12 and the same jobs are now failing with a Connection Refused error. I cannot find any mention of the error in any log files, the cron log just tells me its been called. I am using wget but also tried curl, the url works just fine if dne through a browser

/usr/bin/wget "https://kingdom-sales.co.uk/magento/smiffyfeed.php" -O /dev/null

This is the email I get from plesk

--2015-08-03 10:41:01-- https://kingdom-sales.co.uk/magento/smiffyfeed.php
Resolving kingdom-sales.co.uk... ::1, 127.0.0.1
Connecting to kingdom-sales.co.uk|::1|:443... failed: Connection refused.
Connecting to kingdom-sales.co.uk|127.0.0.1|:443... failed: Connection refused.

I'm using the plesk firewall, everything matches to the firewall settings in plesk11.5, the iptables show as

Chain INPUT (policy DROP)
target prot opt source destination
ACCEPT all -- anywhere anywhere state RELATED,ESTAB LISHED
REJECT tcp -- anywhere anywhere tcp flags:!FIN,SYN, RST,ACK/SYN state NEW reject-with tcp-reset
DROP all -- anywhere anywhere state INVALID
ACCEPT all -- anywhere anywhere
ACCEPT tcp -- anywhere anywhere tcp dpt:12443
ACCEPT tcp -- anywhere anywhere tcp dpt:11443
ACCEPT tcp -- anywhere anywhere tcp dpt:11444
ACCEPT tcp -- anywhere anywhere tcp dpt:8447
ACCEPT tcp -- anywhere anywhere tcp dpt:pcsync-http s
ACCEPT tcp -- anywhere anywhere tcp dpt:cddbp-alt
ACCEPT tcp -- anywhere anywhere tcp dpt:http
ACCEPT tcp -- anywhere anywhere tcp dpt:https
ACCEPT tcp -- anywhere anywhere tcp dpt:ftp
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
ACCEPT tcp -- anywhere anywhere tcp dpt:submission
ACCEPT tcp -- anywhere anywhere tcp dpt:smtp
ACCEPT tcp -- anywhere anywhere tcp dpt:urd
ACCEPT tcp -- anywhere anywhere tcp dpt:pop3
ACCEPT tcp -- anywhere anywhere tcp dpt:pop3s
ACCEPT tcp -- anywhere anywhere tcp dpt:imap
ACCEPT tcp -- anywhere anywhere tcp dpt:imaps
ACCEPT tcp -- anywhere anywhere tcp dpt:poppassd
ACCEPT tcp -- anywhere anywhere tcp dpt:mysql
ACCEPT tcp -- anywhere anywhere tcp dpt:postgres
ACCEPT tcp -- anywhere anywhere tcp dpt:eek:gs-server
ACCEPT tcp -- anywhere anywhere tcp dpt:glrpc
ACCEPT udp -- anywhere anywhere udp dpt:netbios-ns
ACCEPT udp -- anywhere anywhere udp dpt:netbios-dgm
ACCEPT tcp -- anywhere anywhere tcp dpt:netbios-ssn
ACCEPT tcp -- anywhere anywhere tcp dpt:microsoft-d s
ACCEPT udp -- anywhere anywhere udp dpt:eek:penvpn
ACCEPT udp -- anywhere anywhere udp dpt:domain
ACCEPT tcp -- anywhere anywhere tcp dpt:domain
ACCEPT icmp -- anywhere anywhere icmp type 8 code 0
DROP all -- anywhere anywhere

Chain FORWARD (policy DROP)
target prot opt source destination
ACCEPT all -- anywhere anywhere state RELATED,ESTAB LISHED
REJECT tcp -- anywhere anywhere tcp flags:!FIN,SYN, RST,ACK/SYN state NEW reject-with tcp-reset
DROP all -- anywhere anywhere state INVALID
ACCEPT all -- anywhere anywhere
DROP all -- anywhere anywhere

Chain OUTPUT (policy DROP)
target prot opt source destination
ACCEPT all -- anywhere anywhere state RELATED,ESTAB LISHED
REJECT tcp -- anywhere anywhere tcp flags:!FIN,SYN, RST,ACK/SYN state NEW reject-with tcp-reset
DROP all -- anywhere anywhere state INVALID
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere

Having searched the internet and looked for the past 4 days with no success and limited knowledge on servers I am getting no where. Conf files seem to be set up ok, ports are set different to those used in plesk 11.5 (7080, 7081) but that appears to ok as nginx is in use and nginx conf is set using 80,443. No proxies being used that I am aware of, host file set for 127.0.0.1 and ::1.
Any help would be appreciated, I'm also a forum newbie so apologies if I'm not doing this right.

Thanks Brian
 
As I see wget tries connect to localhost. Looks like that hostname kingdom-sales.co.uk is not correctly resolvable from your Plesk server. Check it.
 
Hosting Settings has domain set to kingdom-sales.co.uk with that as the preferred domain
Web Hosting Access set to the ip address allocated and all match in the dns settings. Kingdom-sales.co.uk is the domain used for the server so I have access ok to the plesk control panel
 
/etc/hosts contains

127.0.0.1 kingdom-sales.co.uk kingdom-sales localhost.localdomain localhost.localdomain localhost4 localhost4.localdomain4 localhost
::1 kingdom-sales.co.uk kingdom-sales localhost.localdomain localhost.localdomain localhost6 localhost6.localdomain6 localhost
 
Remove these " kingdom-sales.co.uk kingdom-sales" from this file. This hostname should be resolvable to

# host kingdom-sales.co.uk
kingdom-sales.co.uk has address 109.169.56.45

but not to localhost (127.0.0.1)
 
Thank you, that has fixed the problem. I have no idea why those entries were there in the first place, not something I had added.
 
Back
Top