Archived

This forum has been archived. Please start a new discussion on GitHub.

Problem with python server of 'printer' example

Dear all,

after a long time of utter neglect I try to fiddle with Ice and start from scratch with the latest release 3.6.0.

General system is (K)Ubuntu 12.04.5 LTS (with Ice 3.4.2 for C++and Python still hanging around), so I cloned the source tree from GitHub and started with 'make'. After adding a few dev packages, 'make cpp python ruby' ran through, dito 'make test' for these three languages. Finally I installed the resulting software at '/opt/Ice-3.6.0/' via 'make install'.

Now I cloned 'ice-demos' from GitHub and started to play with the initial 'printer' eaxmple:

C++ server and clients in C++, Python, and Ruby works OK.
Python server and Python client works OK.

Python server and C++ client produces the error message:
Outgoing.cpp:535: Ice::UnknownLocalException:
unknown local exception:
../../include/Ice/BasicStream.h:175: Ice::UnsupportedEncodingException:
protocol error: unsupported encoding version: 1.1

Python server and Ruby client produces the error message:
-! 06/29/15 18:55:03.241 warning: dispatch exception: ../../include/Ice/BasicStream.h:175: Ice::UnsupportedEncodingException:
   protocol error: unsupported encoding version: 1.1
   (can only support encodings compatible with version 1.1)
   identity: SimplePrinter
   facet: 
   operation: ice_isA
   remote host: 127.0.0.1 remote port: 36274
-! 06/29/15 18:55:03.269 warning: dispatch exception: ../../include/Ice/BasicStream.h:175: Ice::UnsupportedEncodingException:
   protocol error: unsupported encoding version: 1.1
   (can only support encodings compatible with version 1.1)
   identity: SimplePrinter
   facet: 
   operation: ice_isA
   remote host: 127.0.0.1 remote port: 36274
