NOTE: The information in this article is provided without warranty of any kind.  This method has been successfully tested, however, there may be cases where it doesn't work.  You'll need to know a little about shell scripting, and you'll need to use your own judgement to modify these guidelines as necessary, since every case will be slightly different.  That having been said, on to the details....

 

 

 

The package management system on modern Linux distributions is so advanced, that it usually works so seamlessly, there is nothing to think about.  Nothing even remotely like rpm or dpkg-deb exists in the Windows world.

 

Occasionally, however, a corrupted file or package will cause problems, which can be difficult to troubleshoot, due to the advanced nature of these package managers.

 

A recent Debian Linux server upgrade from version 4.0 to version 5.0 caused a few problems, due to this situation.

 

In this case, the package (ippl) ran the script to stop the daemon process (called a system service in Windows) running, and the script failed, resulting in errors like the following:

 

root@server:# apt-get remove --purge ippl
(Reading database ... 121400 files and directories currently installed.)
Removing ippl ...
* Stopping ippl start-stop-daemon: warning: init.d: initscript ippl action "stop" failed.
dpkg: error processing ippl (--remove):
subprocess pre-removal script returned error exit status 1
* Starting ippl
subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
ippl

root@server:#

 

Checking the initscript revealed nothing amiss, and even modifying it to always return a successful result code didn't fix the problem.

Running ps -A | grep ippl showed that the process was not running, so it could safely be removed, as long as the error could be worked around.

 

On Debian-based distributions (package files end in .deb) there is a pre-removal script for each package.  This script is run before the uninstallation of any software package, to do things like, clean up temporary files belonging to the package, or shut down daemons before they are uninstalled.

 

It was this shut down process for the ippl daemon that was failing, even though it wasn't running in the first place.

 

On Debian, these scripts are stored in:

 

/var/lib/dpkg/info/

 

There are several files for each package, in the case of ippl, there are these files:

 

root@server:/var/lib/dpkg/info# ls ippl*
ippl.conffiles ippl.list ippl.md5sums ippl.postinst ippl.postrm ippl.preinst ippl.prerm
root@server:/var/lib/dpkg/info#

 

The filenames obviously start with the name of the package, and the extension determines what the file is used for.

 

ippl.conffiles contains all the configuration files the package uses that are stored in the /etc/ configuration directory.

ippl.list contains a list of all files and directories in the package.

ippl.md5sums contains the md5 hashes for all files, to determine if there is any file corruption.

 

These files are unimportant for this discussion, but it's still nice to know what they're for.

 

The other files are all scripts run when removing or installing packages.  The extensions are fairly self-explanatory, but I'll list them here:

 

ippl.preinst is run before installation of the package.  Usually configuration options are set using prompts in this script.

ippl.postinst is run after installation of the package.  This is where daemons are started for packages that contain them.

ippl.prerm is run before removal of the package.  This is used for removal options, for example, remove just the program, or data also.  It is also used for shutting down daemons when needed.

ippl.postrm is run after removal of the package.  Any final cleanup will be done in this script.

 

In this case, the ippl.prerm script was either throwing the error, or running another command that threw the error preventing removal of the package.

This script is fairly simple for this package, consisting of the following code:

 

#!/bin/sh
set -e
# Automatically added by dh_installinit
if [ -x "/etc/init.d/ippl" ]; then
if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
invoke-rc.d ippl stop || exit $?
else
/etc/init.d/ippl stop || exit $?
fi
fi
# End automatically added section

 

This essentially makes sure the startup/shutdown initscript for the daemon exists, then determines if invoke-rc.d exists.  If it does, it uses this method to shut down the daemon.  If not, it uses the legacy initscript method.

 

In a case this simple, it really doesn't matter what method is being used, as the script is simple enough to modify for both options.

 

Simply comment out the two shutdown lines, and add another line that does basically nothing to replace each, otherwise the shell will throw an error due to an if statement containing no instructions:

 

#!/bin/sh
set -e
# Automatically added by dh_installinit
if [ -x "/etc/init.d/ippl" ]; then
if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
#### invoke-rc.d ippl stop || exit $?
echo "not shutting down"
else
#### /etc/init.d/ippl stop || exit $?
echo "still not shutting down"
fi
fi
# End automatically added section

 

These changes will make the pre-removal script do basically nothing, other than print a message.  Shutting down the daemon will not happen, but since it wasn't running anyway, this is irrelevant.  If your daemon is still running, try shutting it down with the initscript in /etc/init.d, or, failing this, use the kill command to shut it down.

 

After these changes were made, the ippl package from Debian version 4.0 uninstalled with no errors, allowing the version 5.0 package to be installed.

There are several documents and hotfixes from Microsoft to fix various glitches with the POP3 connector, but some problems are beyond the scope of these documents.

 

For example:

  • the POP3 Connector sends a blank password to the POP3 server (verify this with a network sniffer)
  • You're getting "MMC has detected an error in a snap-in", but KB921096 is installed, or not applicable to your version.

Given these types of errors, frequently the only real solution is to uninstall and reinstall the POP3 connector, but there is no uninstaller.  It must be done manually.

 

Try the following solutions in order, until the problem goes away:

 

Solution 1: Repair the POP3 connector on Small Business Server:

  1. Run IMBREG.exe in \Program files\Microsoft Windows Small Business Server\Networking\Pop3 folder to re-register the various POP3 dlls.
  2. Restart the Microsoft Connector for POP3 Mailboxes Service and the SMTP virtual server
    (Exchange System Manager->Administrative Groups->first administrative group->Servers->[Your Server name]->Protocols->SMTP->Default SMTP Virtual Server.)
  3. Run iisreset from a command prompt.


Solution 2: If the connector still doesn't work, reinstall the POP3 Connector:

  1. Go to C:\Program Files\Microsoft Windows Small Business Server\Networking and rename the POP3 folder to something else, like POP3_broken.
  2. Open regedit, and find the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SmallBusinessServer\Network branch. This should contain a key named POP3 Connector.
  3. Export the POP3 Connector key to a backup. This is important, as you may need this backup to get the POP3 Connector working at the end of this repair. Delete the POP3 Connector key and close regedit.
  4. In Windows Explorer, show hidden and system files in the Folder Options dialog.
  5. Search for and delete all SIT*.tmp folders.  Make sure you search hidden and system files/folders.
  6. Insert the SBS 2003 Disk 3, and go to the \SBS\POP3 folder on the CD.  Run the POP3.MSI file, and you should see some install progress.

NOTE: If starting the POP3 Connector manager at this point results in it flashing on the screen for a split second, then disappearing, you may need to restore the POP3 Connector registry key from the backup. (You did make the recommended backup, right?)

 

You might also need to manually create the Failed Mail and Incoming Mail folders in the \Program Files\Microsoft Windows Small Business Server\Networking\POP3 folder.

 

Solution 3: If step 6 of solution 2 gives you an error, perform the following to reinstall
Exchange over itself.

Go to Control Panel->Add/Remove Programs.  Select "Windows Small Business Server 2003" and click Change/Remove. This will enter into the Integrated Setup and the Component Selection screen.

Select Networking and Exchange Server for "reinstall".

 

Page 2 of 2