Invalid IPv6 Address

After restarting the openhab service I’ve started getting this error. All I changed was the security:option from ON to EXTERNAL.

Basically nothing will work for me. Going to try another restart

2016-03-25 16:52:35.906 [ERROR] [.io.net.http.SecureHttpContext] - 192.168.1.1:65486: invalid IPv6 address
2016-03-25 16:52:41.890 [ERROR] [.io.net.http.SecureHttpContext] - 192.168.1.1:65486: invalid IPv6 address
2016-03-25 16:52:41.904 [ERROR] [.io.net.http.SecureHttpContext] - 192.168.1.1:65486: invalid IPv6 address
2016-03-25 16:52:47.888 [ERROR] [.io.net.http.SecureHttpContext] - 192.168.1.1:65486: invalid IPv6 address
… and on

After restarting the service I get even more errors. Going for a reboot instead.

Still getting the same error after a reboot, BUT openhab is working. The only problem is now it’s logging this error every few seconds so I do need to get it fixed!

Don’t know the problem but 192.168.1.1:4303 is not a valid IPv6 address so for some reason the encrypted HTTP processing in Jetty is treating IPv4 requests as if they were IPv6.

Have you enabled IPv6 on your machine recently? Can you live without it? Have you enable IPv6 settings anywhere in OH configs or elsewhere on the machine?

Nope, I haven’t. I haven’t touched it really. That IP is my default gateway (my router). The only thing I have done with IPv6 involved a perl module, but that was ages ago. This appears to be very much linked to the fact that I enabled security only for external users.

For some reason the security module is expecting IPv6 but receiving IPv4 traffic. That is the root cause of your problem.

Any ideas what I might do to fix this? It’s totally swamping my log files. For now I’m going to have to abandon using External authentication.

No ideas. You might try disabling IPv6 on your machine. Can’t tell you how but Google should help.

This posting might be relevant…

Looks somewhat related, except my install can’t handle the ipv6 - there’s can handle it, but treat it as external.

The problem is different but the fact that

makes me think that something similar is happening here. The browser is trying to use IPv6 with IPv4 addresses.

@rlkoshak @rossdargan This looks a bit different to me. Based on looking at the source code, the log message seems to be from an UnknownHostException when trying resolve the address given in the HTTP request. I have no idea how that would happen and unfortunately the exception bypasses the TRACE-level logging that would show the incoming address.

The problem I had was related to the IPv4 security mask not matching the IPv6 request address and it only caused the authentication dialog to be shown in the browser with no logged errors by OH.

If you are handy with packet capture software like Wireshark you could determine what’s being sent to OH that way.

P.S. Please trim down the stacktrace in the original post. There’s not a good reason to show the same log error so many times and it makes it difficult to navigate this thread using a device with a small screen (like a smartphone).

Sorry about that - I had tried to attach the .log file but it wouldn’t let me - trimmed down now!