[sip-comm-dev] ZeroConf issues


#1

Chris,

First bravo for your excellent work. We just notice some issues with
the ZeroConf plugin. The presence works but sending messages fails. I
have attached the logs. By the way, I think the exact name of the
protocol should rather be called Bonjour instead of ZeroConf. ZeroConf
is the name of an IETF working group, which discuss on ZeroConf
protocols like UPnP or mDNS/DNS-SD (aka Bonjour!).

Guillaume

UPDATING CACHE !!
17:31:54.920 PLUS FIN:
impl.configuration.ConfigurationServiceImpl.setProperty().137
net.java.sip.communicator.impl.gui.accounts.acc1182267109318.lastAccountStatus(
oldValue=null, newValue=avail.
17:31:54.925 FIN:
impl.protocol.zeroconf.BonjourService.serviceAdded().366 BONJOUR:
emcho@pastropnet[_presence._tcp.local.] detected! Trying to get
information...
17:31:54.929 INFO: class
net.java.sip.communicator.impl.protocol.zeroconf.jmdns.JmDNS.printServices()
  ---- Services -----
    Service: guillaume@lsiit._presence._tcp.local.:
service[guillaume@lsiit._presence._tcp.local.,exponet.u-strasbg.fr/130.79.90.187:5298,\016port.p2pj=5298\016nick...]
  ---- Types ----
    Type: _presence._tcp.local.: _presence._tcp.local.
  ---- cache ----
    record[ptr,in,_presence._tcp.local.,3600/3599]
    record[a,in,exponet.local.,3600/3599]
    record[srv,in,guillaume@lsiit._presence._tcp.local.,3600/3599]
    record[txt,in-unique,guillaume@lsiit._presence._tcp.local.,3600/3599]
    record[txt,in-unique,emcho@pastropnet._presence._tcp.local.,3600/3599]
    record[srv,in-unique,emcho@pastropnet._presence._tcp.local.,3600/3599]
  ---- Service Collectors ----
UPDATING CACHE !!
17:31:55.159 FIN:
impl.protocol.zeroconf.BonjourService.serviceResolved().418 BONJOUR:
Information about emcho@pastropnet discovered
17:31:55.160 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().447
ZEROCNF: ContactID emcho@pastropnet Address /130.79.90.87
17:31:55.161 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().450
       Address=>/130.79.90.87:5298
17:31:55.161 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
       nick=>Emil
17:31:55.162 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
       txtvers=>1
17:31:55.162 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
       ext=>
17:31:55.163 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
       jid=>emcho@pastropnet
17:31:55.163 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
       msg=>
17:31:55.163 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
       node=>SIP Communicator
17:31:55.164 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
       client=>SIP Communicator
17:31:55.164 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
       status=>avail
17:31:55.165 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
       ver=>1
17:31:55.165 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
       1st=>Emil
17:31:55.166 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
       email=>emcho@emcho.com
17:31:55.166 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
       vc=>C!
17:31:55.166 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
       phsh=>000
17:31:55.167 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
       last=>Ivov
Exception in thread "JmDNS.SocketListener" java.lang.NumberFormatException: null
  at java.lang.Integer.parseInt(Integer.java:415)
  at java.lang.Integer.valueOf(Integer.java:553)
  at net.java.sip.communicator.impl.protocol.zeroconf.BonjourService.handleResolvedService(BonjourService.java:466)
  at net.java.sip.communicator.impl.protocol.zeroconf.BonjourService.serviceResolved(BonjourService.java:421)
  at net.java.sip.communicator.impl.protocol.zeroconf.jmdns.JmDNS.handleServiceResolved(JmDNS.java:504)
  at net.java.sip.communicator.impl.protocol.zeroconf.jmdns.ServiceInfo.updateRecord(ServiceInfo.java:605)
  at net.java.sip.communicator.impl.protocol.zeroconf.jmdns.JmDNS.updateRecord(JmDNS.java:953)
  at net.java.sip.communicator.impl.protocol.zeroconf.jmdns.JmDNS.handleResponse(JmDNS.java:1121)
  at net.java.sip.communicator.impl.protocol.zeroconf.jmdns.JmDNS.access$900(JmDNS.java:21)
  at net.java.sip.communicator.impl.protocol.zeroconf.jmdns.JmDNS$SocketListener.run(JmDNS.java:1287)
  at java.lang.Thread.run(Thread.java:613)
17:32:04.041 GRAVE: impl.protocol.zeroconf.BonjourService.run().165
ZEROCONF: Connexion from unknown contact [/130.79.90.87]. REJECTING!
17:32:04.934 FIN:
impl.protocol.zeroconf.BonjourService.serviceResolved().418 BONJOUR:
Information about emcho@pastropnet discovered
17:32:04.935 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().447
ZEROCNF: ContactID emcho@pastropnet Address /130.79.90.87
17:32:04.935 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().450
       Address=>/130.79.90.87:5298
17:32:04.936 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
       nick=>Emil
17:32:04.936 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
       txtvers=>1
17:32:04.937 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
       ext=>
17:32:04.937 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
       jid=>emcho@pastropnet
17:32:04.938 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
       msg=>
17:32:04.938 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
       node=>SIP Communicator
17:32:04.939 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
       client=>SIP Communicator
17:32:04.939 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
       status=>avail
17:32:04.939 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
       ver=>1
17:32:04.941 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
       1st=>Emil
17:32:04.941 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
       email=>emcho@emcho.com
17:32:04.942 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
       vc=>C!
17:32:04.942 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
       phsh=>000
17:32:04.943 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
       last=>Ivov
17:32:07.420 GRAVE: impl.protocol.zeroconf.BonjourService.run().165
ZEROCONF: Connexion from unknown contact [/130.79.90.87]. REJECTING!
Exception in thread "Thread-11" java.lang.NumberFormatException: null
  at java.lang.Integer.parseInt(Integer.java:415)
  at java.lang.Integer.valueOf(Integer.java:553)
  at net.java.sip.communicator.impl.protocol.zeroconf.BonjourService.handleResolvedService(BonjourService.java:466)
  at net.java.sip.communicator.impl.protocol.zeroconf.BonjourService.serviceResolved(BonjourService.java:421)
  at net.java.sip.communicator.impl.protocol.zeroconf.jmdns.JmDNS.handleServiceResolved(JmDNS.java:504)
  at net.java.sip.communicator.impl.protocol.zeroconf.jmdns.ServiceInfo.updateRecord(ServiceInfo.java:605)
  at net.java.sip.communicator.impl.protocol.zeroconf.jmdns.JmDNS.addListener(JmDNS.java:915)
  at net.java.sip.communicator.impl.protocol.zeroconf.jmdns.JmDNS$ServiceInfoResolver.<init>(JmDNS.java:2427)
  at net.java.sip.communicator.impl.protocol.zeroconf.jmdns.JmDNS.requestServiceInfo(JmDNS.java:472)
  at net.java.sip.communicator.impl.protocol.zeroconf.jmdns.JmDNS.requestServiceInfo(JmDNS.java:455)
  at net.java.sip.communicator.impl.protocol.zeroconf.BonjourService$AddThread.run(BonjourService.java:341)
17:32:16.616 GRAVE: impl.protocol.zeroconf.BonjourService.run().165
ZEROCONF: Connexion from unknown contact [/130.79.90.87]. REJECTING!
17:34:35.302 PLUS FIN:
impl.configuration.ConfigurationServiceImpl.setProperty().137
net.java.sip.communicator.impl.gui.accounts.acc1182267109318.lastAccountStatus(
oldValue=avail, newValue=avail.
17:34:38.891 FIN:
impl.protocol.zeroconf.BonjourService.changeStatus().288 ZEROCONF :
Changing status
17:34:38.895 PLUS FIN:
impl.configuration.ConfigurationServiceImpl.setProperty().137
net.java.sip.communicator.impl.gui.accounts.acc1182267109318.lastAccountStatus(
oldValue=avail, newValue=dnd.
17:34:42.212 FIN:
impl.protocol.zeroconf.BonjourService.changeStatus().288 ZEROCONF :
Changing status
17:34:42.215 PLUS FIN:
impl.configuration.ConfigurationServiceImpl.setProperty().137
net.java.sip.communicator.impl.gui.accounts.acc1182267109318.lastAccountStatus(
oldValue=dnd, newValue=avail.
17:34:46.534 FIN: impl.protocol.zeroconf.BonjourService.shutdown().193
ZEROCONF: Shutdown!
17:34:46.535 FIN:
impl.protocol.zeroconf.BonjourService.changeStatus().241 ZEROCONF:
Going OFFLINE
17:34:46.556 GRAVE: impl.protocol.zeroconf.BonjourService.run().180
java.net.SocketException: Socket closed
17:34:46.556 FIN: impl.protocol.zeroconf.BonjourService.run().184
ZEROCONF: Going Offline - BonjourService Thread exiting!

···

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#2

Hi Guillaume,

Thanks for the congrats... even if I don't deserve them if some ugly bugs are still playing in my code :wink: .

More seriously :
. indeed, Bonjour would be a more appropriate name since the chat protocol comes from Bonjour which is an implementation of the Zeroconf draft. In fact, I first coded a prototype plugin was called Bonjour, that's why I had to choose another name when I started coding the final version. That's why I switched to Zeroconf, but I would also prefer switching back to Bonjour if it's ok.

. about the bug, thanks for the report. I'll check what this is about. At first sight, the problem is clearly that the "port.p2pj" TXT record wasn't declared on emcho's side. It's normal that the client on your side rejects the connexion attempt because the contact "emcho" couldn't be created and therefore is an unknown contact (this was an implementation choice to avoid the flooding/DoS problems that iChat faced in the past). I'll try to find out why the port.p2pj field wasn't declared. I guess the only reason would be a race between run() and changeStatus().

Cheers,
Chris.

···

----- Original Message -----

From: "Guillaume Schreiner" <guillaume.schreiner@gmail.com>

To: <dev@sip-communicator.dev.java.net>
Sent: Tuesday, June 19, 2007 5:50 PM
Subject: [sip-comm-dev] ZeroConf issues

Chris,

First bravo for your excellent work. We just notice some issues with
the ZeroConf plugin. The presence works but sending messages fails. I
have attached the logs. By the way, I think the exact name of the
protocol should rather be called Bonjour instead of ZeroConf. ZeroConf
is the name of an IETF working group, which discuss on ZeroConf
protocols like UPnP or mDNS/DNS-SD (aka Bonjour!).

Guillaume

UPDATING CACHE !!
17:31:54.920 PLUS FIN:
impl.configuration.ConfigurationServiceImpl.setProperty().137
net.java.sip.communicator.impl.gui.accounts.acc1182267109318.lastAccountStatus(
oldValue=null, newValue=avail.
17:31:54.925 FIN:
impl.protocol.zeroconf.BonjourService.serviceAdded().366 BONJOUR:
emcho@pastropnet[_presence._tcp.local.] detected! Trying to get
information...
17:31:54.929 INFO: class
net.java.sip.communicator.impl.protocol.zeroconf.jmdns.JmDNS.printServices()
---- Services -----
Service: guillaume@lsiit._presence._tcp.local.:
service[guillaume@lsiit._presence._tcp.local.,exponet.u-strasbg.fr/130.79.90.187:5298,\016port.p2pj=5298\016nick...]
---- Types ----
Type: _presence._tcp.local.: _presence._tcp.local.
---- cache ----
record[ptr,in,_presence._tcp.local.,3600/3599]
record[a,in,exponet.local.,3600/3599]
record[srv,in,guillaume@lsiit._presence._tcp.local.,3600/3599]
record[txt,in-unique,guillaume@lsiit._presence._tcp.local.,3600/3599]
record[txt,in-unique,emcho@pastropnet._presence._tcp.local.,3600/3599]
record[srv,in-unique,emcho@pastropnet._presence._tcp.local.,3600/3599]
---- Service Collectors ----
UPDATING CACHE !!
17:31:55.159 FIN:
impl.protocol.zeroconf.BonjourService.serviceResolved().418 BONJOUR:
Information about emcho@pastropnet discovered
17:31:55.160 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().447
ZEROCNF: ContactID emcho@pastropnet Address /130.79.90.87
17:31:55.161 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().450
      Address=>/130.79.90.87:5298
17:31:55.161 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      nick=>Emil
17:31:55.162 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      txtvers=>1
17:31:55.162 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      ext=>
17:31:55.163 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      jid=>emcho@pastropnet
17:31:55.163 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      msg=>
17:31:55.163 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      node=>SIP Communicator
17:31:55.164 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      client=>SIP Communicator
17:31:55.164 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      status=>avail
17:31:55.165 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      ver=>1
17:31:55.165 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      1st=>Emil
17:31:55.166 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      email=>emcho@emcho.com
17:31:55.166 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      vc=>C!
17:31:55.166 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      phsh=>000
17:31:55.167 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      last=>Ivov
Exception in thread "JmDNS.SocketListener" java.lang.NumberFormatException: null
at java.lang.Integer.parseInt(Integer.java:415)
at java.lang.Integer.valueOf(Integer.java:553)
at net.java.sip.communicator.impl.protocol.zeroconf.BonjourService.handleResolvedService(BonjourService.java:466)
at net.java.sip.communicator.impl.protocol.zeroconf.BonjourService.serviceResolved(BonjourService.java:421)
at net.java.sip.communicator.impl.protocol.zeroconf.jmdns.JmDNS.handleServiceResolved(JmDNS.java:504)
at net.java.sip.communicator.impl.protocol.zeroconf.jmdns.ServiceInfo.updateRecord(ServiceInfo.java:605)
at net.java.sip.communicator.impl.protocol.zeroconf.jmdns.JmDNS.updateRecord(JmDNS.java:953)
at net.java.sip.communicator.impl.protocol.zeroconf.jmdns.JmDNS.handleResponse(JmDNS.java:1121)
at net.java.sip.communicator.impl.protocol.zeroconf.jmdns.JmDNS.access$900(JmDNS.java:21)
at net.java.sip.communicator.impl.protocol.zeroconf.jmdns.JmDNS$SocketListener.run(JmDNS.java:1287)
at java.lang.Thread.run(Thread.java:613)
17:32:04.041 GRAVE: impl.protocol.zeroconf.BonjourService.run().165
ZEROCONF: Connexion from unknown contact [/130.79.90.87]. REJECTING!
17:32:04.934 FIN:
impl.protocol.zeroconf.BonjourService.serviceResolved().418 BONJOUR:
Information about emcho@pastropnet discovered
17:32:04.935 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().447
ZEROCNF: ContactID emcho@pastropnet Address /130.79.90.87
17:32:04.935 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().450
      Address=>/130.79.90.87:5298
17:32:04.936 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      nick=>Emil
17:32:04.936 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      txtvers=>1
17:32:04.937 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      ext=>
17:32:04.937 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      jid=>emcho@pastropnet
17:32:04.938 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      msg=>
17:32:04.938 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      node=>SIP Communicator
17:32:04.939 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      client=>SIP Communicator
17:32:04.939 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      status=>avail
17:32:04.939 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      ver=>1
17:32:04.941 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      1st=>Emil
17:32:04.941 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      email=>emcho@emcho.com
17:32:04.942 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      vc=>C!
17:32:04.942 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      phsh=>000
17:32:04.943 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      last=>Ivov
17:32:07.420 GRAVE: impl.protocol.zeroconf.BonjourService.run().165
ZEROCONF: Connexion from unknown contact [/130.79.90.87]. REJECTING!
Exception in thread "Thread-11" java.lang.NumberFormatException: null
at java.lang.Integer.parseInt(Integer.java:415)
at java.lang.Integer.valueOf(Integer.java:553)
at net.java.sip.communicator.impl.protocol.zeroconf.BonjourService.handleResolvedService(BonjourService.java:466)
at net.java.sip.communicator.impl.protocol.zeroconf.BonjourService.serviceResolved(BonjourService.java:421)
at net.java.sip.communicator.impl.protocol.zeroconf.jmdns.JmDNS.handleServiceResolved(JmDNS.java:504)
at net.java.sip.communicator.impl.protocol.zeroconf.jmdns.ServiceInfo.updateRecord(ServiceInfo.java:605)
at net.java.sip.communicator.impl.protocol.zeroconf.jmdns.JmDNS.addListener(JmDNS.java:915)
at net.java.sip.communicator.impl.protocol.zeroconf.jmdns.JmDNS$ServiceInfoResolver.<init>(JmDNS.java:2427)
at net.java.sip.communicator.impl.protocol.zeroconf.jmdns.JmDNS.requestServiceInfo(JmDNS.java:472)
at net.java.sip.communicator.impl.protocol.zeroconf.jmdns.JmDNS.requestServiceInfo(JmDNS.java:455)
at net.java.sip.communicator.impl.protocol.zeroconf.BonjourService$AddThread.run(BonjourService.java:341)
17:32:16.616 GRAVE: impl.protocol.zeroconf.BonjourService.run().165
ZEROCONF: Connexion from unknown contact [/130.79.90.87]. REJECTING!
17:34:35.302 PLUS FIN:
impl.configuration.ConfigurationServiceImpl.setProperty().137
net.java.sip.communicator.impl.gui.accounts.acc1182267109318.lastAccountStatus(
oldValue=avail, newValue=avail.
17:34:38.891 FIN:
impl.protocol.zeroconf.BonjourService.changeStatus().288 ZEROCONF :
Changing status
17:34:38.895 PLUS FIN:
impl.configuration.ConfigurationServiceImpl.setProperty().137
net.java.sip.communicator.impl.gui.accounts.acc1182267109318.lastAccountStatus(
oldValue=avail, newValue=dnd.
17:34:42.212 FIN:
impl.protocol.zeroconf.BonjourService.changeStatus().288 ZEROCONF :
Changing status
17:34:42.215 PLUS FIN:
impl.configuration.ConfigurationServiceImpl.setProperty().137
net.java.sip.communicator.impl.gui.accounts.acc1182267109318.lastAccountStatus(
oldValue=dnd, newValue=avail.
17:34:46.534 FIN: impl.protocol.zeroconf.BonjourService.shutdown().193
ZEROCONF: Shutdown!
17:34:46.535 FIN:
impl.protocol.zeroconf.BonjourService.changeStatus().241 ZEROCONF:
Going OFFLINE
17:34:46.556 GRAVE: impl.protocol.zeroconf.BonjourService.run().180
java.net.SocketException: Socket closed
17:34:46.556 FIN: impl.protocol.zeroconf.BonjourService.run().184
ZEROCONF: Going Offline - BonjourService Thread exiting!

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#3

Oops, sorry for the mess, I answered in the wrong thread. It seems that my brain was a bit exceeded :-P. I'd better sleep a bit before doing something stupid again. Here's my answer :

Mea maxima culpa : I took a quick look and I think I've got it
(BonjourService:109) :

···

-------------------
changeStatus(opSetPersPresence.getPresenceStatus());

sock = createSocket(port);
if (sock == null) return;
-------------------

This is completely stupid. I've must have added that while debugging. The
socket creation method chooses a free port number on which the main socket
(the one from BonjourService, dispatching incoming connections to
ClientThreads' spawned sockets) should listen. The changeStatus() method
registers the service with JmDNS. So here we've got a problem : in this
order, the port number isn't always assigned before the registration, so
changeStatus() registers the service without the port.p2pj field, causing
the problem seen on emcho's side.

In fact, the changeStatus call in the BonjourService constructor is not
relevant anymore. AFAIK, ChangeStatus is called automatically by SC after
the protocol provider starts.

Erasing the changeStatus call should make the problem disappear, but I'll
add some checks in changeStatus to be sure that no other race happens.

I can't test this right now, but I'll have the opportunity to do it tomorrow.
I'll see if this was the only problem.

Chris.

----- Original Message -----

From: "Chris" <sipcom@cyberspace7.net>

To: <dev@sip-communicator.dev.java.net>
Sent: Tuesday, June 19, 2007 10:10 PM
Subject: Re: [sip-comm-dev] ZeroConf issues

Hi Guillaume,

Thanks for the congrats... even if I don't deserve them if some ugly bugs are still playing in my code :wink: .

More seriously :
. indeed, Bonjour would be a more appropriate name since the chat protocol comes from Bonjour which is an implementation of the Zeroconf draft. In fact, I first coded a prototype plugin was called Bonjour, that's why I had to choose another name when I started coding the final version. That's why I switched to Zeroconf, but I would also prefer switching back to Bonjour if it's ok.

. about the bug, thanks for the report. I'll check what this is about. At first sight, the problem is clearly that the "port.p2pj" TXT record wasn't declared on emcho's side. It's normal that the client on your side rejects the connexion attempt because the contact "emcho" couldn't be created and therefore is an unknown contact (this was an implementation choice to avoid the flooding/DoS problems that iChat faced in the past). I'll try to find out why the port.p2pj field wasn't declared. I guess the only reason would be a race between run() and changeStatus().

Cheers,
Chris.

----- Original Message ----- From: "Guillaume Schreiner" <guillaume.schreiner@gmail.com>
To: <dev@sip-communicator.dev.java.net>
Sent: Tuesday, June 19, 2007 5:50 PM
Subject: [sip-comm-dev] ZeroConf issues

Chris,

First bravo for your excellent work. We just notice some issues with
the ZeroConf plugin. The presence works but sending messages fails. I
have attached the logs. By the way, I think the exact name of the
protocol should rather be called Bonjour instead of ZeroConf. ZeroConf
is the name of an IETF working group, which discuss on ZeroConf
protocols like UPnP or mDNS/DNS-SD (aka Bonjour!).

Guillaume

UPDATING CACHE !!
17:31:54.920 PLUS FIN:
impl.configuration.ConfigurationServiceImpl.setProperty().137
net.java.sip.communicator.impl.gui.accounts.acc1182267109318.lastAccountStatus(
oldValue=null, newValue=avail.
17:31:54.925 FIN:
impl.protocol.zeroconf.BonjourService.serviceAdded().366 BONJOUR:
emcho@pastropnet[_presence._tcp.local.] detected! Trying to get
information...
17:31:54.929 INFO: class
net.java.sip.communicator.impl.protocol.zeroconf.jmdns.JmDNS.printServices()
---- Services -----
Service: guillaume@lsiit._presence._tcp.local.:
service[guillaume@lsiit._presence._tcp.local.,exponet.u-strasbg.fr/130.79.90.187:5298,\016port.p2pj=5298\016nick...]
---- Types ----
Type: _presence._tcp.local.: _presence._tcp.local.
---- cache ----
record[ptr,in,_presence._tcp.local.,3600/3599]
record[a,in,exponet.local.,3600/3599]
record[srv,in,guillaume@lsiit._presence._tcp.local.,3600/3599]
record[txt,in-unique,guillaume@lsiit._presence._tcp.local.,3600/3599]
record[txt,in-unique,emcho@pastropnet._presence._tcp.local.,3600/3599]
record[srv,in-unique,emcho@pastropnet._presence._tcp.local.,3600/3599]
---- Service Collectors ----
UPDATING CACHE !!
17:31:55.159 FIN:
impl.protocol.zeroconf.BonjourService.serviceResolved().418 BONJOUR:
Information about emcho@pastropnet discovered
17:31:55.160 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().447
ZEROCNF: ContactID emcho@pastropnet Address /130.79.90.87
17:31:55.161 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().450
      Address=>/130.79.90.87:5298
17:31:55.161 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      nick=>Emil
17:31:55.162 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      txtvers=>1
17:31:55.162 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      ext=>
17:31:55.163 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      jid=>emcho@pastropnet
17:31:55.163 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      msg=>
17:31:55.163 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      node=>SIP Communicator
17:31:55.164 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      client=>SIP Communicator
17:31:55.164 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      status=>avail
17:31:55.165 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      ver=>1
17:31:55.165 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      1st=>Emil
17:31:55.166 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      email=>emcho@emcho.com
17:31:55.166 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      vc=>C!
17:31:55.166 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      phsh=>000
17:31:55.167 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      last=>Ivov
Exception in thread "JmDNS.SocketListener" java.lang.NumberFormatException: null
at java.lang.Integer.parseInt(Integer.java:415)
at java.lang.Integer.valueOf(Integer.java:553)
at net.java.sip.communicator.impl.protocol.zeroconf.BonjourService.handleResolvedService(BonjourService.java:466)
at net.java.sip.communicator.impl.protocol.zeroconf.BonjourService.serviceResolved(BonjourService.java:421)
at net.java.sip.communicator.impl.protocol.zeroconf.jmdns.JmDNS.handleServiceResolved(JmDNS.java:504)
at net.java.sip.communicator.impl.protocol.zeroconf.jmdns.ServiceInfo.updateRecord(ServiceInfo.java:605)
at net.java.sip.communicator.impl.protocol.zeroconf.jmdns.JmDNS.updateRecord(JmDNS.java:953)
at net.java.sip.communicator.impl.protocol.zeroconf.jmdns.JmDNS.handleResponse(JmDNS.java:1121)
at net.java.sip.communicator.impl.protocol.zeroconf.jmdns.JmDNS.access$900(JmDNS.java:21)
at net.java.sip.communicator.impl.protocol.zeroconf.jmdns.JmDNS$SocketListener.run(JmDNS.java:1287)
at java.lang.Thread.run(Thread.java:613)
17:32:04.041 GRAVE: impl.protocol.zeroconf.BonjourService.run().165
ZEROCONF: Connexion from unknown contact [/130.79.90.87]. REJECTING!
17:32:04.934 FIN:
impl.protocol.zeroconf.BonjourService.serviceResolved().418 BONJOUR:
Information about emcho@pastropnet discovered
17:32:04.935 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().447
ZEROCNF: ContactID emcho@pastropnet Address /130.79.90.87
17:32:04.935 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().450
      Address=>/130.79.90.87:5298
17:32:04.936 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      nick=>Emil
17:32:04.936 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      txtvers=>1
17:32:04.937 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      ext=>
17:32:04.937 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      jid=>emcho@pastropnet
17:32:04.938 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      msg=>
17:32:04.938 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      node=>SIP Communicator
17:32:04.939 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      client=>SIP Communicator
17:32:04.939 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      status=>avail
17:32:04.939 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      ver=>1
17:32:04.941 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      1st=>Emil
17:32:04.941 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      email=>emcho@emcho.com
17:32:04.942 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      vc=>C!
17:32:04.942 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      phsh=>000
17:32:04.943 FIN:
impl.protocol.zeroconf.BonjourService.handleResolvedService().457
      last=>Ivov
17:32:07.420 GRAVE: impl.protocol.zeroconf.BonjourService.run().165
ZEROCONF: Connexion from unknown contact [/130.79.90.87]. REJECTING!
Exception in thread "Thread-11" java.lang.NumberFormatException: null
at java.lang.Integer.parseInt(Integer.java:415)
at java.lang.Integer.valueOf(Integer.java:553)
at net.java.sip.communicator.impl.protocol.zeroconf.BonjourService.handleResolvedService(BonjourService.java:466)
at net.java.sip.communicator.impl.protocol.zeroconf.BonjourService.serviceResolved(BonjourService.java:421)
at net.java.sip.communicator.impl.protocol.zeroconf.jmdns.JmDNS.handleServiceResolved(JmDNS.java:504)
at net.java.sip.communicator.impl.protocol.zeroconf.jmdns.ServiceInfo.updateRecord(ServiceInfo.java:605)
at net.java.sip.communicator.impl.protocol.zeroconf.jmdns.JmDNS.addListener(JmDNS.java:915)
at net.java.sip.communicator.impl.protocol.zeroconf.jmdns.JmDNS$ServiceInfoResolver.<init>(JmDNS.java:2427)
at net.java.sip.communicator.impl.protocol.zeroconf.jmdns.JmDNS.requestServiceInfo(JmDNS.java:472)
at net.java.sip.communicator.impl.protocol.zeroconf.jmdns.JmDNS.requestServiceInfo(JmDNS.java:455)
at net.java.sip.communicator.impl.protocol.zeroconf.BonjourService$AddThread.run(BonjourService.java:341)
17:32:16.616 GRAVE: impl.protocol.zeroconf.BonjourService.run().165
ZEROCONF: Connexion from unknown contact [/130.79.90.87]. REJECTING!
17:34:35.302 PLUS FIN:
impl.configuration.ConfigurationServiceImpl.setProperty().137
net.java.sip.communicator.impl.gui.accounts.acc1182267109318.lastAccountStatus(
oldValue=avail, newValue=avail.
17:34:38.891 FIN:
impl.protocol.zeroconf.BonjourService.changeStatus().288 ZEROCONF :
Changing status
17:34:38.895 PLUS FIN:
impl.configuration.ConfigurationServiceImpl.setProperty().137
net.java.sip.communicator.impl.gui.accounts.acc1182267109318.lastAccountStatus(
oldValue=avail, newValue=dnd.
17:34:42.212 FIN:
impl.protocol.zeroconf.BonjourService.changeStatus().288 ZEROCONF :
Changing status
17:34:42.215 PLUS FIN:
impl.configuration.ConfigurationServiceImpl.setProperty().137
net.java.sip.communicator.impl.gui.accounts.acc1182267109318.lastAccountStatus(
oldValue=dnd, newValue=avail.
17:34:46.534 FIN: impl.protocol.zeroconf.BonjourService.shutdown().193
ZEROCONF: Shutdown!
17:34:46.535 FIN:
impl.protocol.zeroconf.BonjourService.changeStatus().241 ZEROCONF:
Going OFFLINE
17:34:46.556 GRAVE: impl.protocol.zeroconf.BonjourService.run().180
java.net.SocketException: Socket closed
17:34:46.556 FIN: impl.protocol.zeroconf.BonjourService.run().184
ZEROCONF: Going Offline - BonjourService Thread exiting!

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net