Archived

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

Where do I put my IceBox service library when deploying to CentOS7, Ice3.6, IceGrid

I continually get this message when starting the IceBox service (using icegridgui)

!! 04/24/16 12:22:55.970 IceBox: error: ServiceManager: unable to load entry point `IxxonService:create': libIxxonService++11.so: cannot open shared object file: No such file or directory

I even set the working directory of the icebox server property to : /var/lib/ice/icegrid/node1/servers/IceBox but putting my library in this directory still coughs up the "no such file or directory" error.

[chow@localhost IceBox]$ pwd
/var/lib/ice/icegrid/node1/servers/IceBox
[chow@localhost IceBox]$ ls
config dbs distrib libIxxonService++11.so revision

Here is my application.xml:

<?xml version="1.0" encoding="UTF-8" ?>



Ixxon GameMaster Services



Ixxon ${name} service application















IceBox server
LANG=en



















Comments

  • &lt?xml version="1.0" encoding="UTF-8" ?&gt
    &lt!-- This file was written by IceGrid Admin --&gt
    &lticegrid&gt
       &ltapplication name="Ixxon"&gt
          &ltdescription&gtIxxon GameMaster Services&lt/description&gt
          &ltservice-template id="IxxonService"&gt
             &ltparameter name="name"/&gt
             &ltservice name="${name}" entry="IxxonService:create"&gt
                &ltdescription&gtIxxon ${name} service application&lt/description&gt
                &ltproperties&gt
                   &ltproperties refid="mx"/&gt
                   &ltproperty name="Ixxon.Identity" value="gamemaster"/&gt
                &lt/properties&gt
                &ltadapter name="Ixxon-${name}" endpoints="default -h localhost" id="Ixxon-${name}"/&gt
             &lt/service&gt
          &lt/service-template&gt
          &ltproperties id="mx"&gt
             &ltproperty name="IceMX.Metrics.Debug.GroupBy" value="id"/&gt
             &ltproperty name="IceMX.Metrics.Debug.Disabled" value="1"/&gt
             &ltproperty name="IceMX.Metrics.ByParent.GroupBy" value="parent"/&gt
             &ltproperty name="IceMX.Metrics.ByParent.Disabled" value="1"/&gt
          &lt/properties&gt
          &ltnode name="node1"&gt
             &lticebox id="IceBox" activation="manual" exe="icebox"&gt
                &ltdescription&gtIceBox server&lt/description&gt
                &ltenv&gtLANG=en&lt/env&gt
                &ltproperties&gt
                   &ltproperties refid="mx"/&gt
                   &ltproperty name="IceBox.Trace.ServiceObserver" value="1"/&gt
                &lt/properties&gt
                &ltservice-instance template="IxxonService" name="GameMaster"&gt
                   &ltproperties&gt
                      &ltproperty name="Ixxon.Database.Name" value="Ixxon"/&gt
                      &ltproperty name="Ixxon.Database.Host" value="localhost"/&gt
                      &ltproperty name="Ixxon.Database.Username" value="ixxon"/&gt
                      &ltproperty name="Ixxon.Database.Password" value="ixxon"/&gt
                      &ltproperty name="Ixxon.Database.Port" value="3066"/&gt
                      &ltproperty name="Ixxon.Database.TimeCapsule" value=""/&gt
                      &ltproperty name="Ixxon.Trace.Level" value="0"/&gt
                      &ltproperty name="IceBox.Trace.Network" value="1"/&gt
                   &lt/properties&gt
                &lt/service-instance&gt
             &lt/icebox&gt
          &lt/node&gt
       &lt/application&gt
    &lt/icegrid&gt
    
  • I'd like to add that I have tried putting the libIxxonService+11.so file in /usr/lib and still get the same error. I followed my nose in the source code to this line:
    _hnd = dlopen(lib.c_str(), flags);
    and looked in the man pages for dlopen and /lib and /usr/lib are supposed to be searched.

  • And last but not least, I have tried installing the lib where Ice libs reside:

    [chow@localhost c++11]$ pwd
    /usr/lib64/c++11
    [chow@localhost c++11]$ ls -la
    total 148
    drwxr-xr-x. 2 root root 4096 Apr 24 19:13 .
    dr-xr-xr-x. 159 root root 102400 Apr 24 19:11 ..
    lrwxrwxrwx. 1 root root 22 Apr 19 11:51 libFreeze.so -> ../libFreeze++11.so.36
    lrwxrwxrwx. 1 root root 24 Apr 19 11:51 libGlacier2.so -> ../libGlacier2++11.so.36
    lrwxrwxrwx. 1 root root 22 Apr 19 11:51 libIceBox.so -> ../libIceBox++11.so.36
    lrwxrwxrwx. 1 root root 28 Apr 19 11:51 libIceDiscovery.so -> ../libIceDiscovery++11.so.36
    lrwxrwxrwx. 1 root root 23 Apr 19 11:51 libIceGrid.so -> ../libIceGrid++11.so.36
    lrwxrwxrwx. 1 root root 35 Apr 19 11:51 libIceLocatorDiscovery.so -> ../libIceLocatorDiscovery++11.so.36
    lrwxrwxrwx. 1 root root 25 Apr 19 11:51 libIcePatch2.so -> ../libIcePatch2++11.so.36
    lrwxrwxrwx. 1 root root 19 Apr 19 11:51 libIce.so -> ../libIce++11.so.36
    lrwxrwxrwx. 1 root root 22 Apr 19 11:51 libIceSSL.so -> ../libIceSSL++11.so.36
    lrwxrwxrwx. 1 root root 24 Apr 19 11:51 libIceStorm.so -> ../libIceStorm++11.so.36
    lrwxrwxrwx. 1 root root 23 Apr 19 11:51 libIceUtil.so -> ../libIceUtil++11.so.36
    lrwxrwxrwx. 1 root root 21 Apr 24 19:13 libIxxonService++11.so -> ../libIxxonService.so

  • One more go at it, set the executable back to icebox (as opposed to icebox++11) and now the service is starting up. Looks like for CentOS7, the place to put one's IceBox service library is /usr/lib64/.

    I am unclear as to why it is not working with icebox++11, so if anyone has a good idea, I'd love to hear it.

  • xdm
    xdm La Coruña, Spain

    icebox++11 must be used with libraries build with --std=c++11, for C++98 libraries use icebox

    The library location depends on the entry point specification, if you just set the library name, the library need to be in the system LD_LIBRARY_PATH, you can also use a path relative to the working directory in your entry point entry="./IxxonService:create"

  • I did put the c+11 in the eclipse properties, but I'm not going to worry about that now. HAve you had any luck using the SessionFacotryHelper and SessionHelper classes? Now I am stuck on not getting a createdCommunicator event thrown, though I can see in the glacier2router log that a session is active.

  • bernard
    bernard Jupiter, FL

    Hi Brian,

    On RHEL / CentOS 7, we provide two set of libraries: the ++11 libraries, built with --std=c++11, and the suffix-less libraries built without this flag. All these libraries are installed in the default system location, /usr/lib64 for 64-bit libraries.

    As Jose wrote above, icebox is/should be used for IceBox services built without --std=c++11, whereas icebox++11 should be used for IceBox services built with --std=c++11 (or equivalent).

    Are you building your IceBox service with --std=c++11?

    If yes, then you need to use the ++11 suffix for your shared library name, but not in your Ice entry point configuration. Ice built in C++11 mode, and in particular icebox++11, adds this suffix automatically when dynamically loading shared libraries. See https://github.com/zeroc-ice/ice/blob/3.6/cpp/src/Ice/DynamicLibrary.cpp around line 93.

    Conversely, if you are building without --std=c++11, please use icebox and don't add a ++11 suffix to your library name.

    Hope it's clearer now.

    Bernard

  • I got past that problem. this is my main form load function:

        public frmMain() {
            Ice.InitializationData initData = new Ice.InitializationData();
            initData.properties = Ice.Util.createProperties();
            initData.properties.load("config.client");
            _factory = new Glacier2.SessionFactoryHelper(initData, this);
            _factory.setProtocol("tcp");
            _factory.setUseCallbacks(false);
    
            _session = _factory.connect("", "");
    
            InitializeComponent();
        }
    

    I see in the debugger after the factory.connect that createdCommunicator does get called. But now I get a connectFailed event (I was messing with glacier2router settings for Session Management - icegrid docs I found said to not use both session management and IceDefaultRouter).

    Does anyone have a working glacier2router.conf, icegridregistry.conf, icegridnode.conf, and application.xml for deploying on linux a Glacier2->IceGrid->IceBox->custom service?

  • I see the above code that the connect event gets triggered, but I am unable to create an object proxy. Here is my glacier2router.conf pertinent details:

    Glacier2.InstanceName=Glacier2
    Glacier2.Client.Endpoints=tcp -h 192.168.0.11 -p 4063
    Glacier2.Server.Endpoints=

    configure for use with IceGrid

    Ice.Default.Locator=IceGrid/Locator:tcp -h localhost -p 4061

    Glacier2.SessionManager=IceGrid/SessionManager

    Glacier2.SSLSessionManager=IceGrid/SSLSessionManager

    In the SessionCallback.connected event I try to obtain a proxy:

            try {
                _ixxon = IxxonGM.GameMasterPrxHelper.uncheckedCast(_session.session());
                if (_ixxon == null) {
                    throw new ApplicationException("Invalid proxy");
                }
            } catch (Exception ex) {
                MessageBox.Show(ex.ToString(), "Server Connection Failure", MessageBoxButtons.OK, MessageBoxIcon.Error);
                Environment.Exit(0);
            }
    

    which throws a Glacier2.SessionNotExistException even though I see a SessionCallback.createdCommunicator after _session = _factory.connect("", "");

  • turns out I had eclipse 4.1.1 on the test server and I was using the > 4.1.1 c++ preprocessor dialet option to select c++11.