geonetwork / core-geonetwork

GeoNetwork is a catalog application to manage spatially referenced resources. It provides powerful metadata editing and search functions as well as an interactive web map viewer. It is currently used in numerous Spatial Data Infrastructure initiatives across the world.
http://geonetwork-opensource.org/
GNU General Public License v2.0
428 stars 489 forks source link

Can't install GeoNetwork, proxy problem #7154

Closed bfouque closed 1 year ago

bfouque commented 1 year ago

Hi everyone,

I'm trying to install the last version of GeoNetwork, but it fails. The problem is probably because of the proxy, so I want to know if I set it up correctly.

What I've done :

  1. Download the last version of GeoNetwork (4.2.5 SNAPSHOT if I do no mistake)
  2. Download Maven 3.9.2, and put it in the path ([...] is for the root) : export PATH=$PATH:[...]/apache-maven-3.9.2/bin
  3. Create a settings_tests.xml inside the GeoNetwork project
  4. Set it like this :
    
    <?xml version="1.0" encoding="UTF-8"?>

<settings xmlns="http://maven.apache.org/SETTINGS/1.2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0 https://maven.apache.org/xsd/settings-1.2.0.xsd">

my_proxy true http proxy.mine.fr XXXX

6. Set MAVEN_OPTS : `export MAVEN_OPTS="-Dhttp.proxyHost=proxy.mine.fr -Dhttp.proxyPort=XXXX"`
7. Do the install from inside core-geonetwork : `mvn -s settings_tests.xml install`

Here is the failure I have : 

[INFO] Reactor Summary for GeoNetwork opensource 4.2.5-SNAPSHOT: [INFO] [INFO] GeoNetwork opensource .............................. FAILURE [ 30.486 s] [INFO] GeoNetwork common utils ............................ SKIPPED [INFO] Caching xslt module ................................ SKIPPED [INFO] ArcSDE module (dummy-api) .......................... SKIPPED [INFO] GeoNetwork domain .................................. SKIPPED [INFO] Oaipmh modules ..................................... SKIPPED [INFO] GeoNetwork Events .................................. SKIPPED [INFO] GeoNetwork schema plugins .......................... SKIPPED [INFO] GeoNetwork schema plugins core ..................... SKIPPED [INFO] GeoNetwork schema plugin for ISO19139/119 standards SKIPPED [INFO] Index module ....................................... SKIPPED [INFO] GeoNetwork core .................................... SKIPPED [INFO] GeoNetwork Events .................................. SKIPPED [INFO] GeoNetwork schema plugin for Dublin Core records retrieved by CSW SKIPPED [INFO] GeoNetwork schema plugin for Dublin Core standard .. SKIPPED [INFO] GeoNetwork schema plugin for ISO19110 standard ..... SKIPPED [INFO] GeoNetwork schema plugin for ISO19115-3:2018 standard SKIPPED [INFO] GeoNetwork CSW server .............................. SKIPPED [INFO] GeoNetwork harvesters .............................. SKIPPED [INFO] GeoNetwork health monitor .......................... SKIPPED [INFO] GeoNetwork Digital Object Identifier (DOI) client .. SKIPPED [INFO] GeoNetwork services ................................ SKIPPED [INFO] Geonetwork Web Resources 4 Java .................... SKIPPED [INFO] GeoNetwork INSPIRE Atom ............................ SKIPPED [INFO] GeoNetwork index using Elasticsearch ............... SKIPPED [INFO] GeoNetwork dashboard app based on Kibana ........... SKIPPED [INFO] Release module ..................................... SKIPPED [INFO] gn-messaging ....................................... SKIPPED [INFO] gn-workers ......................................... SKIPPED [INFO] WFS features harvester ............................. SKIPPED [INFO] gn-camelPeriodicProducer ........................... SKIPPED [INFO] gn-es-test ......................................... SKIPPED [INFO] GeoNetwork Slave ................................... SKIPPED [INFO] Tests for schema plugins ........................... SKIPPED [INFO] GeoNetwork user interface module ................... SKIPPED [INFO] GeoNetwork Web module .............................. SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 30.874 s [INFO] Finished at: 2023-06-13T08:36:08+02:00 [INFO] ------------------------------------------------------------------------ [ERROR] Plugin org.codehaus.mojo:build-helper-maven-plugin:3.0.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.codehaus.mojo:build-helper-maven-plugin:jar:3.0.0: The following artifacts could not be resolved: org.codehaus.mojo:build-helper-maven-plugin:pom:3.0.0 (absent): Could not transfer artifact org.codehaus.mojo:build-helper-maven-plugin:pom:3.0.0 from/to oss.sonatype.org-github-releases (https://oss.sonatype.org/content/repositories/github-releases): Connect to my.proxy.fr:XXXX[my.proxy.fr/XXX.XXX.XXX.X] failed: connect timed out -> [Help 1]


Here is my setup :
 - Debian 10, virtual machine
 - GeoNetwork Version 4.2.5-SNAPSHOT
 - Java JDK 1.8

I've tried many alternatives :
- Without proxy, it also fails but it gives a different error :

Plugin org.codehaus.mojo:build-helper-maven-plugin:3.0.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.codehaus.mojo:build-helper-maven-plugin:jar:3.0.0: The following artifacts could not be resolved: org.codehaus.mojo:build-helper-maven-plugin:pom:3.0.0 (absent): Could not transfer artifact org.codehaus.mojo:build-helper-maven-plugin:pom:3.0.0 from/to oss.sonatype.org-github-releases (https://oss.sonatype.org/content/repositories/github-releases): oss.sonatype.org: Échec temporaire dans la résolution du nom: Unknown host oss.sonatype.org: Échec temporaire dans la résolution du nom -> [Help 1]

- With the proxy set only inside settings_tests.xml
- With the proxy set only inside MAVEN_OPTS
- With https (and the two alternatives right above)
- With the settings.xml inside .m2, but it gives the same problem

Finally, I tried this command : `mvn help:effective-settings`, and it gives a warning for each download, and it doesn't download it. Here is an example, but keep in mind that it does this for every plugin : 

[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-compiler-plugin:3.8.1: Plugin org.apache.maven.plugins:maven-compiler-plugin:3.8.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-compiler-plugin:jar:3.8.1



I think that it might comes from our proxy.
Do I set it correctly ? Or should I see with the proxy directly ?

Thank you all for your time !
bfouque commented 1 year ago

Everything is fine ! The problem was from our proxy. We used the wrong one. If you have this kind of problem, it means that it's coming from your proxy.

Have a good day !