Tigase broken on Solaris x64 with jdk1.8.0_40 and later

Christian Kühnke
Added over 3 years ago

On Solaris x64 with jdk1.8.0_40 and later, tigase does not accept incoming c2s connections. The log file says:

2015-06-30 19:55:29.517


INFO: Socket closed instantly after it had been opened? Invalid argument

    at Method)







Running tigase on solaris x64 with jdk1.8.0_31 works fine.

Just for your information, if anybody else stumbles over this problem.

Replies (3)


Added by Artur Hefczyc TigaseTeam over 3 years ago

Thank you for letting us know. Unfortunately we do not have access to Solaris right now, so we cannot investigate or suggest any other workaround.

Added by Christian Kühnke over 3 years ago

That's OK. Unfortunately, Solaris has become a bit exotic lately ;-)

To update on the situation: Still broken with jdk1.8.0_60...

Added by Christian Kühnke over 3 years ago

Hah, I nailed it down! The problem was introduced by the fix for, which bas backported to jdk8u40 by

My understanding (my still be partially wrong):

It adds IP_TOS to the list of (from the java point of view) permissable server socket options, so any IP_TOS option get now passed on to the operating system. Linux does not care about unknown or unsupported socket options whereas Solaris does.

By doing "sc.socket().setTrafficClass(al.getTrafficClass())" in Tigase tries to copy some socket options from another socket, which lead to the following system call:

/20: setsockopt(86, ipv6, IPV6_TCLASS, 0xFFFF80FFBB9FE600, 4, SOV_DEFAULT) Err#22 EINVAL

I am not sure why IPV6 comes into play here, however it is this syscall which leads to the execption.

I also found a workaround: Add "" to the JAVA_OPTIONS in tigase.conf.