You are not logged in.

#1 2007-07-13 03:28:40

marxav
Member
From: Gatineau, PQ, Canada
Registered: 2006-09-24
Posts: 386

Postfix won'T start.

Not sure what is wrong with postfix.  It was working fine then it refuses to start.  lof file shows:

Jul 12 22:15:20 dragon postfix/postfix-script[12295]: starting the Postfix mail system
Jul 12 22:15:20 dragon postfix/master[12296]: fatal: 0.0.0.0:smtp: Servname not supported for ai_socktype

Offline

#2 2007-07-13 19:57:29

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

Re: Postfix won'T start.

Post your /etc/postfix/master.cf, and the output of postconf -n.

Offline

#3 2007-07-13 21:10:25

marxav
Member
From: Gatineau, PQ, Canada
Registered: 2006-09-24
Posts: 386

Re: Postfix won'T start.

I should have done it right away. roll

/etc/mail/master.cf

smtp      inet  n       -       n       -       -       smtpd
pickup    fifo  n       -       n       60      1       pickup                                                          
cleanup   unix  n       -       n       -       0       cleanup
qmgr      fifo  n       -       n       300     1       qmgr
tlsmgr    unix  -       -       n       1000?   1       tlsmgr
rewrite   unix  -       -       n       -       -       trivial-rewrite
bounce    unix  -       -       n       -       0       bounce
defer     unix  -       -       n       -       0       bounce
trace     unix  -       -       n       -       0       bounce
verify    unix  -       -       n       -       1       verify
flush     unix  n       -       n       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
smtp      unix  -       -       n       -       -       smtp
relay     unix  -       -       n       -       -       smtp
        -o fallback_relay=
showq     unix  n       -       n       -       -       showq
error     unix  -       -       n       -       -       error
retry     unix  -       -       n       -       -       error
discard   unix  -       -       n       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       n       -       -       lmtp
anvil     unix  -       -       n       -       1       anvil
scache    unix  -       -       n       -       1       scache
root@dragon $ postconf -n
alias_database = $alias_maps
alias_maps = hash:/etc/postfix/aliases
append_dot_mydomain = no
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/lib/postfix
debug_peer_level = 2
html_directory = no
inet_interfaces = loopback-only
mail_owner = postfix
mailq_path = /usr/bin/mailq
manpage_directory = /usr/man
mynetworks = 127.0.0.0/8
mynetworks_style = host
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = no
sample_directory = /etc/postfix/sample
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
unknown_local_recipient_reject_code = 550

I only use Postfix to send stuff out.  It stopped working a couple days ago.

Offline

#4 2007-07-14 04:07:28

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

Re: Postfix won'T start.

This postfix config looks totally normal. There must be something else going on...

The failing bit is line 1 in master.cf, where master tries to open 25/TCP for listening.

Was postfix recently updated?
Did you build a new kernel recently, with some unusual options?
Is /etc/services ok? (I wonder if it doesn't understand the port name "smtp" for some reason)
Did you trying reinstalling the postfix binaries? (Possible corrupt file)

Failing any of these getting anywhere, I'd suggest installing strace and using it to trace master directly. Instead of starting postfix the normal way, do "strace /path/to/master". You might see it try to read from some file before it fails.

Offline

#5 2007-07-14 14:46:26

marxav
Member
From: Gatineau, PQ, Canada
Registered: 2006-09-24
Posts: 386

Re: Postfix won'T start.

I did upgrade postfix, but after it stopped working, hoping it would solve the problem.  I never do anything special to the kernel

/etc/service ?? hmm  What is that supposed to be ?

I installed strace.  Not sure what a normal output would be, but here is what came out:

root@dragon $ strace /etc/postfix/master.cf
execve("/etc/postfix/master.cf", ["/etc/postfix/master.cf"], [/* 42 vars */]) = -1 EACCES (Permission denied)
dup(2)                                  = 3
fcntl64(3, F_GETFL)                     = 0x8002 (flags O_RDWR|O_LARGEFILE)
fstat64(3, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f96000
_llseek(3, 0, 0xbf84f90c, SEEK_CUR)     = -1 ESPIPE (Illegal seek)
write(3, "strace: exec: Permission denied\n", 32strace: exec: Permission denied
) = 32
close(3)                                = 0
munmap(0xb7f96000, 4096)                = 0
exit_group(1)                           = ?
Process 15145 detached

I would tend to believe that something else is going on because I have problem with ddclient that I never had before and I finally gave up using it.

Offline

#6 2007-07-14 16:33:56

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

Re: Postfix won'T start.

No, you need to strace master, the program, not the config file. And you have to strace it as root (I forgot about that). Do "sudo strace /usr/lib/postfix/master". You'll get a lot of output - don't post it all, but maybe the last 100 lines or so.

/etc/services should be a large file that tells which port numbers go with which service names. If you grep in it for smtp, you should see (among other things) a line showing that smtp is on tcp port 25. If this file is broken lots of things won't work.

Offline

#7 2007-07-15 19:17:50

marxav
Member
From: Gatineau, PQ, Canada
Registered: 2006-09-24
Posts: 386

Re: Postfix won'T start.

Interesting, file /etc/services does not exist.  It does exist on my other two machines though.

With strace, what am I supposed to  look for? There are indeed quite a few lines.  Here is some extract:

access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
close(3)                                = -1 EBADF (Bad file descriptor)  Lots of those!!!
connect(3, {sa_family=AF_FILE, path="/dev/log"}, 110) = -1 EPROTOTYPE (Protocol wrong type for socket)

And the last few lines:

rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigaction(SIGCHLD, NULL, {SIG_DFL}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
nanosleep({1, 0}, {1, 0})               = 0
exit_group(1)                           = ?
Process 16756 detached

EDIT:

I searched for inexisting /ets/services file and found this http://bbs.archlinux.org/viewtopic.php?id=6713.  As suggested, I copied nmap-services to /etc/services and postfix is now working.  I wonder why this file disappeared.

Last edited by marxav (2007-07-15 19:31:38)

Offline

#8 2007-07-15 20:58:20

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

Re: Postfix won'T start.

/etc/services comes from the 'filesystem' package. I suggest you reinstall that package in case anything else of it is missing or damaged (and because it will re-create the "standard" /etc/services).

Offline

#9 2007-07-15 21:47:21

marxav
Member
From: Gatineau, PQ, Canada
Registered: 2006-09-24
Posts: 386

Re: Postfix won'T start.

As you suggested, I did that.  Filesystem was a package that was updated not long ago.  Maybe something went wrong then.  In anycase, ddclient is also up and working again.

Thanks.

Offline

Board footer

Powered by FluxBB