Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 9548 - postfix will neither start nor stop
Summary: postfix will neither start nor stop
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Nick Hadaway
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-10-23 07:53 UTC by Ole Tange
Modified: 2003-02-04 19:29 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ole Tange 2002-10-23 07:53:58 UTC
This bug is actually more of a bug in the start-stop-daemon-system.  
  
If I start postfix and postfix has a configuration error then I cannot restart  
postfix.  
  
Try:  
/etc/init.d/postfix stop  
mv /etc/services /etc/foo  
/etc/init.d/postfix start  
/etc/init.d/postfix stop  -- fails as postfix did not start  
mv /etc/foo /etc/services  
/etc/init.d/postfix start  -- fails as postfix is registered as started  
 
Now I know I can do 'zap'. But this will only work in the situation where a  
service is stopped while registered as started. It will not work in the  
situation where a service is running but is registered as stopped.  
  
I have previously used Mandrake and this was never a problem. Mandrake assumes  
that you know what you are doing and will try to its best effort to do what you  
want. You can do: service restart, even if the service is not started. This is  
very useful if you want to have service read its config-file but you don't know  
(or care) whether the service already running or not.
Comment 1 Michael Farnbach 2002-10-29 15:18:54 UTC
oddly enough, 

`postfix stop`

will stop a running postfix program, no /etc/init.d/postfix needed
Comment 2 Ole Tange 2002-10-29 18:21:04 UTC
This is not odd. The /etc/init.d-script is just a wrapper for postfix. But the 
wrapper keeps bad info and this is the issue. 
 
You can also do a killall to stop postfix. But this still will not solve the 
real issue: bad info kept by the init.d-script. 
 
 
Comment 3 Nick Hadaway 2002-11-04 14:52:39 UTC
I have been running postfix and actually I put together the latest build of 
postfix (1.1.11.20020917) for gentoo... 

Can you send me log information?  If there is a problem with the script, I 
haven't experienced it.
Comment 4 Ole Tange 2002-11-04 17:09:44 UTC
 I just did: emerge rsync; emerge postfix.   
   
I still get the error if I do   
  
/etc/init.d/postfix stop    
mv /etc/services /etc/foo    
/etc/init.d/postfix start    
/etc/init.d/postfix stop  -- fails as postfix did not start    
mv /etc/foo /etc/services    
/etc/init.d/postfix start  -- fails as postfix is registered as started    
  
I would very much like Gentoo to adopt the Mandrake/RedHat meaning of restart:  
Stop the service if you can. And no matter if that failed: start the service,  
because I probably know that the services is not running - even if you have  
registered it as running.  
  
I fairly often is in the situation where I am not sure if a service succesfully  
started or not. And I use restart for that.  
  
  
Comment 5 Nick Hadaway 2002-11-13 01:19:53 UTC
I still have not seen any log information.

the postfix script does have the ability to restart.  If a service is 
registering as started and not starting there should be some relevant 
information in the system log regarding postfix failing.  As I don't have the 
same issue I can't replicate the problem here.

Please send me any log information found in your syslog output when starting 
postfix
Comment 6 Nick Hadaway 2003-01-19 18:07:51 UTC
This is a currently an unavoidable problem.  If postfix were to start and get a PID... and then die for some other reason unexpectedly... the service MAY still register as started... In which case doing a /etc/init.d/postfix zap should reset the init system so you can restart via the init.d script after making needed configuration or system changes to get a properly starting postfix.