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

caom2gen returns HTTP Status 401 when using a .netrc file #93

Open
SharonGoliath opened this issue Aug 7, 2018 · 0 comments
Open

caom2gen returns HTTP Status 401 when using a .netrc file #93

SharonGoliath opened this issue Aug 7, 2018 · 0 comments

Comments

@SharonGoliath
Copy link
Collaborator

The problem reproduced in the 'collection' container from opencadc-metadata-curation/collection2caom2:

root@b119aac519a0:/usr/src/app/test_vos# chmod 700 ~/.netrc
root@b119aac519a0:/usr/src/app/test_vos# caom2gen --out test_obs.xml --observation 'COLLECTION' dao_c122_2016_012725 --blueprint ./test_obs.blueprint --lineage dao_c122_2016_012725/vos:/CAOMworkshop/Examples/DAO/dao_c122_2016_012725.fits dao_c122_2016_012725/vos:/CAOMworkshop/Examples/DAO/dao_c122_2016_012725_1024.png dao_c122_2016_012725/vos:/CAOMworkshop/Examples/DAO/dao_c122_2016_012725_256.png
2018-08-07 16:49:29,922:ERROR:root :3534:Failed caom2gen execution.
2018-08-07 16:49:29,922:ERROR:root :3535:[Errno 13] # HTTP Status 401 - * * * type Status report message __ description This request requires HTTP authentication. * * * ### Apache Tomcat/7.0.33

Other cases:
root@b119aac519a0:/usr/src/app/test_vos# cp ~/.netrc test_netrc
root@b119aac519a0:/usr/src/app/test_vos# rm ~/.netrc
root@b119aac519a0:/usr/src/app/test_vos# caom2gen --netrc ./test_netrc --out test_obs.xml --observation 'COLLECTION' dao_c122_2016_012725 --blueprint ./test_obs.blueprint --lineage dao_c122_2016_012725/vos:/CAOMworkshop/Examples/DAO/dao_c122_2016_012725.fits dao_c122_2016_012725/vos:/CAOMworkshop/Examples/DAO/dao_c122_2016_012725_1024.png dao_c122_2016_012725/vos:/CAOMworkshop/Examples/DAO/dao_c122_2016_012725_256.png
root@b119aac519a0:/usr/src/app/test_vos# ls

root@b119aac519a0:/usr/src/app/test_vos# mv test_netrc ~/.netrc
root@b119aac519a0:/usr/src/app/test_vos# caom2gen --netrc /root/.netrc --out test_obs.xml --observation 'COLLECTION' dao_c122_2016_012725 --blueprint ./test_obs.blueprint --lineage dao_c122_2016_012725/vos:/CAOMworkshop/Examples/DAO/dao_c122_2016_012725.fits dao_c122_2016_012725/vos:/CAOMworkshop/Examples/DAO/dao_c122_2016_012725_1024.png dao_c122_2016_012725/vos:/CAOMworkshop/Examples/DAO/dao_c122_2016_012725_256.png
2018-08-07 16:52:08,570:ERROR:root :3534:Failed caom2gen execution.
2018-08-07 16:52:08,570:ERROR:root :3535:[Errno 13] # HTTP Status 401 - * * * type Status report message __ description This request requires HTTP authentication. * * * ### Apache Tomcat/7.0.33
root@b119aac519a0:/usr/src/app/test_vos# mv ~/.netrc ~/test_netrc
root@b119aac519a0:/usr/src/app/test_vos# caom2gen --netrc /root/test_netrc --out test_obs.xml --observation 'COLLECTION' dao_c122_2016_012725 --blueprint ./test_obs.blueprint --lineage dao_c122_2016_012725/vos:/CAOMworkshop/Examples/DAO/dao_c122_2016_012725.fits dao_c122_2016_012725/vos:/CAOMworkshop/Examples/DAO/dao_c122_2016_012725_1024.png dao_c122_2016_012725/vos:/CAOMworkshop/Examples/DAO/dao_c122_2016_012725_256.png
root@b119aac519a0:/usr/src/app/test_vos# ls

The caom2gen command also works when there is only an sc2.canfar.net entry in the file (i.e. no data web service endpoint).

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

1 participant