Archived

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

Problem w/ IceGrid & IcePatch2

I'm attempting to debug an IcePatch distribution problem, presently by setting the following trace parameters as follows:


<server-template id="FSTemplate">
<parameter name="exe" default="python"/>
<server id="FSServer" exe="${exe}" activation="always" pwd="${OMERO_HOME}">
<option>${OMEROPY_HOME}fsRunFSServer.py</option>
<env>${PYTHONPATH}</env>
<adapter name="omerofs.MonitorServer" register-process="true" endpoints="tcp">
<object identity="FSServer" type="::monitors::MonitorServer"/>
</adapter>
<properties>
<properties refid="Basics"/>
<properties refid="MultiThreaded"/>

<property name="Ice.Trace.Locator" value="2"/>
<property name="Ice.Trace.Network" value="3"/>
<property name="Ice.Trace.Protocol" value="1"/>
<property name="Ice.Warn.Connections" value="1"/>

</properties>
</server>
</server-template>



<node name="master">

<server-instance template="IcePatch2Template" directory="C:/omero_dist/icepatch2/data"/>

<server-instance template="Glacier2Template"
client-endpoints="tcp -p 4063"
session-timeout="300"
server-endpoints="tcp -h 127.0.0.1"/>
<server-instance template="WinBlitzTemplate" index="0" config="default"/>
<server-instance template="WinIndexerTemplate" index="0"/>
<server-instance template="DropBoxTemplate"/>
<server-instance template="FSTemplate"/>

<server-instance template="ProcessorTemplate" index="0">
<!--<distrib>
<directory>C:\omero_dist\ServerFiles</directory>
</distrib>-->
</server-instance>

<server-instance template="WebTemplate"/>
<server-instance template="StormTemplate"/>
</node>


The present difficulty is that there is nothing being written to the "FSServer.out & .err" files. The same trace properties when used in the IcePatch2 template does write trace information to the corresponding *.out & .err files.

This is only a means to uncover the reason the icepatch server is not distributing the appropriate files. Please advise why the trace data may not be written in one case, but does in the other.

Thanks,
Andy

Comments

  • benoit
    benoit Rennes, France
    Hi Andy,

    Which platform and Ice version do you use?

    Can you try with a Python demo from your Ice distribution to see if stderr/stdout re-direction with the Ice.StdErr/Ice.StdOut properties work?

    For example:
        $ cd Ice-3.3.1/py/demo (or cd Ice-3.3.1-demos/demopy if you use the demo package)
        $ cd Ice/hello
        $ python Server.py --Ice.Trace.Network=2 --Ice.StdErr=stderr.txt
        <Ctrl-C>
        $ cat stderr.txt
    

    This works for me on Linux and it should work with IceGrid as well. Note however that the stderr output is buffered (even when using the python -u command line option) and the output might not show up right away after starting the process.

    Cheers,
    Benoit.
  • Benoit,
    I'm using Ice v3.3.1 on WinXP. I attempted your suggestion w/ negative results as follows:

    C:\Ice-3.3.1\demopy\Ice\hello>python client.py
    Traceback (most recent call last):
    File "C:\Ice-3.3.1\python\Ice.py", line 766, in main
    status = self.run(args)
    File "client.py", line 40, in run
    self.communicator().propertyToProxy('Hello.Proxy').ice_twoway().ice_timeout(
    -1).ice_secure(False))
    File "Hello.ice", line 49, in checkedCast
    ConnectionRefusedException: Ice.ConnectionRefusedException:
    Unknown error

    C:\Ice-3.3.1\demopy\Ice\hello>

    Without the added command line input, the demo worked fine. Please advise.
    Thanks,
    Andy
  • benoit
    benoit Rennes, France
    Hi,

    It looks like stdout/stderr redirection to files (using the Ice.StdOut/Ice.StdErr properties) does indeed not work properly on Windows for python applications. For some reasons the python process seems to hang when these options are specified. We're investigating this issue.

    In the meantime, as I recommended on the other thread, it's best if you don't set IceGrid.Node.Output when you using python servers. The stderr/stdout of the servers should go to the IceGrid node stderr/stdout instead.

    Cheers,
    Benoit.