Closed aarontovars closed 10 months ago
Any possible suggestion @joshy @tblock79 @RoyWiggins ?
Thanks in advance for your help! :)
I'm not sure. The error you're getting in Jupyter is coming from deep inside asyncio, quite likely that's caused by your runtime environment (eg running in Jupyter or Windows):
It's probably not related to the issue you're having.
One thing is that your "ping" definition is simply different- we are doing
a literal "ping
It may be that you want to have three results from a test: ping, http status not a 404, and http status is actually 200. This makes sense since you want to know 1) whether the xnat service is up and 2) whether your credentials are correct.
You can return all three statuses as a dictionary and they will be passed to this template to be displayed:
https://github.com/mercure-imaging/mercure/blob/master/webinterface/templates/targets/xnat-test.html
I'm not sure why it's not displaying properly. If "ping -w 1 -c 1
On Wed, Nov 8, 2023, 3:35 AM Aarón Tovar Sáez @.***> wrote:
Any possible suggestion @joshy https://github.com/joshy @tblock79 https://github.com/tblock79 @RoyWiggins https://github.com/RoyWiggins ?
Thanks in advance for your help! :)
— Reply to this email directly, view it on GitHub https://github.com/mercure-imaging/mercure/issues/60#issuecomment-1801321279, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABILWYV4U3XMVMBEFBYYX63YDM75XAVCNFSM6AAAAAA6XKILJOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBRGMZDCMRXHE . You are receiving this because you were mentioned.Message ID: @.***>
Thank you so much for your reply.
I now see what is going on in here. Correct ping is done if the input entered in the Host/IP
field is an IP or domain without http://
otr https://
. However, to check log in correctly and to later send to XNAT, Host/IP
field is expected to be in the form http://[IP or domain]
or https://[IP or domain]
.
Hi @joshy @tblock79 @RoyWiggins,
I have proposed a solution to this on #62
Merged your PR into the main branch. Many thanks for your work on this!
Describe the bug After the merge from #54 , some small commits were done. One of them (commit 2f6f1de) changed the code to test if ping is OK. Before this change, if connection to XNAT was successful, ping was OK but after this commit, even though ping is OK, test is not passed and ping appears as None.
I just checked in a jupyter notebook your version and my current version to understand what may be happening since on my side ping is not working.
From your version, I got:
However, in my implementation I indeed have a way to check correct ping by checking the status of the response connecting to the XNAT target host.
This is what I got:
{'ping': True, 'loggedin': True, 'err': ''}
by running my
test_connection
function: