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

Protégé behind corporate proxy: time-out with registry.api.identifiers.org:443 #1231

Closed
jpi-seb opened this issue Sep 17, 2024 · 5 comments
Assignees
Labels
Type: Bug Indicates that Protege is not working as expected

Comments

@jpi-seb
Copy link

jpi-seb commented Sep 17, 2024

We use Protégé 5.6.3 behind a corporate HTTP proxy, in a Windows 10 environnement.
We implemented the JVM proxy settings in the launcher (Protege.l4j.ini and run.bat):

-Dhttp.proxyHost=...
-Dhttp.proxyPort=...
-Dhttp.nonProxyHosts="..."
-Dhttps.proxyHost=...
-Dhttps.proxyPort=...
-Dhttps.nonProxyHosts="..."

However, after launching Protégé and loading our ontology, it hangs when opening the first class in the editor.
Logs indicate a warning causing a 30 seconds time-out on this operation:

WARN  15:00:28  [IdentifiersDotOrg] Error retrieving identifiers.org namespaces: Connect to registry.api.identifiers.org:443 [registry.api.identifiers.org/35.186.209.151] failed: Connection timed out: connect

Our investigations pointed to this class: https://github.com/protegeproject/protege/blob/master/protege-editor-owl/src/main/java/org/protege/editor/owl/model/identifiers/IdentifiersDotOrg.java
It seems that this code tries to send and HTTP GET to an URL, without applying the JVM proxy configuration that we specified in the launcher.

Could you fix this problem in the next release ?
Thanks you in advance.

@gouttegd
Copy link
Collaborator

A cursory search suggests that indeed the Apache HttpClient does not honour the JVM proxy configuration. We’ll need to either configure it so that it explicitly uses the proxy, or switch the IdentifiersDotOrg class to the JDK HTTP client entirely.

@gouttegd gouttegd added the Type: Bug Indicates that Protege is not working as expected label Sep 17, 2024
@gouttegd gouttegd self-assigned this Sep 17, 2024
@jpi-seb
Copy link
Author

jpi-seb commented Sep 17, 2024

Thanks Damien for your answer.
Using the method useSystemProperties() in the Apache HttpClientBuilder, before calling build(), should do the trick as explained here: https://hc.apache.org/httpcomponents-client-4.5.x/current/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html#useSystemProperties()
It supports HTTP proxy settings passed as JVM arguments, and many more options.

@gouttegd
Copy link
Collaborator

Thanks for the pointer. Looks like the most straightforward solution indeed.

I don’t have a proxy setup to test. Would you be willing to test the fix yourself? You can find a preliminary 5.6.5-alpha1 build with the putative fix here: https://incenp.org/files/softs/protege/5.6/

@jpi-seb
Copy link
Author

jpi-seb commented Sep 18, 2024

Thanks for the link to the alpha. I've just tested it in our corporate environnement, behind the HTTP proxy.
I can confirm that is works perfectly now: no warning in the logs, Protégé is not hanging any more while opening the first class in the editor, after having loaded an ontology.

I tested the fix with both method:

  • Modify Protege.l4j.ini to add HTTP proxy settings in JVM args, and starting Protégé with Protege.exe ;
  • Modify run.bat to add HTTP proxy settings in JVM args, and starting Protégé with run.bat.

It works in both cases 👍

@gouttegd
Copy link
Collaborator

Great, thanks for testing. I just pushed the fix to master, it will be included in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Indicates that Protege is not working as expected
Projects
None yet
Development

No branches or pull requests

2 participants