svn client - how do I force IPv6?

2 views
Skip to first unread message

Graham Leggett via users

unread,
Sep 19, 2022, 5:50:45 AMSep 19
to us...@subversion.apache.org
Hi all,

What setting option under the ~/.subversion directory will force the use of IPv6 on outbound connections?

The backstory is that I have some SVNKit code that is stubbornly insisting on using IPv4 and failing. The SVNKit docs say it gets its config from the native ~/.subversion directory, but I can find no mention of IPv6 and the native svn client config. I am specifically talking about an svn client accessing an IPv6 server over https, I am not using svnserve.

Regards,
Graham


Daniel Sahlberg

unread,
Sep 19, 2022, 7:15:28 AMSep 19
to Graham Leggett, us...@subversion.apache.org
Hi,

SVNKit is a Java implementation of Subversion and doesn't share any code with Apache Subversion. Even if SVNKit honors the configuration in ~/.subversion, there are no guarantees that a particular option used by Apache Subversion works the same way with SVNKit. Thus I would suggest that you ask the same question in the SVNKit forums.

I can't recollect seeing any options for IPv6 (as you have also found out). I would assume Apache Subversion is using OS defaults when it comes to trying IPv4 or IPv6 first if a certain server has both addresses. When it comes to SVNKit I can't guess how Java handles IPv4 och IPv6 connections.

Kind regards,
Daniel

Mark Phippard

unread,
Sep 19, 2022, 7:37:06 AMSep 19
to Daniel Sahlberg, Graham Leggett, Subversion
Daniel gave the answer I was typing. Here is info on enabling IPv6 for your JVM:

https://stackoverflow.com/questions/18697091/ipv6-support-in-java

Mark

Graham Leggett via users

unread,
Sep 19, 2022, 8:45:51 AMSep 19
to Daniel Sahlberg, us...@subversion.apache.org
On 19 Sep 2022, at 13:15, Daniel Sahlberg <daniel.l...@gmail.com> wrote:

> SVNKit is a Java implementation of Subversion and doesn't share any code with Apache Subversion. Even if SVNKit honors the configuration in ~/.subversion, there are no guarantees that a particular option used by Apache Subversion works the same way with SVNKit. Thus I would suggest that you ask the same question in the SVNKit forums.

That had already been done:

https://support.tmatesoft.com/t/force-ipv6-connections-in-svnkit-how/2898

> I can't recollect seeing any options for IPv6 (as you have also found out). I would assume Apache Subversion is using OS defaults when it comes to trying IPv4 or IPv6 first if a certain server has both addresses. When it comes to SVNKit I can't guess how Java handles IPv4 och IPv6 connections.

Is the IPv6 behaviour of the svn client (not the SVNKit client) documented anywhere? The svn book returns no hits for ipv6, the man page redirects you to svn help [subcommand], which doesn’t appear to mention common arguments.

SVNKit claims to be bug-for-bug compatible with native svn, but without any concrete definition of the native client behaviour the behaviour diverges.

Regards,
Graham


Graham Leggett via users

unread,
Sep 19, 2022, 8:49:29 AMSep 19
to Mark Phippard, Daniel Sahlberg, Subversion
On 19 Sep 2022, at 13:36, Mark Phippard <mark...@gmail.com> wrote:
Daniel gave the answer I was typing. Here is info on enabling IPv6 for your JVM:

https://stackoverflow.com/questions/18697091/ipv6-support-in-java

Alas this is the info for the JVM and does not work in this case. Most Java communication libraries ignore the JVM parameters for their own implementations. This is true of SVNKit, which reports that it relies completely on the configuration of the native svn client.


"Native Subversion configuration files are used by default.”

Regards,
Graham

Daniel Sahlberg

unread,
Sep 19, 2022, 9:35:32 AMSep 19
to Graham Leggett, Mark Phippard, Subversion
Well, it says "used by default" which is not the same as "completely". As SVNKit doesn't share any code with Apache Subversion, any configuration that we add in Apache Subversion has to be implemented in SVNKit as well.

There is already a FAQ entry on the SVNKit wiki regarding connection problems where there were differences between a "native client" (TortoiseSVN, which IS using Apache Subversion code) and SVNKit, tldr: due to how certain JVMs handle address lookup.


Google site search unfortunately didn't turn up any other useful results at svnkit.com. I'm sorry not to be of any more help but I believe your best bet is to wait for a reply in the forum thread you linked to elsewhere.

Kind regards,
Daniel

Mark Phippard

unread,
Sep 19, 2022, 1:40:24 PMSep 19
to Graham Leggett, Daniel Sahlberg, Subversion
SVN does not have any IPv6 configuration files. I've been answering
this SVNKit question for years in various forum and AFAIK changing the
JVM option works. This is a low level JVM thing not what the higher
level libraries use and from what I recall SVNKit just uses the
built-in JVM network function regardless.

Either way, this is a question for the TMate forums and if they are
not answering questions there is only so much we can do as none of us
have ever contributed to their library in any way.

Mark
Reply all
Reply to author
Forward
0 new messages