1

Migration to 14.06

asked 2014-07-03 01:36:07 -0700

PierreR gravatar image

updated 2014-07-03 03:08:12 -0700

I have several programs in java and C++ that use alljoyn 14.02 and I've started migrating them to 14.06. On the code side, everything seems to be smooth, the only change I had to make is to adapt the call to AboutService#addAnnouncementHandler.

Now, when I run the programs, I get many errors like these :

****** ERROR NETWORK external          common/os/posix/Socket.cc:345 | Binding (sockfd = 79) to 0.0.0.0 9955: 98 - Address already in use: ER_OS_ERROR

****** ERROR NETWORK lepDisp           common/os/posix/Socket.cc:345 | Binding (sockfd = 96) to 0.0.0.0 9955: 98 - Address already in use: ER_OS_ERROR

****** ERROR ALLJOYN_OBJ lepDisp       .../router/AllJoynObj.cc:2215 | GetSessionInfo failed: ER_BUS_NO_ROUTE

****** ERROR IPNS    IpNameServiceImpl .../IpNameServiceImpl.cc:3597 | IpNameServiceImpl::SameNetwork(): Bad IPv6 network prefix: ER_FAIL

****** ERROR ALLJOYN_JAVA external     ...a/jni/alljoyn_java.cc:6180 | BusAttachment_joinSession(): Error.  Forgetting jglobalref: ER_ALLJOYN_JOINSESSION_REPLY_UNREACHABLE

When analyzing my logs, it seems I'm missing many (but not all) sessionless signals and many about announcement (sometime I don't receive them at all and sometime it takes a very long time : 10s).

All these programs use the full client with an embedded router (and during tests are running on the same computer), they were running fine with 14.02 and completely break with 14.06. I suspect I have a problem with the underlying name service but I don't know where to look and how to debug this kind of error. Could someone give me some general instructions on debugging and diagnosis ?

I've tried (and had no luck with) :

  • using TRANSPORT_TCP in sessionOpts when binding and joining session (in order to avoid using the beta UDP transport)
  • disabling IPV6 on the computer I was running the tests on (as I have many Bad IPv6 network prefix error)

I'll keep editing this question as i try new things, but I'm really looking for a way to narrow down the problem to something I can understand.

edit retag flag offensive close merge delete

Comments

It will be helpful to provide details viz. the OS on which you are running. Do you get the same kind of errors when running the sample applications provided in SDK (Java samples are here: https://git.allseenalliance.org/cgit/core/alljoyn.git/tree/services/about/java/samples )?

praveenb ( 2014-07-04 07:25:37 -0700 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2014-07-04 08:09:32 -0700

praveenb gravatar image

One debugging resource that can be useful is is Debugging/Testing training session listed on Training wiki page. The presentation slides for the Debugging/Testing training are here: PDF.

First two error messages are these:

** ERROR NETWORK external common/os/posix/Socket.cc:345 | Binding (sockfd = 79) to 0.0.0.0 9955: 98 - Address already in use: ER_OS_ERROR

** ERROR NETWORK lepDisp common/os/posix/Socket.cc:345 | Binding (sockfd = 96) to 0.0.0.0 9955: 98 - Address already in use: ER_OS_ERROR

The two Transports of AllJoyn Routing node, TCP and UDP (available as an experimental transport since 14.06), bind to port 9955 by default. If this port is not available, which can happen if another AllJoyn Routing node is already running on the same device, another random port is chosen. The first two error messages that you have provided, correspond to this.

Third error message is:

** ERROR ALLJOYN_OBJ lepDisp .../router/AllJoynObj.cc:2215 | GetSessionInfo failed: ER_BUS_NO_ROUTE

AllJoynObj is the piece implementing the APIs that an AllJoyn Router node offers. The source code for this is in AllJoynObj.cc. One of things done by AllJoynObj, among many others, is management of sessions. The third error message seems to indicate that there was an error when the session was being established. Without additional information, my guess is that there was some connectivity problem. No session implies, no sessionless signal and thereby no About announcement. One way to debug this further is to enable additional logging by setting ER_DEBUG_ALLJOYN_OBJ=7. Details on how to enable logging is on Slides 12 and 13 of the above mentioned training presentation deck.

Fourth error message:

** ERROR IPNS IpNameServiceImpl .../IpNameServiceImpl.cc:3597 | IpNameServiceImpl::SameNetwork(): Bad IPv6 network prefix: ER_FAIL

Without additional information, it is difficult to state the reason for this error message. One thing is to try is to enable NameService logging via ER_DEBUG_IPNS. NameService that enables discovery of names between AllJoyn Routing nodes, works by sending packets to IPv4 multicast, IPv6 multicast and the Subnet broadcast addresses. So even though one of them fails, discovery would still work owing to other packets. It doesn't look like discovery is the problem in your case.

The last error:

** ERROR ALLJOYN_JAVA external ...a/jni/alljoyn_java.cc:6180 | BusAttachment_joinSession(): Error. Forgetting jglobalref: ER_ALLJOYN_JOINSESSION_REPLY_UNREACHABLE

also seems to indicate some problem with session establishment. One thing to check is if both devices are able to ping each other without too much packet loss.

edit flag offensive delete publish link more
Login/Signup to Answer

Question Tools

Follow
1 follower

Stats

Asked: 2014-07-03 01:36:07 -0700

Seen: 648 times

Last updated: Jul 04 '14