LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 12-21-2010, 08:46 PM   #1
dlcomm
LQ Newbie
 
Registered: Nov 2010
Posts: 20

Rep: Reputation: 1
Question Postfix - Master is dead but pid file exists


When I check the status of postfix I get this error..... what does it mean and how do I fix / troubleshoot it?
 
Old 12-21-2010, 09:14 PM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,758

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
- 'service postfix stop'
- 'service postfix start' .. if it doesn't start ok then manually delete the pid file first
- check the logs to determine the cause of 'master' dying
 
Old 12-21-2010, 09:29 PM   #3
dlcomm
LQ Newbie
 
Registered: Nov 2010
Posts: 20

Original Poster
Rep: Reputation: 1
That's just it.... there are no log entries regarding postfix and I searched for a PID file and there are no postfix.pid files located anywhere on the server.... so wtf?
 
Old 12-21-2010, 09:31 PM   #4
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,758

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Try /var/spool/postfix/pid/master.pid

You may find error messages under /var/log/maillog or /var/log/messages
 
Old 12-21-2010, 09:54 PM   #5
dlcomm
LQ Newbie
 
Registered: Nov 2010
Posts: 20

Original Poster
Rep: Reputation: 1
I searched both logs and found nothing.... rebooted the server after setting postfix to start with init 5 and this is what was added to the maillog

In addition, a test email i manually created to discover that yes out of the box creates an open relay, is still being rejected. I sent the email to joe@blow.com and go figure it actually attempted to send the dam email even though my mail from: address was just as corny. Ugh...


Dec 21 19:30:43 SERVER sendmail[2093]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon MTA: cannot bind: Address already in use
Dec 21 19:30:43 SERVER sendmail[2093]: daemon MTA: problem creating SMTP socket
Dec 21 19:30:48 SERVER sendmail[2093]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon MTA: cannot bind: Address already in use
Dec 21 19:30:48 SERVER sendmail[2093]: daemon MTA: problem creating SMTP socket
Dec 21 19:30:53 SERVER sendmail[2093]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon MTA: cannot bind: Address already in use
Dec 21 19:30:53 SERVER sendmail[2093]: daemon MTA: problem creating SMTP socket
Dec 21 19:30:58 SERVER sendmail[2093]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon MTA: cannot bind: Address already in use
Dec 21 19:30:58 SERVER sendmail[2093]: daemon MTA: problem creating SMTP socket
Dec 21 19:31:03 SERVER sendmail[2093]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon MTA: cannot bind: Address already in use
Dec 21 19:31:03 SERVER sendmail[2093]: daemon MTA: problem creating SMTP socket
Dec 21 19:31:08 SERVER sendmail[2093]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon MTA: cannot bind: Address already in use
Dec 21 19:31:08 SERVER sendmail[2093]: daemon MTA: problem creating SMTP socket
Dec 21 19:31:13 SERVER sendmail[2093]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon MTA: cannot bind: Address already in use
Dec 21 19:31:13 SERVER sendmail[2093]: daemon MTA: problem creating SMTP socket
Dec 21 19:31:18 SERVER sendmail[2093]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon MTA: cannot bind: Address already in use
Dec 21 19:31:18 SERVER sendmail[2093]: daemon MTA: problem creating SMTP socket
Dec 21 19:31:23 SERVER sendmail[2093]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon MTA: cannot bind: Address already in use
Dec 21 19:31:23 SERVER sendmail[2093]: daemon MTA: problem creating SMTP socket
Dec 21 19:31:28 SERVER sendmail[2093]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon MTA: cannot bind: Address already in use
Dec 21 19:31:28 SERVER sendmail[2093]: daemon MTA: problem creating SMTP socket
Dec 21 19:31:28 SERVER sendmail[2093]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon MTA: server SMTP socket wedged: exiting

Below is my main.cf file... I XXXXXXXXXX'd out the actual domain name for privacy but the rest is exactly how it set... any ideas?


