Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ClientRunner logging of Render ClientScript #162

Open
martinschorb opened this issue Nov 4, 2022 · 2 comments
Open

ClientRunner logging of Render ClientScript #162

martinschorb opened this issue Nov 4, 2022 · 2 comments

Comments

@martinschorb
Copy link
Contributor

Dear all,

when running a stack upload, I run into

renderapi.errors.ClientScriptError: client_script call ['.../render-ws-java-client/src/main/scripts/run_ws_client.sh', '5G', 'org.janelia.render.client.ImportJsonClient', '--baseDataUrl', '...', '--owner', '...', '--project', '...', '--stack', '...', '.../tmpchicruj0.json'] failed

I 'd like to know where/why the call fails but cannot find any logging. I already set the log level to debug in the parent asap-module call, but there is no additional output regarding the failed client script. That's the last line before the error:

DEBUG:renderapi.client.client_calls:call_run_ws_client -- classname:org.janelia.render.client.ImportJsonClient add_args:['--baseDataUrl', '...', '--owner', '...', '--project', '...', '--stack', '...', '.../tmpchicruj0.json'] client_script:.../render-ws-java-client/src/main/scripts/run_ws_client.sh memGB:5G

Is there simply no output provided by the Render script, is it not forwarded to the Python logger, or is it logged somewhere else and I just haven't found it?
The temporary json file (I assume containing the tile specs) is deleted with the run, so I cannot call the client script directly to see its output.

Can I somehow set up render-python to also log the client script output?

Thanks for your support!

@RussTorres
Copy link
Collaborator

This is a similar problem to #136 -- both getting at the fact that identifying issues in client calls is not straightforward enough to be useful. The bash/java output from the client defaults to writing stdout/stderr, but this is not as helpful as logging or exceptions in certain use cases (e.g. running code in a jupyter notebook).

Currently all client calls should allow you to pass stderr and stdout arguments directly to subprocess.call to write to custom files. Hopefully this information helps you figure out where to look for immediate debugging.

As you said, a better option is to incorporate these messages into the python logging. We already support making subprocess.check_output calls (but don't use them effectively), so it should be straightforward to work with this and add some logging support for at least converged stdout/stderr logging from all the clients.

@zikai1
Copy link

zikai1 commented Feb 23, 2023

Hi all @RussTorres @fcollman @martinschorb ,

I encounter the same problem which has plagued me a long time. I follow the instructions in the user guide document as shown below:

1677144774434
I have successfully pulled the image fcollman/render-python, but when I ran it, the following error arised:

docker run -t fcollman/render-python  -v .:/scripts     python /scripts/my_script.py
[FATAL tini (6)] exec -v failed: No such file or directory

I cannot find the my_script.py file in my current path. I think it can generate a complied jar file which relates the local system path to the render-ws-java-client scripts. Otherwise, the above problem issued by @martinschorb will arise.

Thanks for your kind help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants