AutobahnPython - unexpected unsubscribe from server (simplePubSub)

#1

I have recently started using the Autobahn code. It appears to work
well and I am creating a proof of concept for our product. Running
PubSub server demo code and PubSub Android demo code, the server keeps
unsubscribing the client and closing the connection. The Android
device is connecting over wireless. The Wireshark trace shows only 4
packets with the last being a RST/ACK from the server. It works fine
with the local Python client demo code.

2012-05-31 14:45:19-0400 [autobahn.wamp.WampServerFactory] connection
accepted f
rom peer 192.168.30.96:42325
2012-05-31 14:45:19-0400 [MyServerProtocol,2,192.168.30.96]
unsubscribed peer 19
2.168.30.96:42325 from all topics
2012-05-31 14:45:19-0400 [MyServerProtocol,2,192.168.30.96] connection
from 192.
168.30.96:42325 lost

Any help would be appreciated.

0 Likes

#2

There was a recent, minor change to WAMP which wasnt yet reflected in AutobahnAndroid (WELCOME message).

Could you try the latest source from AutobahnAndroid?

This works for me, if it does not for you, please include

* logcat output
* server debug output:

oberstet@THINKPAD-T410S /f/scm/AutobahnPython/examples/pubsub/simple (master)
$ python server.py debug

···

Am 31.05.2012 21:36, schrieb p.bourget:

I have recently started using the Autobahn code. It appears to work
well and I am creating a proof of concept for our product. Running
PubSub server demo code and PubSub Android demo code, the server keeps
unsubscribing the client and closing the connection. The Android
device is connecting over wireless. The Wireshark trace shows only 4
packets with the last being a RST/ACK from the server. It works fine
with the local Python client demo code.

2012-05-31 14:45:19-0400 [autobahn.wamp.WampServerFactory] connection
accepted f
rom peer 192.168.30.96:42325
2012-05-31 14:45:19-0400 [MyServerProtocol,2,192.168.30.96]
unsubscribed peer 19
2.168.30.96:42325 from all topics
2012-05-31 14:45:19-0400 [MyServerProtocol,2,192.168.30.96] connection
from 192.
168.30.96:42325 lost

Any help would be appreciated.

0 Likes

#3

I tried the new code and appear to get the same results. In this log, you will see that I tried it twice. I got a verify error the first time. I terminated the application, reloaded and re-ran it. No verify error, but the same results on the server.

C:\Python27>python pub_sub_server.py debug
2012-06-05 15:52:47-0400 [-] Log opened.
2012-06-05 15:52:47-0400 [-] WampServerFactory starting on 9000
2012-06-05 15:52:47-0400 [-] Starting factory <autobahn.wamp.WampServerFactory i
nstance at 0x00CD6F30>
2012-06-05 15:52:47-0400 [-] WampServerFactory starting
2012-06-05 15:52:47-0400 [-] Site starting on 8080
2012-06-05 15:52:47-0400 [-] Starting factory <twisted.web.server.Site instance
at 0x0155E788>
2012-06-05 15:54:04-0400 [autobahn.wamp.WampServerFactory] connection accepted f
rom peer 192.168.30.96:58151
2012-06-05 15:54:09-0400 [-] unsubscribed peer 192.168.30.96:58151 from all topi
cs
2012-06-05 15:54:09-0400 [-] connection from 192.168.30.96:58151 lost
2012-06-05 15:56:38-0400 [autobahn.wamp.WampServerFactory] connection accepted f
rom peer 192.168.30.96:34722
2012-06-05 15:56:38-0400 [MyServerProtocol,1,192.168.30.96] unsubscribed peer 19
2.168.30.96:34722 from all topics
2012-06-05 15:56:38-0400 [MyServerProtocol,1,192.168.30.96] connection from 192.
168.30.96:34722 lost

LogCat.txt (2.59 KB)

···

On Tuesday, June 5, 2012 6:57:56 AM UTC-4, Tobias Oberstein wrote:

Am 31.05.2012 21:36, schrieb p.bourget:

I have recently started using the Autobahn code. It appears to work

well and I am creating a proof of concept for our product. Running

PubSub server demo code and PubSub Android demo code, the server keeps

unsubscribing the client and closing the connection. The Android

device is connecting over wireless. The Wireshark trace shows only 4

packets with the last being a RST/ACK from the server. It works fine

with the local Python client demo code.

2012-05-31 14:45:19-0400 [autobahn.wamp.WampServerFactory] connection

accepted f

rom peer 192.168.30.96:42325