---------------------- main.cf ----------------------------

command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix

#default_privs = nobody
#myhostname = host.domain.tld
#myhostname = virtual.domain.tld
#mydomain = domain.tld
#myorigin = $myhostname
#myorigin = $mydomain

#inet_interfaces = all
#inet_interfaces = $myhostname
#inet_interfaces = $myhostname, localhost
inet_protocols = all

#proxy_interfaces =
#proxy_interfaces = 1.2.3.4

#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain,
# mail.$mydomain, www.$mydomain, ftp.$mydomain

#local_recipient_maps = unixasswd.byname $alias_maps
#local_recipient_maps = proxy:unixasswd.byname $alias_maps
#local_recipient_maps =

unknown_local_recipient_reject_code = 550

#mynetworks_style = class
#mynetworks_style = subnet
#mynetworks_style = host
#mynetworks = 168.100.189.0/28, 127.0.0.0/8
#mynetworks = $config_directory/mynetworks
#mynetworks = hash:/etc/postfix/network_table

#relay_domains = $mydestination
#relayhost = $mydomain
#relayhost = [gateway.my.domain]
#relayhost = [mailserver.isp.tld]
#relayhost = uucphost
#relayhost = [an.ip.add.ress]
#relay_recipient_maps = hash:/etc/postfix/relay_recipients

#in_flow_delay = 1s

#alias_maps = dbm:/etc/aliases
alias_maps = hash:/etc/aliases
#alias_maps = hash:/etc/aliases, nis:mail.aliases
#alias_maps = netinfo:/aliases
#alias_database = dbm:/etc/aliases
#alias_database = dbm:/etc/mail/aliases
alias_database = hash:/etc/aliases
#alias_database = hash:/etc/aliases, hash:/opt/majordomo/aliases

#recipient_delimiter = +


#home_mailbox = Mailbox
#home_mailbox = Maildir/


#mail_spool_directory = /var/mail
#mail_spool_directory = /var/spool/mail

#mailbox_transport = lmtp:unix:/var/lib/imap/socket/lmtp
# mailbox_transport = lmtp:unix:/var/lib/imap/socket/lmtp
#
# local_destination_recipient_limit = 300
# local_destination_concurrency_limit = 5
#
#mailbox_transport = cyrus

#fallback_transport =

#luser_relay = $local@other.host
#luser_relay = admin+$local

#header_checks = regexp:/etc/postfix/header_checks

#fast_flush_domains = $relay_domains

#smtpd_banner = $myhostname ESMTP $mail_name
#smtpd_banner = $myhostname ESMTP $mail_name ($mail_version)


#local_destination_concurrency_limit = 2
#default_destination_concurrency_limit = 20

debug_peer_level = 2

#debug_peer_list = 127.0.0.1
#debug_peer_list = some.domain

debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
ddd $daemon_directory/$process_name $process_id & sleep 5

sendmail_path = /usr/sbin/sendmail.postfix

newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix

setgid_group = postdrop

html_directory = no

manpage_directory = /usr/share/man

sample_directory = /usr/share/doc/postfix-2.7.1/samples

readme_directory = /usr/share/doc/postfix-2.7.1/README_FILES
smtpd_helo_required = yes
smtpd_recipient_restrictions = permit_mynetworks reject_unauth_destination permit_inet_interfaces reject_unknown_reverse_client_hostname permit_sasl_authenticated
smtpd_client_restrictions = permit_mynetworks permit_inet_interfaces reject_unknown_reverse_client_hostname permit_tls_all_clientcerts
myhostname = mail.XXXXXXXXXX.com
mydestination = XXXXXXXXX.com
mydomain = mail.XXXXXXXXX.com
myorigin = XXXXXXXXXX.com
 
Old 12-21-2010, 10:15 PM   #6
dlcomm
LQ Newbie
 
Registered: Nov 2010
Posts: 20

