After moving installation to SSD, can only connect to web server remotely

  • Platform information:
    • Hardware: Raspberry Pi 3B
    • OS: OpenHABian
    • Java Runtime Environment: included Zulu JDK 8
    • openHAB version: 2.3.0 Snapshot
  • Issue of the topic: Web server does not work locally, but can access from remote
  • Please post configurations (if applicable):
    Moved everything but /boot from the SD card to SSD and updated to latest Snapshot
  • If logs where generated please post these here using code fences:

I appear to be facing an issue with the configuration of the included web server. Before all this started, I ran the openhabian-config tool and moved everything except for /boot to the SD card. I also upgraded to the latest snapshot later that evening before I noticed that my OpenHAB application was only connecting to “remote address” rather than using the “local address” when on my home wifi.

Trying to navigate to the Paper UI (or my Node Red home page on a different port) and I am greeted with “Could not connect to secure server”.Trying to run a curl to either https port gives me this error message below

Error: "SSL: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol".

However, I can access my Paper UI webpage through my personal myopenhab instance hosted on AWS perfectly fine. To me it looks like I’m having a problem with the included SSL cert.

I have tried restarting OpenHAB, rebooting the Pi, and wiping the cache. Does anyone have any suggestions on what I can try before I just throw in the towel and re-install from scratch?

Errors in the logs?

It’s not much, but this is all I have in openhab.log

       2018-02-11 07:21:21.158 [WARN ] [org.eclipse.jetty.http.HttpParser   ] - Illegal character 0x16 in state=START for buffer HeapByteBuffer@5dbca9[p=1,l=231,c=8192,r=230]={\x16<<<\x03\x01\x00\xE2\x01\x00\x00\xDe\x03\x03\x88u\xCf\x1c\xD6.\x87...\x02\x01\x00\x00\n\x00\x08\x00\x06\x00\x1d\x00\x17\x00\x18>>>b.synmedia.org\r\nA...\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00}
