美文网首页Jenkins & LinuxJenkins社区Jenkins
Jenkins2.49 emailer插件不工作

Jenkins2.49 emailer插件不工作

作者: ahtest | 来源:发表于2017-03-13 17:07 被阅读27次

    问题

    1.测试邮件插件时,提示:


    Paste_Image.png
    1. 重新部署,只安装emailer插件后,还是提示有错

    Caused: javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25;

    问题排查

    1.重新安装环境后,确保了jenkins是干净的,而任然不工作
    2.查看iptables

    service iptables status

    iptables: Firewall is not running.
    

    3.用telnet进行检查25端口

    telnet localhost 25

    Trying 127.0.0.1...
    telnet: connect to address 127.0.0.1: Connection refused
    

    4.进一点检查25端口,没有返回

    lsof -i tcp:25

    解决

    初步确认是centOs的smtp服务不可用
    1.安装postfix

    yum -y install postfix

    2.启动

    postfix start

    3.其它命令(stop, reload, abort, flush, check, status)

    检测

    telnet localhost 25

    Trying 127.0.0.1...
    Connected to localhost.
    Escape character is '^]'.
    220 7-19.localdomain ESMTP Postfix
    

    lsof -i tcp:25

    COMMAND  PID    USER   FD   TYPE   DEVICE SIZE/OFF NODE NAME
    master  8162    root   12u  IPv4 52777399      0t0  TCP localhost:smtp (LISTEN)
    smtpd   8309 postfix    6u  IPv4 52777399      0t0  TCP localhost:smtp (LISTEN)
    

    相关文章

      网友评论

        本文标题:Jenkins2.49 emailer插件不工作

        本文链接:https://www.haomeiwen.com/subject/riqqnttx.html