Strange chineese sites in OH2 logs

I have ESP12 with SIM800 configured in items (http binding), but not connected to power now.
Looks like http binding try connect to strange sites.
I dont understand what is this:

2017-01-27 04:28:29.891 [WARN ] [org.eclipse.jetty.server.HttpChannel] - www.alipay.com:443
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
	at java.lang.String.substring(String.java:1967)[:1.8.0_101]
	at org.ops4j.pax.web.service.spi.model.ServerModel.matchPathToContext(ServerModel.java:382)[174:org.ops4j.pax.web.pax-web-spi:4.3.0]
	at org.ops4j.pax.web.service.spi.model.ServerModel.matchPathToContext(ServerModel.java:322)[174:org.ops4j.pax.web.pax-web-spi:4.3.0]
	at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:65)[172:org.ops4j.pax.web.pax-web-jetty:4.3.0]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)[80:org.eclipse.jetty.server:9.2.19.v20160908]
	at org.eclipse.jetty.server.Server.handle(Server.java:499)[80:org.eclipse.jetty.server:9.2.19.v20160908]
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)[80:org.eclipse.jetty.server:9.2.19.v20160908]
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)[80:org.eclipse.jetty.server:9.2.19.v20160908]
	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)[72:org.eclipse.jetty.io:9.2.19.v20160908]
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)[83:org.eclipse.jetty.util:9.2.19.v20160908]
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)[83:org.eclipse.jetty.util:9.2.19.v20160908]
	at java.lang.Thread.run(Thread.java:745)[:1.8.0_101]

And more:

2017-01-27 01:41:11.240 [WARN ] [org.eclipse.jetty.server.HttpChannel] - www.baidu.com:443
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
	at java.lang.String.substring(String.java:1967)[:1.8.0_101]
	at org.ops4j.pax.web.service.spi.model.ServerModel.matchPathToContext(ServerModel.java:382)[174:org.ops4j.pax.web.pax-web-spi:4.3.0]
	at org.ops4j.pax.web.service.spi.model.ServerModel.matchPathToContext(ServerModel.java:322)[174:org.ops4j.pax.web.pax-web-spi:4.3.0]
	at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:65)[172:org.ops4j.pax.web.pax-web-jetty:4.3.0]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)[80:org.eclipse.jetty.server:9.2.19.v20160908]
	at org.eclipse.jetty.server.Server.handle(Server.java:499)[80:org.eclipse.jetty.server:9.2.19.v20160908]
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)[80:org.eclipse.jetty.server:9.2.19.v20160908]
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)[80:org.eclipse.jetty.server:9.2.19.v20160908]
	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)[72:org.eclipse.jetty.io:9.2.19.v20160908]
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)[83:org.eclipse.jetty.util:9.2.19.v20160908]
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)[83:org.eclipse.jetty.util:9.2.19.v20160908]
	at java.lang.Thread.run(Thread.java:745)[:1.8.0_101]

Can you post your .items entries for the ESP12?

Maybe the ESP12 is sending to OH2 these URLs

//######################## GSM ############################## 
Number	ESP_GSM_Uptime  "Uptime"  (gStore)  { mqtt="<[oh2agdisk:/esp/gsm/sensors/uptime:state:default]" }
Number	ESP_GSM_Memory  "Freemem"  	{ mqtt="<[oh2agdisk:/esp/gsm/sensors/freemem:state:default]" }
Switch	ESP_GSM_Ping  "GSM в сети [MAP(on_is_da.map):%s]"  <network>  (gPing)  {channel="network:device:192_168_1_12:online" }
String	ESP_GSM_Simread  "GSM log"  { http="<[http://192.168.1.12/simread?clear=1:240000:REGEX(readdata len:(.*?))]" }
String	ESP_GSM_SMSr  "Recieved SMS"  { mqtt="<[oh2agdisk:/esp/gsm/gpio/sms:state:default]" }
String	ESP_GSM_SMStoAG  "SMS to me"  { mqtt=">[oh2agdisk:/esp/gsm/smssend79187777777:command:*:default]" }
String	ESP_GSM_SMStoSG  "SMS to 88"  { mqtt=">[oh2agdisk:/esp/gsm/smssend79188888888:command:*:default]" }

most likely this one is causing the “trouble”.
I assume that the response that this http call is making has these URLs included in it.

What happens if you use a browser and access this specific URL?

http://192.168.1.12/simread?clear=1

Did you reprogram your ESP12 with a new sketch or you are using it with whatever was loaded to it?

No, my ESP12 is turned off all this time.

OH2 could have received the string as a response from a previous connection to the ESP12
Try to turn it on and check the output of the http request (http://192.168.1.12/simread?clear=1)

This error (StringIndexOutOfBoundsException) is usually associated with a wrongly formatted string that is included in a response to a call.

Try to check the following from Karaf console also:

smarthome:items list |grep ESP_GSM_Simread

and check the “State=”


openhab> smarthome:items list |grep ESP_GSM_Simread
ESP_GSM_Simread (Type=StringItem, State=NULL, Label=GSM log, Category=null)
openhab>

I never turn on ESP12 with OH2, i moved items file from OH1 to OH2, since that time ESP was turned off.

Have you tried log:set TRACE org.openhab.binding.http in the console?

This is incoming request from Internet which has nothing to do with your bindings. I suppose your openhab is exposed to internet and it is just being scanned. Attacker just uses bogus host name while using your valid remote IP address.

1 Like

Why I have the same problem ? my OH is exposed but behind a VPN