2018-02-11 07:21:21.168 [WARN ] [org.eclipse.jetty.http.HttpParser   ] - bad HTTP parsed: 400 Illegal character 0x16 for HttpChannelOverHttp@1cb4249{r=0,c=false,a=IDLE,uri=null}
2018-02-11 07:21:21.181 [WARN ] [org.eclipse.jetty.http.HttpParser   ] - Illegal character 0x16 in state=START for buffer HeapByteBuffer@5dbca9[p=1,l=237,c=8192,r=236]={\x16<<<\x03\x01\x00\xE8\x01\x00\x00\xE4\x03\x03\xAd7T\xE6Iy\xFb...\x02\x01\x00\x00\n\x00\x08\x00\x06\x00\x1d\x00\x17\x00\x18>>>edia.org\r\nAccept-...\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00}
2018-02-11 07:21:21.185 [WARN ] [org.eclipse.jetty.http.HttpParser   ] - bad HTTP parsed: 400 Illegal character 0x16 for HttpChannelOverHttp@c9d094{r=0,c=false,a=IDLE,uri=null}
2018-02-11 07:21:21.199 [WARN ] [org.eclipse.jetty.http.HttpParser   ] - Illegal character 0x16 in state=START for buffer HeapByteBuffer@5dbca9[p=1,l=185,c=8192,r=184]={\x16<<<\x03\x01\x00\xB4\x01\x00\x00\xB0\x03\x01\xF6\xB6\xB2/\x88<e...\x02\x01\x00\x00\n\x00\x08\x00\x06\x00\x1d\x00\x17\x00\x18>>>-15\x05h2-14\x08spdy/3....\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00}
2018-02-11 07:21:21.203 [WARN ] [org.eclipse.jetty.http.HttpParser   ] - bad HTTP parsed: 400 Illegal character 0x16 for HttpChannelOverHttp@455f55{r=0,c=false,a=IDLE,uri=null}
2018-02-11 14:46:43.948 [WARN ] [io.openhabcloud.internal.CloudClient] - Jetty request 847 failed: null
2018-02-11 14:48:05.633 [WARN ] [io.openhabcloud.internal.CloudClient] - Jetty request 853 failed: null
2018-02-11 14:48:07.824 [WARN ] [io.openhabcloud.internal.CloudClient] - Jetty request 855 failed: null
2018-02-11 14:48:35.388 [WARN ] [io.openhabcloud.internal.CloudClient] - Jetty request 857 failed: null
2018-02-11 14:48:53.877 [WARN ] [io.openhabcloud.internal.CloudClient] - Jetty request 866 failed: null
2018-02-11 14:48:55.587 [WARN ] [io.openhabcloud.internal.CloudClient] - Jetty request 868 failed: null
2018-02-11 14:49:56.402 [WARN ] [io.openhabcloud.internal.CloudClient] - Jetty request 872 failed: null
2018-02-11 14:51:52.087 [WARN ] [io.openhabcloud.internal.CloudClient] - Jetty request 874 failed: null
2018-02-11 14:53:08.499 [WARN ] [io.openhabcloud.internal.CloudClient] - Jetty request 876 failed: null
2018-02-11 15:13:45.386 [WARN ] [io.openhabcloud.internal.CloudClient] - Jetty request 881 failed: null
2018-02-11 15:14:21.511 [WARN ] [io.openhabcloud.internal.CloudClient] - Jetty request 883 failed: null
2018-02-11 15:23:13.980 [WARN ] [io.openhabcloud.internal.CloudClient] - Jetty request 885 failed: null
2018-02-11 19:16:05.583 [WARN ] [io.openhabcloud.internal.CloudClient] - Jetty request 889 failed: null
2018-02-11 21:18:05.620 [WARN ] [io.openhabcloud.internal.CloudClient] - Jetty request 893 failed: null
2018-02-11 21:18:08.233 [WARN ] [io.openhabcloud.internal.CloudClient] - Jetty request 902 failed: null
2018-02-11 21:18:12.172 [WARN ] [io.openhabcloud.internal.CloudClient] - Jetty request 905 failed: null
2018-02-12 00:00:30.145 [INFO ] [thome.binding.astro.internal.job.Job] - Scheduled Astro event-jobs for thing astro:moon:local
2018-02-12 00:00:30.229 [INFO ] [thome.binding.astro.internal.job.Job] - Scheduled Astro event-jobs for thing astro:sun:local
2018-02-12 08:38:16.619 [INFO ] [io.openhabcloud.internal.CloudClient] - Disconnected from the openHAB Cloud service (UUID = $SanitizedUUID, base URL = http://localhost:8080)
2018-02-12 08:40:35.026 [INFO ] [io.openhabcloud.internal.CloudClient] - Connected to the openHAB Cloud service (UUID = $SanitizedUUID, base URL = http://localhost:8080)
2018-02-12 08:46:10.523 [INFO ] [io.openhabcloud.internal.CloudClient] - Disconnected from the openHAB Cloud service (UUID = $SanitizedUUID, base URL = http://localhost:8080)
2018-02-12 08:46:54.319 [INFO ] [io.openhabcloud.internal.CloudClient] - Connected to the openHAB Cloud service (UUID = $SanitizedUUID, base URL = http://localhost:8080)
2018-02-12 08:48:19.232 [INFO ] [io.openhabcloud.internal.CloudClient] - Disconnected from the openHAB Cloud service (UUID = $SanitizedUUID, base URL = http://localhost:8080)
2018-02-12 08:49:46.256 [INFO ] [io.openhabcloud.internal.CloudClient] - Connected to the openHAB Cloud service (UUID = $SanitizedUUID, base URL = http://localhost:8080)
2018-02-12 11:21:55.926 [INFO ] [io.openhabcloud.internal.CloudClient] - Disconnected from the openHAB Cloud service (UUID = $SanitizedUUID, base URL = http://localhost:8080)
2018-02-12 11:32:00.164 [INFO ] [io.openhabcloud.internal.CloudClient] - Connected to the openHAB Cloud service (UUID = $SanitizedUUID, base URL = http://localhost:8080)
2018-02-12 13:26:31.979 [WARN ] [rm.AbstractFileTransformationService] - Could not transform '-' with the file 'home.map' : Target value not found in map for '-'
2018-02-12 13:26:31.984 [WARN ] [rm.AbstractFileTransformationService] - Could not transform '-' with the file 'home.map' : Target value not found in map for '-'
2018-02-12 13:26:40.181 [WARN ] [rm.AbstractFileTransformationService] - Could not transform '-' with the file 'home.map' : Target value not found in map for '-'
2018-02-12 13:26:40.192 [WARN ] [rm.AbstractFileTransformationService] - Could not transform '-' with the file 'home.map' : Target value not found in map for '-'
2018-02-12 14:40:39.027 [INFO ] [io.openhabcloud.internal.CloudClient] - Disconnected from the openHAB Cloud service (UUID = $SanitizedUUID, base URL = http://localhost:8080)
2018-02-12 14:44:47.671 [ERROR] [io.openhabcloud.internal.CloudClient] - Socket.IO error: {}
io.socket.engineio.client.EngineIOException: xhr post error
	at io.socket.engineio.client.Transport.onError(Transport.java:71) [220:org.openhab.io.openhabcloud:2.3.0.201802081624]
	at io.socket.engineio.client.transports.PollingXHR.access$000(PollingXHR.java:19) [220:org.openhab.io.openhabcloud:2.3.0.201802081624]
	at io.socket.engineio.client.transports.PollingXHR$4$1.run(PollingXHR.java:88) [220:org.openhab.io.openhabcloud:2.3.0.201802081624]
	at io.socket.thread.EventThread$2.run(EventThread.java:80) [220:org.openhab.io.openhabcloud:2.3.0.201802081624]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
	at java.lang.Thread.run(Thread.java:748) [?:?]
Caused by: java.net.SocketTimeoutException: connect timed out
	at java.net.PlainSocketImpl.socketConnect(Native Method) ~[?:?]
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[?:?]
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[?:?]
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[?:?]
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[?:?]
	at java.net.Socket.connect(Socket.java:589) ~[?:?]
	at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:673) ~[?:?]
	at sun.net.NetworkClient.doConnect(NetworkClient.java:175) ~[?:?]
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) ~[?:?]
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) ~[?:?]
	at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264) ~[?:?]
	at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367) ~[?:?]
	at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191) ~[?:?]
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1156) ~[?:?]
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1050) ~[?:?]
	at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177) ~[?:?]
	at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1334) ~[?:?]
	at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1309) ~[?:?]
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:259) ~[?:?]
	at io.socket.engineio.client.transports.PollingXHR$Request$1.run(PollingXHR.java:206) ~[?:?]
	... 1 more