2012-05-31 14:45:19-0400 [MyServerProtocol,2,192.168.30.96]

unsubscribed peer 19

2.168.30.96:42325 from all topics

2012-05-31 14:45:19-0400 [MyServerProtocol,2,192.168.30.96] connection

from 192.

168.30.96:42325 lost

Any help would be appreciated.

There was a recent, minor change to WAMP which wasnt yet reflected in
AutobahnAndroid (WELCOME message).

Could you try the latest source from AutobahnAndroid?

This works for me, if it does not for you, please include

  • logcat output

  • server debug output:

oberstet@THINKPAD-T410S /f/scm/AutobahnPython/examples/pubsub/simple
(master)

$ python server.py debug

0 Likes

#4

06-05 15:54:07.110: E/dalvikvm(4510): Could not find class 'org.codehaus.jackson.map.ObjectMapper', referenced from method de.tavendo.autobahn.AutobahnReader.<init>

I had the same issue after updating the Android SDK. For whatever reasons, that update broke project build dependencies.

Try:
Goto project properties for your app, Java Build Path, Libraries.

Remove everything.
Add JARs, select the 2 Jackson JARs from Autobahn/libs.
Add Library, select Android Classpath Container.

Then clean and rebuild.

Honestly, I dont know what the SDK update did .. I fixed my build
with above procedure for all projects in the workspace.

Anyway: the above error from logcat needs to go away since the Jackson classes are needed for WAMP ..

···

Am 05.06.2012 22:04, schrieb p.bourget:

I tried the new code and appear to get the same results. In this log,
you will see that I tried it twice. I got a verify error the first time.
I terminated the application, reloaded and re-ran it. No verify error,
but the same results on the server.

C:\Python27>python pub_sub_server.py debug
2012-06-05 15:52:47-0400 [-] Log opened.
2012-06-05 15:52:47-0400 [-] WampServerFactory starting on 9000
2012-06-05 15:52:47-0400 [-] Starting factory
<autobahn.wamp.WampServerFactory i
nstance at 0x00CD6F30>
2012-06-05 15:52:47-0400 [-] WampServerFactory starting
2012-06-05 15:52:47-0400 [-] Site starting on 8080
2012-06-05 15:52:47-0400 [-] Starting factory <twisted.web.server.Site
instance
at 0x0155E788>
2012-06-05 15:54:04-0400 [autobahn.wamp.WampServerFactory] connection
accepted f
rom peer 192.168.30.96:58151
2012-06-05 15:54:09-0400 [-] unsubscribed peer 192.168.30.96:58151 from
all topi
cs
2012-06-05 15:54:09-0400 [-] connection from 192.168.30.96:58151 lost
2012-06-05 15:56:38-0400 [autobahn.wamp.WampServerFactory] connection
accepted f
rom peer 192.168.30.96:34722
2012-06-05 15:56:38-0400 [MyServerProtocol,1,192.168.30.96] unsubscribed
peer 19
2.168.30.96:34722 from all topics
2012-06-05 15:56:38-0400 [MyServerProtocol,1,192.168.30.96] connection
from 192.
168.30.96:34722 lost

On Tuesday, June 5, 2012 6:57:56 AM UTC-4, Tobias Oberstein wrote:

    Am 31.05.2012 21:36, schrieb p.bourget:
     > I have recently started using the Autobahn code. It appears to work
     > well and I am creating a proof of concept for our product. Running
     > PubSub server demo code and PubSub Android demo code, the server
    keeps
     > unsubscribing the client and closing the connection. The Android
     > device is connecting over wireless. The Wireshark trace shows only 4
     > packets with the last being a RST/ACK from the server. It works fine
     > with the local Python client demo code.
     >
     > 2012-05-31 14:45:19-0400 [autobahn.wamp.WampServerFactory]
    connection
     > accepted f
     > rom peer 192.168.30.96:42325 <http://192.168.30.96:42325>
     > 2012-05-31 14:45:19-0400 [MyServerProtocol,2,192.168.30.96]
     > unsubscribed peer 19
     > 2.168.30.96:42325 <http://2.168.30.96:42325> from all topics
     > 2012-05-31 14:45:19-0400 [MyServerProtocol,2,192.168.30.96]
    connection
     > from 192.
     > 168.30.96:42325 lost
     >
     > Any help would be appreciated.

    There was a recent, minor change to WAMP which wasnt yet reflected in
    AutobahnAndroid (WELCOME message).

    Could you try the latest source from AutobahnAndroid?

    This works for me, if it does not for you, please include

    * logcat output
    * server debug output:

    oberstet@THINKPAD-T410S /f/scm/AutobahnPython/examples/pubsub/simple
    (master)
    $ python server.py debug