Original Poster
Rep: Reputation: 1
Okay..... and more strangeness.... I was doing something else on the server and in order to test it, I had to reboot again.... I got a message in my inbox and checked..... master is now working just fine..... hmmmmph strange issue....
 
Old 12-21-2010, 10:20 PM   #7
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,758

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Actually out of the box postfix will only relay mail for itself... have the sendmail messages cleared up in the logs ?
 
Old 12-21-2010, 10:27 PM   #8
dlcomm
LQ Newbie
 
Registered: Nov 2010
Posts: 20

Original Poster
Rep: Reputation: 1
Yes... it appears so and a new entry was created telling me the aliases database was rebuilt
So far so good!!!!

Now... with my config file.... can you see any reason why I cant access the smtp port (25) from anywhere other then localhost?
I created at firewall exception to open the port but even from within my LAN I can not connect to the smtp server portion. Am I missing something????
 
Old 12-21-2010, 10:42 PM   #9
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,758

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Maybe "inet_protocols = all" was meant to be "inet_interfaces = all" ... ? .. this tells postfix to listen on all interfaces
 
Old 12-21-2010, 11:40 PM   #10
dlcomm
LQ Newbie
 
Registered: Nov 2010
Posts: 20

Original Poster
Rep: Reputation: 1
Yup.... that was part of it.... Now to figure out why its going to my internal mail and not showing up in my postfix box... but that is another post if I don't figure it out. Thanks for your help!
 
Old 04-05-2013, 08:09 PM   #11
voon
LQ Newbie
 
Registered: Apr 2013
Posts: 1

Rep: Reputation: Disabled
Talking

Ok, I know this thread is old already but Googling "Postfix - Master is dead but pid file exists" leads to nowhere but only here. So I just would like to share my solution here for others who desperate seeking for solution.

I'll start by describing my problem of "Master is dead but pid file exists".
  • I've tried restarting the service (sudo service postfix restart) but I'm keep getting the same error.
    Code:
    # service postfix status
    master dead but pid file exists
  • Removing /var/spool/postfix/pid/master.pid and /var/lock/subsys/postfix still won't solve the problem.
  • Re-checking all settings in /etc/postfix/main.cf still don't give a clue because I'm using default settings.
  • Even changing owner by using chown postfix:postfix -R /etc/postfix won't solve, as postfix even complain the file must
    be own by root

At the end I re-examine /var/log/maillog properly I found out the line in the log:
Code:
postfix/master[7240]: fatal: bind 127.0.0.1 port 25: Address already in use
Out of curiosity who is using port 25, I run the commands below:

Code:
# service postfix stop
# netstat -an | grep 25
tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN
Suspecting it was used by sendmail (because sendmail come with default installation of the distro I use), I further tried:

Code:
# ps aux | grep sendmail
root      4585  0.0  0.4  86820  2624 ?        Ss   Apr05   0:00 sendmail: accepting connections
smmsp     4592  0.0  0.3  78288  2012 ?        Ss   Apr05   0:00 sendmail: Queue runner@01:00:00 for /var/spool/clientmqueue
root      7338  0.0  0.1 103424   836 pts/0    S+   00:41   0:00 grep sendmail
I was right, therefore I run this:

Code:
# yum remove sendmail
And to verify:

Code:
# service postfix start
Starting postfix:                                          [  OK  ]

# service postfix status
master (pid  7455) is running...
Woots! postfix is running fine now!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
dovecot dead but pid file exists rs232 Linux - Software 3 09-30-2010 05:25 AM
snmpd dead but pid file exists Light Speed Linux - Virtualization and Cloud 1 07-29-2010 10:51 PM
dead but pid file exists fahlen Linux - Software 1 12-18-2007 08:14 AM
ntpd dead but pid file exists wjn Linux - Networking 15 05-22-2005 12:32 PM
xinetd dead but pid file exists pas Linux - Newbie 2 01-21-2005 03:52 PM


All times are GMT -5. The time now is 07:31 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration