Jump to content
OpenSplice DDS Forum
johnD

PingPong example times out - OpenSplice 6.7, Ubuntu 16.04

Recommended Posts

johnD   

When I follow the directions to run the PingPong example in dscs/PingPong/c/standalone/, the ping program times out every few seconds without communicating to pong. I'm hoping someone can tell me what I'm doing wrong.

 

Tools:

Ubuntu 16.04 (32-bit) on VirtualBox VM

gcc 5.4.0

GNU make 4.1

perl 5.22.1

gSOAP 2.8.28-1

Doxygen 1.8.11-1

graphviz 2.38.0-12ubuntu2.1

 

I installed OpenSplice from VortexOpenSplice-6.7.170523OSS-HDE-x86.linux-gcc5.4.0-glibc2.23-installer.tar, based on instructions at http://www.prismtech.com/dds-community/software-downloads/installing.

 

Comments on those instructions, in case it relates to the problem with the PingPong example:

  • The Installing page gives an example of using "$ gtar -xzf VortexOpen...". My Ubuntu 16.04 didn't find gtar, so I used "tar -xf VortexOpen...".
  • There were no instances of @@INSTALLDIR@@ in the file ./HDE/<target_platform>/release.com, but it correctly sets $OSPL_HOME to ~/DDS/6.7.pre/HDE/x86.linux.

TAO and JacORB aren't used.

I don't intend to use Java with OpenSplice, though Java is installed. That is, /usr/bin/javac is in the PATH.

 

While working with the source distribution earlier, I followed the suggestion in http://forums.opensp...n-unbuntu-1504/, and did

sudo ln -s /usr/lib/gcc/x86_64-linux-gnu/4.9.2/liblto_plugin.so /usr/lib/bfd-plugins/

which presumably wouldn't cause any trouble, but I'll mention it just in case. (I didn't get the PingPong example working in the source build, either.)

 

$OSPL_HOME/examples/dcps/README.html says to build the examples on a POSIX system with

  • makefile -f Makefile will build all C and C++ standalone examples as well as ISO C++ examples

My Ubuntu didn't find makefile, so I used "make -f Makefile" and everything seemed to build, though there were various warnings.

 

To run the PingPong example, I used HDE/x86.linux/examples/dcps/PingPong/README.html and followed the steps for the default single process configuration. $OSPL_URI=file://$OSPL_HOME/etc/config/ospl.xml.

In each of two terminal windows, source release.com and cd to $OSPL_HOME/examples/dcps/PingPong/c/standalone/.

  1. In terminal 1, start pong by running, for C/C++:
    • $ ./pong PongRead PongWrite
  2. In terminal 2, start ping by running, for C/C++:
  • $ ./ping 100 100 f PongRead PongWrite

Terminal 1 shows:
~/DDS/6.7.pre/HDE/x86.linux/examples/dcps/PingPong/c/standalone$ ./pong PongRead PongWrite
Starting pong example

Terminal 2 shows:
~/DDS/6.7.pre/HDE/x86.linux/examples/dcps/PingPong/c/standalone$ ./ping 100 100 f PongRead PongWrite
Starting ping example
PING: TIMEOUT 2 - message lost
PING: TIMEOUT 2 - message lost
[17 identical lines deleted]
PING: TIMEOUT 2 - message lost
PING: Max nr of 20 timeouts reached, terminating, test Failed
Completed ping example
~/DDS/6.7.pre/HDE/x86.linux/examples/dcps/PingPong/c/standalone$

There is no ospl-error.log, and ospl-info.log shows no errors. (ospl-info.log is attached, changed to ospl-info_log.txt.)

 

The forum shows that others are running OpenSource examples on Ubuntu 16.04, so it should work. Many thanks for any help on this.

 

ospl-info_log.txt

Share this post


Link to post
Share on other sites
johnD   

In the interest of reducing the problem to the simplest case, I left out important info. It isn't only the c/standalone PingPong example that doesn't work for me.

  • The cpp/standalone PingPong example fails like the c example.
  • With the HelloWorld/isocpp2 example, the publisher wrote "Hello World", but the subscriber reported "ERROR: Waited for 60 seconds but no sample received".
  • With the RoundTrip/cpp example, pong reported that it's waiting for samples from ping, and ping reported that it warmed up, and then printed headings for "Round trip measurements" but no data.
  • Running mmstat while the RoundTrip example was running, mmstat established connection to the OpenSplice system using URI ospl.xml, then printed headings and, every 3 seconds, all zeros.

Share this post


Link to post
Share on other sites
johnD   

Thanks, James. That did it! Whew!

 

I copied ospl.xml to ospl_no_multicast.xml, and edited it to set multicast to false and add an <address> section for 127.0.0.1, right after the Compatibility section. I used the Deployment Guide section "12.7.4.8 Peers" and the ospl-error.log file to work out the right syntax. The changes:

 

$ diff ospl.xml ospl_no_multicast.xml
0a1,2
> <!-- This is based on ospl.xml, the default config file, which is identical
>      to ospl_sp_ddsi.xml -->
3c5
<         <Name>ospl_sp_ddsi</Name>
---
>         <Name>ospl_sp_no_multicast</Name>
6c8,9
<         <Description>Stand-alone 'single-process' deployment and standard DDSI networking.</Description>
---
>         <Description>Stand-alone 'single-process' deployment and DDSI networking
>           without multicasting, on localhost only.</Description>
20c23
<             <AllowMulticast>true</AllowMulticast>
---
>             <AllowMulticast>false</AllowMulticast>
29a33,37
>         <Discovery>
>           <Peers>
>             <Peer Address="127.0.0.1"/>
>           </Peers>
>         </Discovery>

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×