Skip to content
This repository has been archived by the owner on Jul 17, 2023. It is now read-only.

isEmail function in run script makes Manta hang #293

Open
holtgrewe opened this issue Sep 7, 2022 · 0 comments
Open

isEmail function in run script makes Manta hang #293

holtgrewe opened this issue Sep 7, 2022 · 0 comments

Comments

@holtgrewe
Copy link

I am using Manta v1.6.0. My manta workflow script runs hang. Running things through strace -f, I found the following.

socket(AF_INET, SOCK_STREAM, IPPROTO_TCP) = 3
connect(3, {sa_family=AF_INET, sin_port=htons(25), sin_addr=inet_addr("127.0.0.1")}, 16) = 0
recvfrom(3, 

The server (Rocky Linux 7) uses no firewall but also does not run an SMTP server.

I suggest changing the following

    def isLocalSmtp() :
        import smtplib
        try :
            smtplib.SMTP('localhost')
        except :
            return False
        return True

to

    def isLocalSmtp() :
        import smtplib
        try :
            smtplib.SMTP('localhost', timeout=2)
        except :
            return False
        return True

or similar.

riederd added a commit to riederd/manta that referenced this issue Dec 21, 2022
Adding a timeout of 5 seconds to `smtplib.SMTP()` allows the script to continue when the port is blocking.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant