Hello there!
I've been playing around with the iphone apps from or for a few days now, and i must say i'm impressed! So I decided to digg in a little further, and install BOSS.
After a few hickups (restarting CMD after changing JRE environment took me some time to figure out..), everything looked fine. Except..When I start BOSS, it fails to find the IP/KNX gateway. I tried lots of settings, but cannot seem to find what's missing. So a little help would be appreciated 
Here are the readings:
C:\temp\OR\bin>openremote run
Using CATALINA_BASE: C:\temp\OR
Using CATALINA_HOME: C:\temp\OR
Using CATALINA_TMPDIR: C:\temp\OR\temp
Using JRE_HOME: C:\Program Files\Java\jre6\
19-jan-2010 19:18:37 org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performanc
e in production environments was not found on the java.library.path: C:\temp\OR\
webapps\controller\WEB-INF\lib\native
19-jan-2010 19:18:37 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
19-jan-2010 19:18:37 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 286 ms
19-jan-2010 19:18:38 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
19-jan-2010 19:18:38 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.18
[Controller]2010-01-19 19:18:38,785 ERROR [main] org.openremote.controller.proto
col.knx.KNXEventBuilder.<init>(116) | KNX connection manager failed to start: KN
X discovery failed: search couldn't be started on any network interface
org.openremote.controller.protocol.knx.ConnectionException: KNX discovery failed
: search couldn't be started on any network interface
After this the server starts up, i can connect to it with the iphone app etc. but of course when i press a button, the server reacts as follows:
[Controller]2010-01-19 19:33:30,564 ERROR [HTTP-Thread-1] org.openremote.control
ler.protocol.knx.KNXEvent.exec(78) | org.openremote.controller.protocol.knx.Conn
ectionException: KNX IP Gateway was not found.
which is pretty logical, if that service wasn't started.
So now my big question is: What am i doing wrong?
Thanks in advance for any reply!
Grtz, Janmaarten
Comments (12)
Jan 19, 2010
Juha Lindfors says:
Can you have a look at your /logs/controller.log for KNX related entries (and po...Can you have a look at your /logs/controller.log for KNX related entries (and post it here) and see if it reveals any additional info.
Also, do you have multiple network interfaces on your machine where you installed OR Boss, and is your KNX IP gateway in the same IP subnet as your Windows machine?
– Juha
Jan 20, 2010
Janmaarten Batstra says:
Ok, I think the part you're looking for is posted below. If not, i can mail it t...Ok, I think the part you're looking for is posted below. If not, i can mail it to you, if you give me an adress.
I only have one network inteface on the machine, and subnet is the same. I tried OR KNX lite as well, and that works like a charm on the the same system (I killed OR KNX lite on the iphone first before starting BOSS ofc).
Thanks in advance for the help!
Grtz, Janmaarten
Jan 20, 2010
Juha Lindfors says:
Thanks, that was what I was looking for. It seems we find your network interfac...Thanks, that was what I was looking for.
It seems we find your network interface correctly (192.168.1.101) but then starting the search in the Calimero library (where the exception originates from), it fails to do the same.
Part of the problem may be using the incorrect API call which does not feed the network interface we found into Calimero KNX lib (we do it once to create the Discoverer object but then it is required again for some reason to start the search) so I can look into patching that and then see if it resolves the issue.
It is however still a bit of a mystery why Calimero fails to start a search on any network interface, since we do see 192.168.1.101 as a clear candidate.
Thanks for reporting this.
– Juha
Jan 20, 2010
Janmaarten Batstra says:
Thanks for looking into it. In the mean time, I installed BOSS on another syst...Thanks for looking into it.
In the mean time, I installed BOSS on another system on the same network, and i end up with the same error. Even tried rebooting the Linksys WRT 120N router, but to no succes. I might try a different router tomorrow, see where this brings me.
FYI: systems both run W7 ultimate 32, cmd is executed as administrator.
Good hunting! If you come up with a working patch, please inform me, i can hardly wait
Jan 20, 2010
Janmaarten Batstra says:
Looks like it is a windows 7 thing...I tried it on a XP machine as well, and on ...Looks like it is a windows 7 thing...I tried it on a XP machine as well, and on that it works flawlessly, on the same network. However, the server i intend to use runs windows 7, so a patch/workaround would be awesome
Jan 22, 2010
Juha Lindfors says:
Thanks for identifying this as Windows 7 issue, that helps. I've created a patc...Thanks for identifying this as Windows 7 issue, that helps.
I've created a patched version of the controller that avoids the code execution path in the Calimero KNX library that was causing the issue earlier. If you're able to try it out, would appreciate it: https://sourceforge.net/projects/openremote/files/For%20Developers/OpenRemote-Controller-1.0.3_Win7KNXDiscoveryPatch.zip/download
However, there's no guarantee this fixes it as the problem could just prop up elsewhere. I don't currently have a Windows 7 machine to test with so this patch is purely guess-work. If it doesn't solve it then will have to wait until I get a test machine.
Jan 23, 2010
Janmaarten Batstra says:
No succes yet, it still can't find the gateway. Here is the log segment: 2010-0...No succes yet, it still can't find the gateway. Here is the log segment:
2010-01-24 00:10:47,595 INFO [main] org.openremote.controller.protocol.knx.KNXConnectionManager.resolveLocalAddresses(335) | KNX Connection manager resolving local host IP addresses...
2010-01-24 00:10:47,626 INFO [main] org.openremote.controller.protocol.knx.KNXConnectionManager.isCandidate(594) | Skipping loopback interface: name:lo (Software Loopback Interface 1) index: 1 addresses:
/0:0:0:0:0:0:0:1;
/127.0.0.1;
2010-01-24 00:10:47,628 INFO [main] org.openremote.controller.protocol.knx.KNXConnectionManager.isCandidate(588) | Skipping disabled NIC: name:net0 (WAN Miniport (SSTP)) index: 2 addresses:
2010-01-24 00:10:47,631 INFO [main] org.openremote.controller.protocol.knx.KNXConnectionManager.isCandidate(588) | Skipping disabled NIC: name:net1 (WAN Miniport (IKEv2)) index: 3 addresses:
2010-01-24 00:10:47,633 INFO [main] org.openremote.controller.protocol.knx.KNXConnectionManager.isCandidate(588) | Skipping disabled NIC: name:net2 (WAN Miniport (L2TP)) index: 4 addresses:
2010-01-24 00:10:47,635 INFO [main] org.openremote.controller.protocol.knx.KNXConnectionManager.isCandidate(588) | Skipping disabled NIC: name:net3 (WAN Miniport (PPTP)) index: 5 addresses:
2010-01-24 00:10:47,637 INFO [main] org.openremote.controller.protocol.knx.KNXConnectionManager.isCandidate(588) | Skipping disabled NIC: name:ppp0 (WAN Miniport (PPPOE)) index: 6 addresses:
2010-01-24 00:10:47,639 INFO [main] org.openremote.controller.protocol.knx.KNXConnectionManager.isCandidate(588) | Skipping disabled NIC: name:eth0 (WAN Miniport (IPv6)) index: 7 addresses:
2010-01-24 00:10:47,642 INFO [main] org.openremote.controller.protocol.knx.KNXConnectionManager.isCandidate(588) | Skipping disabled NIC: name:eth1 (WAN Miniport (Network Monitor)) index: 8 addresses:
2010-01-24 00:10:47,649 INFO [main] org.openremote.controller.protocol.knx.KNXConnectionManager.isCandidate(588) | Skipping disabled NIC: name:eth2 (WAN Miniport (IP)) index: 9 addresses:
2010-01-24 00:10:47,652 INFO [main] org.openremote.controller.protocol.knx.KNXConnectionManager.isCandidate(588) | Skipping disabled NIC: name:ppp1 (RAS Async Adapter) index: 10 addresses:
2010-01-24 00:10:47,655 INFO [main] org.openremote.controller.protocol.knx.KNXConnectionManager.isCandidate(588) | Skipping disabled NIC: name:eth3 (Realtek RTL8168B/8111B Family PCI-E Gigabit Ethernet NIC (NDIS 6.20)) index: 11 addresses:
2010-01-24 00:10:47,657 INFO [main] org.openremote.controller.protocol.knx.KNXConnectionManager.isCandidate(588) | Skipping disabled NIC: name:net4 (Microsoft ISATAP Adapter) index: 12 addresses:
/fe80:0:0:0:0:5efe:c0a8:165%12;
2010-01-24 00:10:47,662 INFO [main] org.openremote.controller.protocol.knx.KNXConnectionManager.isCandidate(600) | Skipping point-to-point interface: name:net5 (Teredo Tunneling Pseudo-Interface) index: 13 addresses:
/2001:0:d5c7:a2d6:8f6:2e2d:a282:a6c;
/fe80:0:0:0:8f6:2e2d:a282:a6c%13;
2010-01-24 00:10:47,667 INFO [main] org.openremote.controller.protocol.knx.KNXConnectionManager.resolveLocalAddresses(370) | Found candidate NIC: name:eth4 (Atheros AR8121/AR8113/AR8114 PCI-E Ethernet Controller(NDIS6.20)) index: 14 addresses:
/fe80:0:0:0:d61:e1ed:3869:1325%14;
/192.168.1.101;
2010-01-24 00:10:47,668 INFO [main] org.openremote.controller.protocol.knx.KNXConnectionManager.resolveLocalAddresses(386) | Skipped IPv6 address (not supported by KNX) /fe80:0:0:0:d61:e1ed:3869:1325%14
2010-01-24 00:10:47,668 INFO [main] org.openremote.controller.protocol.knx.KNXConnectionManager.resolveLocalAddresses(394) | Added candidate IP address to set - /192.168.1.101
2010-01-24 00:10:47,671 INFO [main] org.openremote.controller.protocol.knx.KNXConnectionManager.isCandidate(588) | Skipping disabled NIC: name:eth5 (Atheros AR8121/AR8113/AR8114 PCI-E Ethernet Controller(NDIS6.20)-QoS Packet Scheduler-0000) index: 15 addresses:
2010-01-24 00:10:47,673 INFO [main] org.openremote.controller.protocol.knx.KNXConnectionManager.isCandidate(588) | Skipping disabled NIC: name:eth6 (Atheros AR8121/AR8113/AR8114 PCI-E Ethernet Controller(NDIS6.20)-WFP LightWeight Filter-0000) index: 16 addresses:
2010-01-24 00:10:47,675 INFO [main] org.openremote.controller.protocol.knx.KNXConnectionManager.isCandidate(588) | Skipping disabled NIC: name:eth7 (WAN Miniport (Network Monitor)-QoS Packet Scheduler-0000) index: 17 addresses:
2010-01-24 00:10:47,677 INFO [main] org.openremote.controller.protocol.knx.KNXConnectionManager.isCandidate(588) | Skipping disabled NIC: name:eth8 (WAN Miniport (IP)-QoS Packet Scheduler-0000) index: 18 addresses:
2010-01-24 00:10:47,679 INFO [main] org.openremote.controller.protocol.knx.KNXConnectionManager.isCandidate(588) | Skipping disabled NIC: name:eth9 (WAN Miniport (IPv6)-QoS Packet Scheduler-0000) index: 19 addresses:
2010-01-24 00:10:47,749 ERROR [main] org.openremote.controller.protocol.knx.KNXEventBuilder.<init>(116) | KNX connection manager failed to start: KNX discovery failed: search request failed, An operation was attempted on something that is not a socket
org.openremote.controller.protocol.knx.ConnectionException: KNX discovery failed: search request failed, An operation was attempted on something that is not a socket
Jan 25, 2010
Juha Lindfors says:
Had a brief access to a Windows 7 machine over the weekend and it seems this "An...Had a brief access to a Windows 7 machine over the weekend and it seems this "An operation was attempted on something that is not a socket" is caused by assigning a specific network interface to a multicast socket in Java + Windows 7 combination (works fine on WinXP, Mac OS X and Linux).
The combination that causes the issue is still unclear (whether it's an issue with Java or Windows 7) but there are a couple of workarounds that can be implemented.
The main one that I am going to include in a release is to allow a KNX gateway IP address to be configured explicitly which will bypass the discovery procedure (and need for multicast) altogether. This is needed anyway for certain network deployments where multicast is not available or won't propagate across switches from controller to gateway.
The downside is this requires an extra configuration step on the user's part.
Discovery on Windows 7 can be made to work at least while only one network interface is available on the host machine and the Java runtime automatically assigns the multicast socket to an available network interface. At least it seems to let the controller start on Windows 7 without an exception stack trace, but still needs some further testing. The downside of this it needs to be an exception code for Win7 only (since the current discovery works just fine on WinXP/MacOS/Linux systems) and it would only work on single-NIC machines (which is a fairly typical scenario for home setups).
I do have a patched version of the Calimero KNX library that attempts to do this latter workaround – if you're still interested in testing, let me know.
Other than that, wait for a release that allows KNG gateway IP configured manually instead of relying multicast-based discovery.
PS. If anybody has any more technical details on this issue, what might be causing it, or a known bug report against it, would be nice to know.
Jan 26, 2010
Janmaarten Batstra says:
Sure I'm interested, always nice to find out is sth works or not, right? I don'...Sure I'm interested, always nice to find out is sth works or not, right?
I don't think the extra config step is a bad thing. Automatic discovery is always better, but the people working with these programs mostly will be able to manually implement an IP adress without too much af a hassle.
Then again, maybe it's possible to implement it as a backup function, like in OR KNX app. First attempt auto-discovery, if that fails switch to manual instead?
But keep sending the patches, it will provide some extra information at the least, right?
Jan 26, 2010
Juha Lindfors says:
For a quick test, you can replace the calimero.jar in your controller /webapps/...For a quick test, you can replace the calimero.jar in your controller /webapps/controller/WEB-INF/lib directory with this: http://sourceforge.net/projects/openremote/files/For%20Developers/calimero-PATCH_A.jar/download
And restart of course. It will print a message on the console if the replacement was done correctly.
I wasn't able to test it with KNX since didn't have a Win7 machine with KNX available, only saw that the start up did not generate the exception any longer.
I'll put the direct gateway config into the next 1.0.3 release.
– Juha
Feb 02, 2010
Janmaarten Batstra says:
This one works will do some durability tests in the days to come, but for now i...This one works
will do some durability tests in the days to come, but for now it looks good.
Feb 03, 2010
Administrator says:
Good to know. Will be curious to hear the results of your durability tests as we...Good to know. Will be curious to hear the results of your durability tests as well.