#106 IPv6 confusion

closed
nobody
None
5
2010-05-20
2010-01-05
No

I've noticed that davmail stopped working on debian unstable recently.

WIRE debug output shows just an irritating:

2010-01-05 08:48:09,027 INFO [AWT-EventQueue-0] davmail - DavMail Gateway 3.6.1-853 listening on
2010-01-05 08:48:09,028 ERROR [AWT-EventQueue-0] davmail - 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

...
2010-01-05 08:47:56,672 DEBUG [CheckRelease] org.apache.commons.httpclient.HttpConnection - enter HttpConnection.open()
2010-01-05 08:47:56,672 DEBUG [CheckRelease] org.apache.commons.httpclient.HttpConnection - Open connection to davmail.sourceforge.net:80
2010-01-05 08:47:56,698 DEBUG [CheckRelease] org.apache.commons.httpclient.HttpConnection - enter HttpConnection.closeSockedAndStreams()
2010-01-05 08:47:56,698 DEBUG [CheckRelease] org.apache.commons.httpclient.HttpMethodDirector - Closing the connection.
2010-01-05 08:47:56,698 DEBUG [CheckRelease] org.apache.commons.httpclient.HttpConnection - enter HttpConnection.close()
2010-01-05 08:47:56,698 DEBUG [CheckRelease] org.apache.commons.httpclient.HttpConnection - enter HttpConnection.closeSockedAndStreams()
2010-01-05 08:47:56,705 INFO [CheckRelease] org.apache.commons.httpclient.HttpMethodDirector - I/O exception (java.net.ConnectException) caught when processing request: Network is unreachable
2010-01-05 08:47:56,706 DEBUG [CheckRelease] org.apache.commons.httpclient.HttpMethodDirector - Network is unreachable
java.net.ConnectException: Network is unreachable
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:525)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.commons.httpclient.protocol.ReflectionSocketFactory.createSocket(ReflectionSocketFactory.java:140)
at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:125)
at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
at davmail.DavGateway.getReleasedVersion(DavGateway.java:202)
at davmail.DavGateway$2.run(DavGateway.java:154)

Strace shows:

5642 bind(36, {sa_family=AF_INET6, sin6_port=htons(1143), inet_pton(AF_INET6, "::ffff:127.0.0.1", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = -1 EINVAL (Invalid argument)
5642 bind(36, {sa_family=AF_INET6, sin6_port=htons(1080), inet_pton(AF_INET6, "::ffff:127.0.0.1", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = -1 EINVAL (Invalid argument)
5642 bind(36, {sa_family=AF_INET6, sin6_port=htons(1389), inet_pton(AF_INET6, "::ffff:127.0.0.1", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = -1 EINVAL (Invalid argument)
5661 connect(38, {sa_family=AF_INET6, sin6_port=htons(80), inet_pton(AF_INET6, "::ffff:216.34.181.96", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = -1 ENETUNREACH (Network is unreachable)
5661 connect(38, {sa_family=AF_INET6, sin6_port=htons(80), inet_pton(AF_INET6, "::ffff:216.34.181.96", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = -1 ENETUNREACH (Network is unreachable)
5661 connect(38, {sa_family=AF_INET6, sin6_port=htons(80), inet_pton(AF_INET6, "::ffff:216.34.181.96", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = -1 ENETUNREACH (Network is unreachable)
5661 connect(38, {sa_family=AF_INET6, sin6_port=htons(80), inet_pton(AF_INET6, "::ffff:216.34.181.96", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = -1 ENETUNREACH (Network is unreachable)

This can be fixed by changing the davmail script to add the parameter '-Djava.net.preferIPv4Stack=true' to java.

Discussion

  • Peter Van Eynde

    Peter Van Eynde - 2010-01-06

    Reading that debian bug I'm seeing that Marco is not planning to reverse the change and that the real bug is inside the Java JRE (http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6342561) .

    I don't think that either Java will be fixed "soon" or that the sysctl setting will be reversed, so I suggest that davmail applies this workaround.

     
  • Mickael Guessant

    • status: open --> pending
     
  • SourceForge Robot

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     
  • SourceForge Robot

    • status: pending --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks