Everytime I update vCenter Appliance 6.5, I have to go into the sendmail.cf file and edit it in order for sendmail to start up and send alerts. I have opened several tickets, and I seem to be ignored. The last ticket the support engineer told me to send in a feature request.
The VCSA I have is a VCSA that was converted from a windows vCenter server with MS-SQL to a VCSA 6.5 appliance. The sendmail configuration change that I implemented came from a fresh VCSA install that I deployed to see what the sendmail.cf looked like.
I have to edit the sendmail file as follows:
diff sendmail.cf.good sendmail.cf.orig
247,248c247
< #O DaemonPortOptions=Addr=127.0.0.1,Port=smtp
< O DaemonPortOptions=Port=587, Name=MSA, M=E
---
> O DaemonPortOptions=Addr=127.0.0.1,Port=smtp
If I leave the DeamonPortOptions command to listen on the loopback, sendmail never starts as it cannot bind to the loopback as seen in the messages log:
2018-03-23T18:58:28.294347+00:00 vcenter sendmail[1104]: daemon Daemon1: problem creating SMTP socket
2018-03-23T18:58:33.294195+00:00 vcenter sendmail[1104]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon Daemon1: cannot bind: Address already in use
2018-03-23T18:58:34.530583+00:00 vcenter sendmail[1104]: daemon Daemon1: problem creating SMTP socket
2018-03-23T18:58:38.426811+00:00 vcenter systemd[1]: sendmail.service: Main process exited, code=exited, status=71/n/a
2018-03-23T18:58:38.427170+00:00 vcenter systemd[1]: sendmail.service: Unit entered failed state.
Has anyone else seen this issue? I suppose I could deploy the fresh VCSA 6.5 appliance and restore a backup from the one I currently have.
-jim
2018-03-23T18:58:33.294195+00:00 vcenter sendmail[1104]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon Daemon1: cannot bind: Address already in use
Address already in use .. I do not know if the port is in use or the service never released the port..
Thanks,
MS
Replace the sendmail.cf with m4 m4/cf.m4 sendmail.mc.
Note: Take a backup/snapshot of VCSA before performing these steps.
1. Log in to VCSA through SSH as a root user.
2. Run these commands to take a backup of sendmail.cf:
cd/etc/mail
cp sendmail.cf sendmail.cf.backup
3. Replace the sendmail.cf with m4 m4/cf.m4 sendmail.mc:
cd /etc/mail
m4 m4/cf.m4 sendmail.mc > sendmail.cf
4. Restart sendmail service:
5. systemctl restart sendmail
I moved the old sendmail.cf file back into place and restarted sednmail service.
"netstat -anpt | grep :25" shows nothing on port 25 anywhere, and "ps -ef | grep sendmail" shows no running sendmail process.
This is in /var/log/messages:
2018-03-27T12:20:41.221981+00:00 vcenter sendmail[2106]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon Daemon1: cannot bind: Address already in use
2018-03-27T12:20:41.222314+00:00 vcenter sendmail[2106]: daemon Daemon1: problem creating SMTP socket
2018-03-27T12:20:41.222536+00:00 vcenter systemd[1]: sendmail.service: Main process exited, code=exited, status=71/n/a
2018-03-27T12:20:41.222809+00:00 vcenter sendmail[2106]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon Daemon1: server SMTP socket wedged: exiting
I can fix this with my sendmail.cf file with the following change (sendmail.cf.good is my modified config:
"diff sendmail.cf.orig sendmail.cf.good"
247c247,248
< O DaemonPortOptions=Addr=127.0.0.1,Port=smtp
---
> #O DaemonPortOptions=Addr=127.0.0.1,Port=smtp
> O DaemonPortOptions=Port=587, Name=MSA, M=E
Since sendmail on VCSA is outbound only my configuration is appropriate, and it actually came from a fresh 6.5 VCSA installation, I did not create it. I don't understand why my upgraded system is incorrect or at least not working.
This issue occurs due to incorrect entry in configuration file, Since which we have to manually edit the post configuration.