I am trying to get the pubsub communication up and running by using the server_cpp_demo binary from the PubSub 1.7.0 (449) evaluation bundle. My approach is to start two
of these binaries both on different server ports (48010 and 48011). Then use the pubsubimporter tool to load the same configuration to both services (the profile is udp-uadp with port 4840). This seems to work
since there are now various DataSets available in the PublishSubscribe section of the server object. I use DataSimple.
My expectation is that from this point the pubsub should be active and there should be communication between the two services. When I change the variable PSTV.P1.DS1.BoolToggle (Under Objects/PubSubTargetVariables) the change is not reflected to the other service. When I use wireshark to see if there is any communcation on the specified PubSub port (4840) I see no communication what so ever. I have tried multicast (239.0.0.1) as well as unicast (127.0.0.1).
In the server logs I do see the following:
I do not understand why it tries to bind to port 20??? I'm clearly missing something. Could you shed some light on these issues?11:28:01.241Z|3|657B1780* [pubsubstack] Using 0 KB for memory pools (shared).
11:28:01.241Z|3|657B1780* [pubsubstack] Using 0 KB for memory pools (private).
11:28:01.241Z|3|657B1780* [pubsubstack] pool configuration:
11:28:01.241Z|3|657B1780* [pubsubstack] heap...................................................16777304 bytes (shared)
11:28:01.241Z|3|657B1780* [pubsubstack] ipc memory area: 0x0x7f8256fff010 - 0x0x7f8257fff2b0
11:28:01.241Z|3|657B1780* [pubsubstack] pool addresses:
11:28:01.241Z|3|657B1780* [pubsubstack] heap............................0x7f8256fff258 - 0x7f8257fff257 (shared)
11:28:01.295Z|7|657B1780* [pubsubstack] ua_socket_init: Socket created
11:28:01.295Z|7|657B1780* [pubsubstack] ua_socket_initset: initializing socket 4 in slot 0 (sock: 0x2bddf30)
11:28:01.295Z|1|657B1780* [pubsubstack] ua_socket_bind: ERROR -1 (errno: 13) binding to port 20
11:28:01.295Z|7|657B1780* [pubsubstack] ua_socket_close: closing socket 4
11:28:01.295Z|7|657B1780* [pubsubstack] ua_socket_close: socket at slot 0 freed
11:28:01.305Z|7|657B1780* [pubsubstack] ua_socket_init: Socket created
11:28:01.305Z|7|657B1780* [pubsubstack] ua_socket_initset: initializing socket 4 in slot 0 (sock: 0x2bddf98)
11:28:01.316Z|1|648A1700* [pubsubstack] invalid shutdown flag: pubsub_do_com_eval called but flag is 2 [SHUTDOWN_COMPLETED] (forgot to call startup?)
When running the services as root, the port 20 message disappears from the log because it can now use this privileged port. The end result is still same.
Kind regards, Tijmen