Results 1 to 4 of 4

Thread: DavMail and port binding problems

  1. #1
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    23,710
    Blog Entries
    1

    Default DavMail and port binding problems

    I have just moved from openSUSE 12.2 to 13.1 (clean install). I connect to an exchange server for work email and calendars, using Thunderbird and DavMail. Shortly after configuring, I noticed that upon reboot (or shutdown) and starting DavMail again it complains with the following port binding messages

    Code:
    Unable to bind server socket for SMTP on port 1025: port not allowed or in use by another process
    Unable to bind server socket for POP on port 1110: port not allowed or in use by another process
    Unable to bind server socket for IMAP on port 1143: port not allowed or in use by another process
    Unable to bind server socket for CALDAV on port 1080: port not allowed or in use by another process
    Unable to bind server socket for LDAP on port 1389: port not allowed or in use by another process
    Through a bit of research and trial and error, I have found that I can release the ports manually with

    Code:
    fuser -k -n tcp 1025
    fuser -k -n tcp 1110
    fuser -k -n tcp 1143
    fuser -k -n tcp 1080
    fuser -k -n tcp 1389
    then DavMail behaves as normal again. If I terminate DavMail and restart it behaves okay, as does suspend/resume. I think it may be related to systemd changes, but can't be sure.

    I'd be interested to know whether other DavMail gateway users are experiencing similar issues, or perhaps know of a possible fix or workaround....
    Last edited by deano_ferrari; 15-Dec-2013 at 22:25.

  2. #2
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    23,710
    Blog Entries
    1

    Default Re: DavMail and port binding problems

    Now that I've found to check further, I note that when davmail is running, there is an associated java process running (it is a java application after all). When the OS is rebooted, it appears that the application is not closed properly, and the result is that a java process is already alive before davmail is started,
    Code:
    ps -A|grep java
      861 ?        00:00:00 java
    When it starts I then have
    Code:
    ps -A|grep java
      861 ?        00:00:00 java
     1574 ?        00:00:00 java
    and the original process is bound to the ports
    Code:
    # netstat -lptu
    Active Internet connections (only servers)
    Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name   
    tcp        0      0 localhost:webadmstart   *:*                     LISTEN      861/java            
    tcp        0      0 localhost:imyx          *:*                     LISTEN      861/java            
    tcp        0      0 localhost:socks         *:*                     LISTEN      861/java            
    tcp        0      0 localhost:smtp          *:*                     LISTEN      872/master          
    tcp        0      0 localhost:blackjack     *:*                     LISTEN      861/java            
    tcp        0      0 localhost:iclpv-dm      *:*                     LISTEN      861/java
    So, while I don't yet have a solution, I now know the cause. Something has clearly changed between openSUSE 12.2 and 13.1 with regards to the shutdown process. Maybe someone more knowledgeable than me can shed more light on this.

    I have always started DavMail using /usr/bin/davmail via KDE Autostart. This has been what has traditionally been recommended. Now, I'm wondering if I should launch it as systemd service (but then it would be a system-wide server running silently in the background). Haven't thought about the pros and cons of that...

  3. #3
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    23,710
    Blog Entries
    1

    Default Re: DavMail and port binding problems

    Further investigation found the culprit: I had a look at the davmail RPM and found /etc/init.d/davmail (the script responsible for the java process). Now that I've removed it, all is well.

  4. #4
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    20,925
    Blog Entries
    14

    Default Re: DavMail and port binding problems

    Quote Originally Posted by deano_ferrari View Post
    Further investigation found the culprit: I had a look at the davmail RPM and found /etc/init.d/davmail (the script responsible for the java process). Now that I've removed it, all is well.
    Nice find. Praise the logic in linux
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •