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

robot needs java http proxy settings when behind a proxy #1063

Open
schristley opened this issue May 26, 2024 · 1 comment
Open

robot needs java http proxy settings when behind a proxy #1063

schristley opened this issue May 26, 2024 · 1 comment
Assignees

Comments

@schristley
Copy link

When building our application ontology behind a proxy, robot gets an error when processing DOID.

curl -L http://purl.obolibrary.org/obo/DOID.owl --create-dirs -o tmp/DOID-download.owl --retry 4 --max-time 200 && \
robot --catalog catalog-v001.xml convert -i tmp/DOID-download.owl -o tmp/mirror-DOID.owl
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   366    0   366    0     0   3763      0 --:--:-- --:--:-- --:--:--  3734
100 23.8M  100 23.8M    0     0  38.9M      0 --:--:-- --:--:-- --:--:-- 38.9M
org.semanticweb.owlapi.model.UnloadableImportException: Could not load imported ontology: <http://purl.obolibrary.org/obo/doid/obo/ext.owl> Cause: Connection reset
Use the -vvv option to show the stack trace.
Use the --help option to see usage information.
make: *** [Makefile:427: mirror-DOID] Error 1

The issue is that Java needs to know about the proxy. As I hack, I manually modified run.sh

ROBOT_JAVA_ARGS="$ODK_JAVA_OPTS -Dhttp.proxyHost=proxy.swmed.edu -Dhttp.proxyPort=3128" 

I suppose the better solution is to check if HTTP_PROXY is set in the environment and use it...

@gouttegd
Copy link
Contributor

As I hack, I manually modified run.sh

If you don’t want to modify the run.sh script, you can also set the ODK_JAVA_OPTS variable within a run.sh.conf file. That file, when it exists, is sourced by the run.sh script, and is specifically intended to customize the script’s variables:

ODK_JAVA_OPTS="-Dhttp.proxyHost=proxy.swmed.edu -Dhttp.ProxyPort=3128 [...other Java settings as you need them...]"

I suppose the better solution is to check if HTTP_PROXY is set in the environment and use it...

I agree, I think the use of a proxy is common enough that the run.sh script should be able to automatically handle that case without requiring the user to manually configure it.

@gouttegd gouttegd self-assigned this May 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants