Ad Widget

Collapse

Trouble using smtplib.SMTP on Zabbix 2.2 SuSE appliance

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shaopeng
    Junior Member
    • May 2015
    • 5

    #1

    Trouble using smtplib.SMTP on Zabbix 2.2 SuSE appliance

    I am trying to use a Python script to send email alerts, but failed on SuSE appliance. I have narrowed down to the following code, to reproduce my issue, just type the following:
    linux-h6tk:~ # python
    Python 2.7.3 (default, Apr 14 2012, 08:58:41) [GCC] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import smtplib
    >>> smtplib.SMTP("my_smtp_server_IP", 25)
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "/usr/lib64/python2.7/smtplib.py", line 265, in __init__
    addr = socket.gethostbyname(socket.gethostname())
    socket.error: [Errno 11] Resource temporarily unavailable

    My script runs well on Mac, Windows, CentOS, but when I run it on SuSE appliance, it stuck at smtplib.SMTP. I have 3 appliances running Zabbix 2.2, which all have the same issue.
    Is this a known issue? How can I get around it?
    Thanks in advance!
Working...