Ice::UnknownLocalException
(eval):44:in `ice_checkedCast'
(eval):44:in `checkedCast'
Client.rb:16:in `<main>'
(can only support encodings compatible with version 1.1)

This post is not yet a 'bug report' because I compiled and installed the Ice 3.6.0 'on the fly' on an unsupported system with unsupported tools. Anyway, I submit this for your information.

Cheers, Andreas

Comments

  • mes
    mes California
    Hi,

    It looks like your Python server is still using Ice 3.4. The clue is the encoding exception: the client is attempting to use version 1.1 of the Ice encoding (the default behavior in Ice 3.5+), which is not understood by Ice 3.4.

    Regards,
    Mark
  • Hi, Mark,
    mes wrote: »
    It looks like your Python server is still using Ice 3.4.
    Touché. After explicitly setting PYTHONPATH to the local installation, both the C++ and Ruby clients produce 'Hello World!' in the server terminal. Case closed.

    Thanks, Andreas
  • 'make cpp python ruby' ran through, dito 'make test' for these three languages.
    This statement is not true: ’make test' in directory 'cpp' fails with this output:
    *** running tests 71/91 in /home/andreas/Work/Ice/Ice-3.6.0/ice/cpp/test/IceGrid/simple
    *** configuration: Default 
    *** test started: 06/30/15 09:17:15
    *** using Ice source dist (32bit) 
    starting icegrid registry... ok
    starting icegrid replica-1... ok
    starting icegrid replica-2... ok
    starting server... ok
    starting client... ok
    testing stringToProxy... ok
    testing IceGrid.Locator is present... ok
    testing checked cast... ok
    pinging server... ok
    testing locator finder... ok
    testing discovery... Reference.cpp:1637: Ice::NoEndpointException:
    no suitable endpoint available for proxy `test -t -e 1.1 @ TestAdapter'
    !! 06/30/15 09:17:21.232 error: communicator not destroyed during global destruction.unexpected exit status: expected: 0, got 1
    ('test in /home/andreas/Work/Ice/Ice-3.6.0/ice/cpp/test/IceGrid/simple failed with exit status', 1)
    make: *** [test] Fehler 1
    

    After commenting out this test in AllTests.cpp, the rest runs through.

    Cheers,
    Andreas
  • benoit
    benoit Rennes, France
    Hi,

    This test failure indicates that the multicast discovery of the IceGrid locator failed.

    This can be caused if the firewall on the machine blocks multicast (I would expect a similar failure with the IceDiscovery tests if that's the case). It can also potentially be timing related too, is the test failing all the time?

    Cheers,
    Benoit.
  • Hi,
    benoit wrote: »
    It can also potentially be timing related too, is the test failing all the time?
    Yes, the same error occurs on every invocation.

    Andreas
  • benoit
    benoit Rennes, France
    Hi,

    Can you confirm that the test/Ice/udp and test/IceDiscovery/simple tests work on your platform?

    If they do, can you add:
            initData.properties->setProperty("Ice.Trace.Network", "3");
            initData.properties->setProperty("Ice.Trace.Protocol", "2");
    

    to cpp/test/IceGrid/simple/AllTests.cpp line 68? and send us the resulting output of the test after the failure?

    Cheers,
    Benoit.
  • Hi,
    benoit wrote: »
    Can you confirm that the test/Ice/udp and test/IceDiscovery/simple tests work on your platform?
    No and yes: Here's the output for test/Ice/upd and test/IceDiscovery/simple:
    *** running tests 1/2 in /home/andreas/Work/Ice/Ice-3.6.0/ice/cpp/test/Ice/udp
    *** configuration: Default 
    *** test started: 07/02/15 15:54:27
    *** using Ice source dist (32bit) 
    starting server #1... ok
    starting server #2... ok
    starting server #3... ok
    starting server #4... ok
    starting server #5... ok
    starting client... ok
    testing udp... ok
    testing udp multicast... failed (is a firewall enabled?)
    testing udp bi-dir connection... ok
    
    *** running tests 2/2 in /home/andreas/Work/Ice/Ice-3.6.0/ice/cpp/test/IceDiscovery/simple
    *** configuration: Default 
    *** test started: 07/02/15 15:54:38
    *** using Ice source dist (32bit) 
    starting server #1... ok
    starting server #2... ok
    starting server #3... ok
    starting client... ok
    testing indirect proxies... ok
    testing well-known proxies... ok
    testing object adapter registration... ok
    testing object adapter migration...ok
    testing object migration...ok
    testing replica groups...ok
    shutting down... ok
    
    benoit wrote: »
    If they do, can you add […] and send us the resulting output of the test after the failure?
    Here it comes:
    *** running tests 1/1 in /home/andreas/Work/Ice/Ice-3.6.0/ice/cpp/test/IceGrid/simple
    *** configuration: Default 
    *** test started: 07/02/15 16:03:31
    *** using Ice source dist (32bit) 
    starting icegrid registry... ok
    starting icegrid replica-1... ok
    starting icegrid replica-2... Traceback (most recent call last):
      File "/home/andreas/Work/Ice/Ice-3.6.0/ice/cpp/test/IceGrid/simple/run.py", line 29, in <module>
        IceGridAdmin.iceGridClientServerTest("", "--TestAdapter.Endpoints=default --TestAdapter.AdapterId=TestAdapter")
      File "/home/andreas/Work/Ice/Ice-3.6.0/ice/scripts/IceGridAdmin.py", line 298, in iceGridClientServerTest
        registryProcs = startIceGridRegistry(testdir, True)
      File "/home/andreas/Work/Ice/Ice-3.6.0/ice/scripts/IceGridAdmin.py", line 112, in startIceGridRegistry
        proc = TestUtil.startServer(iceGrid, cmd, driverConfig, count = 5)
      File "/home/andreas/Work/Ice/Ice-3.6.0/ice/scripts/TestUtil.py", line 1687, in startServer
        return spawnServer(cmd, env = env, adapter = adapter, count = count, echo = echo, lang = config.lang, mx = config.mx, timeout = timeout)
      File "/home/andreas/Work/Ice/Ice-3.6.0/ice/scripts/TestUtil.py", line 1291, in spawnServer
        server.expect("[^\n]+ ready\n", timeout = timeout)
      File "/home/andreas/Work/Ice/Ice-3.6.0/ice/scripts/Expect.py", line 426, in expect
        raise e
    Expect.TIMEOUT: timeout exceeded in match
    pattern: "[^\n]+ ready\n"
    buffer: "!! 07/02/15 16:03:36.296 replica-2: error: an IceGrid registry is already running and listening on the client endpoints `default -p 12012\'
    "
    
    ('test in /home/andreas/Work/Ice/Ice-3.6.0/ice/cpp/test/IceGrid/simple failed with exit status', 1)
    make: *** [test] Fehler 1
    

    Cheers, Andreas
  • bernard
    bernard Jupiter, FL
    Hi Andreas,

    We are aware of some UDP multicast issue with Ice 3.6 on Ubuntu 12.04; we didn't spend a lot of time investigating these issues as we don't support this old version of Ubuntu.

    Can you upgrade to a Linux distribution we support, like for example Ubuntu 14.04?

    Best regards,
    Bernard
  • Hi Bernard
    bernard wrote: »
    We are aware of some UDP multicast issue with Ice 3.6 on Ubuntu 12.04. Can you upgrade to a Linux distribution we support, like for example Ubuntu 14.04?
    I'll just keep the failing tests commented.
    And I'll stick to Ubuntu 12.04 _LTS_ until 2017. ;-)

    Cheers, Andreas