(Apr-27-2020, 11:08 PM)Larz60+ Wrote: it looks as though your connection is not working.
there are probably other exceptions that aren't being shown.
change your exception routine to:
except Exception as e: print("ERROR ", str(e)) logger.error('message') raise
AH thank you many more errors.... I can say I do have a route to my mail relay server as well and dscp markings are correct from the network side as well.
[tpolim001@srv01 ~]$ ./pncnetworktest.py Printing each pncnetwork record Beltway, 2020-04-26 23:18:13 Keystone, 2020-04-26 23:49:13 Freedom, 2020-04-26 23:00:19 New England, 2020-04-26 23:50:24 NAME PNCChecker-2020-04-27 19:10:00.txt PATH /opt/scripts/output/PNCChecker-2020-04-27 19:10:00.txt ERROR [Errno 113] No route to host Traceback (most recent call last): File "./pncnetworktest.py", line 68, in <module> s = smtplib.SMTP('mailrelay.xxxxxxxx.net') File "/usr/lib64/python3.6/smtplib.py", line 251, in __init__ (code, msg) = self.connect(host, port) File "/usr/lib64/python3.6/smtplib.py", line 336, in connect self.sock = self._get_socket(host, port, self.timeout) File "/usr/lib64/python3.6/smtplib.py", line 307, in _get_socket self.source_address) File "/usr/lib64/python3.6/socket.py", line 724, in create_connection raise err File "/usr/lib64/python3.6/socket.py", line 713, in create_connection sock.connect(sa) OSError: [Errno 113] No route to host [tpolim001@srv01 ~]$