icebox environment variables

in Help Center
Hi,
I was trying to set the path for my icebox server in the icebox environment variables. the following fails: its there a way to add directories to the path?
<icebox id="AlsIceBox" activation="on-demand" exe="iceboxd" pwd="C:\Dev\CORE4\Services\ALS">
<description>The ALS IceBox server</description>
<env>PATH=%QtDir%\Bin;C:\Dev\CORE4\Common\Lib;%PATH%</env>
<properties>
<property name="IceBox.InstanceName" value="${server}"/>
<property name="IceBox.Trace.ServiceObserver" value="1"/>
</properties>
<service-instance template="AlsService" name="Als"/>
</icebox>
thanks
Rich
I was trying to set the path for my icebox server in the icebox environment variables. the following fails: its there a way to add directories to the path?
<icebox id="AlsIceBox" activation="on-demand" exe="iceboxd" pwd="C:\Dev\CORE4\Services\ALS">
<description>The ALS IceBox server</description>
<env>PATH=%QtDir%\Bin;C:\Dev\CORE4\Common\Lib;%PATH%</env>
<properties>
<property name="IceBox.InstanceName" value="${server}"/>
<property name="IceBox.Trace.ServiceObserver" value="1"/>
</properties>
<service-instance template="AlsService" name="Als"/>
</icebox>
thanks
Rich
0
Comments
This is expected to work, and we even provide a similar example in the manual:
http://www.zeroc.com/doc/Ice-3.4.1/manual/IceGrid.39.17.html
Could you describe what does not work?
Are you running the IceGride node as a Windows service? In that case, remember that its environment (%PATH% etc) may not match your own environment.
Best regards,
Bernard
I see the following syntax in your article:
PATH=/opt/Ice/bin:$PATH
Is $PATH linux shell script or ICE? (I am obviously no linux guru)
on windows, I have:
PATH=%QtDir%\Bin;C:\Dev\CORE4\Common\Lib;%PATH%
where environment variables are surrounded with %%.
This is not as a service. If I use any syntax, it seems to clobber the entire path, which is expected if it doesnt handle the %PATH%
Net effect is my icebox service cant load.
thanks
Rich
Yes, $PATH is for Linux. For Windows, it's fine to use the %ENVVAR% syntax (as described in the example here).
Could the failure to load the service be caused by another issue? What is the error? Did you try enabling tracing to see the settings used by the IceGrid node to start the server (including environment variables)? You can enable this tracing by adding IceGrid.Node.Trace.Activator=2 in your IceGrid node configuration file.
Also, which Ice version do you use?
Cheers,
Benoit.
I upped the property:
IceGrid.Node.Trace.Activator=2
I see:
!! 06/29/10 14:41:00.455 OssIceBox: error: ServiceManager: unable to load entry point `C:\Dev\CORE4\Services\lib\Oss:create'
in the icebox log file. It didnt really add any information.
I am running Ice 3.4.1 on windows 7 x64.
If I place anything in the path env var in the xml file, It seems to truncate off the system path, and I get a qtcored4.dll not found. Also, for some reason a dll that the icebox service depends on , and is in the same directory as the icebox service dll does not get found.
If I add these directories to the system path prior to launching, all is fine.
But I need the local path redirect
thanks
Rich
Could you copy/paste the output of the node tracing? The tracing should show the setting of the PATH environment for the IceBox process when the node activates it. Is the PATH setting truncated in the trace?
Cheers,
Benoit.
here is the section of the icegrid config file:
here is the trace from the icegrid log file:
Is the unexpanded $(name) above an issue?
thanks
Rich
Benoit,
here is the trace finally:
That is for an xml that has:
thanks
Rich
I was able to reproduce this problem by modifying the IceGrid/icebox demo on Windows. This looks like a bug. We'll investigate!
Thanks,
Bernard
thanks for verifying this
Rich
while I was debugging this, I found some rather odd paths inside the generated icebox config file on the IceBox.Service property:
that is a lot of backslashes
thanks
Rich
The double-backslash is expected, because \ is the escape character in Ice configuration files; see http://www.zeroc.com/doc/Ice-3.4.1/manual/Properties.31.3.html.
So C:\Dev is "encoded" as C:\\Dev. However, these quadruple backslashes look indeed suspicious!
Thanks,
Bernard
I've just posted a patch for this environment variable expansion bug: http://www.zeroc.com/forums/patches/4999-patch-1-ice-3-4-1-icegrid-var-handling-windows-only.html
It was a typo in an update for Ice 3.4.0 that we didn't not catch earlier, unfortunately.
Thanks for the bug report!
Bernard