2018-02-12 14:44:47.761 [INFO ] [io.openhabcloud.internal.CloudClient] - Disconnected from the openHAB Cloud service (UUID = $SanitizedUUID, base URL = http://localhost:8080)
2018-02-12 14:47:19.040 [INFO ] [io.openhabcloud.internal.CloudClient] - Connected to the openHAB Cloud service (UUID = $SanitizedUUID, base URL = http://localhost:8080)
2018-02-12 16:22:22.436 [WARN ] [io.openhabcloud.internal.CloudClient] - Jetty request 1092 failed: null
2018-02-12 16:43:16.641 [WARN ] [io.openhabcloud.internal.CloudClient] - Jetty request 1096 failed: null
2018-02-12 17:08:05.533 [WARN ] [io.openhabcloud.internal.CloudClient] - Jetty request 1098 failed: null
2018-02-12 17:08:12.934 [WARN ] [io.openhabcloud.internal.CloudClient] - Jetty request 1103 failed: null

I assume it did work before moving the root partition to SSD ?!

Does the root=… entry in /boot/cmdline.txt point to the root partition of the ssd ?

The symptoms you describe are somewhat weird so I assume the move-script from openhabian-config did something wrong.
I once tried to setup amanda backup using openhabian-config and it did not went well …

Oh yes. Definitely worked beforehand! :slight_smile:

I happened to check the cmdline.txt yesterday and it definitely references SDA1 instead of mmcblk for the / partition.

I’m on a Mac and iPhone :sweat_smile: so I was trying this in Safari. Got so frustrated last night that I tried it in Google Chrome and while it doesn’t work for the hostname, it will work for the ip address in Chrome. Safari doesn’t work for hostname or ip on my iPhone or my Mac. The hostname definitely resolves on my local network also so I’m still pretty certain this is somehow a borked config somewhere.

If I can’t get all this figured out soon, I’ll probably just re-install a fresh openHABian to the SD card and manually move everything to the SSD.

That would have been my next tip … :smiley:
It seems to come down to a DNS resolution problem. As far as I concern Safari always does DNS lookup - even if clearly an IP is provided - which Chrome does not. Did you check differences between using the simple an fully qualified host name (myhost vs. myhost.mylocal.domain) ?
It smells to me that some file ownership and permissions where not preserved when files where moved from SD card to SSD.

just another idea here. Do you have any reverse proxy set up that might be treating differently your requests coming from the internal / local network and internet ?