0 Likes

#5

Thanks for the help. It works! Now I can evaluate WAMP/json and compare to XMPP/xml.

···

On Tuesday, June 5, 2012 4:25:11 PM UTC-4, Tobias Oberstein wrote:

06-05 15:54:07.110: E/dalvikvm(4510): Could not find class
‘org.codehaus.jackson.map.ObjectMapper’, referenced from method
de.tavendo.autobahn.AutobahnReader.

I had the same issue after updating the Android SDK. For whatever
reasons, that update broke project build dependencies.

Try:

Goto project properties for your app, Java Build Path, Libraries.

Remove everything.

Add JARs, select the 2 Jackson JARs from Autobahn/libs.

Add Library, select Android Classpath Container.

Then clean and rebuild.

Honestly, I dont know what the SDK update did … I fixed my build

with above procedure for all projects in the workspace.

Anyway: the above error from logcat needs to go away since the Jackson
classes are needed for WAMP …

Am 05.06.2012 22:04, schrieb p.bourget:

I tried the new code and appear to get the same results. In this log,

you will see that I tried it twice. I got a verify error the first time.

I terminated the application, reloaded and re-ran it. No verify error,

but the same results on the server.

C:\Python27>python pub_sub_server.py debug

2012-06-05 15:52:47-0400 [-] Log opened.

2012-06-05 15:52:47-0400 [-] WampServerFactory starting on 9000

2012-06-05 15:52:47-0400 [-] Starting factory

<autobahn.wamp.WampServerFactory i

nstance at 0x00CD6F30>

2012-06-05 15:52:47-0400 [-] WampServerFactory starting

2012-06-05 15:52:47-0400 [-] Site starting on 8080

2012-06-05 15:52:47-0400 [-] Starting factory <twisted.web.server.Site

instance

at 0x0155E788>

2012-06-05 15:54:04-0400 [autobahn.wamp.WampServerFactory] connection

accepted f

rom peer 192.168.30.96:58151

2012-06-05 15:54:09-0400 [-] unsubscribed peer 192.168.30.96:58151 from

all topi

cs

2012-06-05 15:54:09-0400 [-] connection from 192.168.30.96:58151 lost

2012-06-05 15:56:38-0400 [autobahn.wamp.WampServerFactory] connection

accepted f

rom peer 192.168.30.96:34722

2012-06-05 15:56:38-0400 [MyServerProtocol,1,192.168.30.96] unsubscribed

peer 19

2.168.30.96:34722 from all topics

2012-06-05 15:56:38-0400 [MyServerProtocol,1,192.168.30.96] connection

from 192.

168.30.96:34722 lost

On Tuesday, June 5, 2012 6:57:56 AM UTC-4, Tobias Oberstein wrote:

Am 31.05.2012 21:36, schrieb p.bourget:
 > I have recently started using the Autobahn code. It appears to work
 > well and I am creating a proof of concept for our product. Running
 > PubSub server demo code and PubSub Android demo code, the server
keeps
 > unsubscribing the client and closing the connection. The Android
 > device is connecting over wireless. The Wireshark trace shows only 4
 > packets with the last being a RST/ACK from the server. It works fine
 > with the local Python client demo code.
 >
 > 2012-05-31 14:45:19-0400 [autobahn.wamp.WampServerFactory]
connection
 > accepted f
 > rom peer [192.168.30.96:42325](http://192.168.30.96:42325) <[http://192.168.30.96:42325](http://192.168.30.96:42325)>
 > 2012-05-31 14:45:19-0400 [MyServerProtocol,2,192.168.30.96]
 > unsubscribed peer 19
 > [2.168.30.96:42325](http://2.168.30.96:42325) <[http://2.168.30.96:42325](http://2.168.30.96:42325)> from all topics
 > 2012-05-31 14:45:19-0400 [MyServerProtocol,2,192.168.30.96]
connection
 > from 192.
 > 168.30.96:42325 lost
 >
 > Any help would be appreciated.
There was a recent, minor change to WAMP which wasnt yet reflected in
AutobahnAndroid (WELCOME message).
Could you try the latest source from AutobahnAndroid?
This works for me, if it does not for you, please include
* logcat output
* server debug output:
oberstet@THINKPAD-T410S /f/scm/AutobahnPython/examples/pubsub/simple
(master)
$ python server.py debug
0 Likes