I'm setting up GeoNetwork behind a HTTP proxy with basic authentication. After setting the proxy_host/port/username/password in the UI, log file says :

ERROR [geonetwork] - Proxy credentials cannot be used 

The user interface is then somewhat laggy and unstable. Log file reports various Exceptions related to HTTP , for example:

handleException /geonetwork/proxy org.apache.http.conn.HttpHostConnectException: Connect to secure.geonames.org:443 [secure.geonames.org/] failed: Connection timed out: connect

Problem looks similar whether I use GeoNetwork 3.x or 4.x. System is Windows Server 2019 with java 1.8.

Having a look into the source code, the proxy setup for http client ignores proxy credentials.

Any suggestion or workaround ?

  • Edit the source code to take the proxy credentials in to account and submit a PR to GeoNetwork
    – Ian Turton
    Aug 13, 2021 at 9:29

1 Answer 1


I worked around this by temporarily adding the credentials to the host field like


which seems to work for most connections, but is probably unsafe (e.g. for the field is stored in plain text). What does not work is harvesting by CSW: Proxy server with credetinals causes 407. And there are several open issues concerning proxy with auth, e.g. Proxy credentials exposed in plain text.

  • This syntax for host field does not seem to work (for example when retrieving data from thesaurus URLs). Did you set the proxy host parameter into the admin GUI or in the -D java flags ? Aug 16, 2021 at 16:25
  • I did add the credentials (url-encoded!) in the host field of the admin gui's settings panel and was able to access my productive setting on the web. Testing on version is 4.0.5. However, if geonetwork is the only app on the server it might be worth trying to add the proxy settings to CATALINA_OPTS (-Dhttp.proxySet=true -Dhttp.proxyHost=<host> -Dhttp.proxyPort=<port> -Dhttp.proxyUser=<user> -Dhttp.proxyPassword=<pass> -Dhttp.nonProxyHosts=<no_proxy_host1|no_proxy_host2>). Could you discdibe how you reproduce the error with the thesaurus exactly so I can check?
    – dom
    Aug 18, 2021 at 8:37
  • I reproduced the error on 4.0.5 : setting proxyuser:proxypassword@proxyhost in the proxy host field. Got the following GUI message when adding a thesaurus from URL (example SKOS URL) : error importing thesaurus, unknownhost exception, proxyuser:proxypassword@proxyhost invalid IPv6 adress. (it may be confused by the fact my proxyuser is an integer). I will try the -D options again, but I'm afraid the way the code handles proxy parameters takes precedence over JVM parameters. Aug 19, 2021 at 13:23
  • I see. But what if you set the proxy in the CATALINA_OPTS and have tomcat handle the proxy while disabling it in geonetwork? Your thesaurus URL unfortunatelly refuses connection, so I can't test: Connect to www.vie-publique.fr:80 [www.vie-publique.fr/] failed: Connection refused (Connection refused)
    – dom
    Aug 20, 2021 at 9:18
  • Unfortunately I am not running on Tomcat : I am running the zip package provided with a jetty webserver. Do you mean it is possible to delegate proxy management to Tomcat (especially basic auth) ? Then it could be worth a try. By the way, the example thesaurus URL is now online. Aug 24, 2021 at 16:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.