MassBank / MassBank-web

The web server application and directly connected components for a MassBank web server
14 stars 22 forks source link

./install.sh fails: MassBank-lib build fails with "Blocked mirror for repositories" (DependencyResolutionException) #302

Closed meowcat closed 3 years ago

meowcat commented 3 years ago
Pulling maven (maven:3-jdk-11)...
3-jdk-11: Pulling from library/maven
Digest: sha256:091072151c320e13d3dd9da9d237ec7cd87b20fb817146bca98d05e374a87fe1
Status: Image is up to date for maven:3-jdk-11
Pulling dbupdate (maven:3-jdk-11)...
3-jdk-11: Pulling from library/maven
Digest: sha256:091072151c320e13d3dd9da9d237ec7cd87b20fb817146bca98d05e374a87fe1
Status: Image is up to date for maven:3-jdk-11
Pulling tomcat (tomcat:9-jdk11)...
9-jdk11: Pulling from library/tomcat
Digest: sha256:a655be865e9f62d6d2ed3823c7382a2d77d0a034eb17714bbf2a514c3f620717
Status: Image is up to date for tomcat:9-jdk11
maven uses an image, skipping
Building mariadb
Step 1/3 : FROM mariadb:latest
 ---> e76a4b2ed1b4
Step 2/3 : ADD waitforSQL.sh /root/
 ---> Using cache
 ---> 83a890dc0d10
Step 3/3 : RUN chmod +x /root/waitforSQL.sh
 ---> Using cache
 ---> 62dbcf57f51d
Successfully built 62dbcf57f51d
Successfully tagged 6_mariadb:latest
dbupdate uses an image, skipping
tomcat uses an image, skipping
6_mariadb_1 is up-to-date
[ERROR] Failed to execute goal on project MassBank-lib: Could not resolve dependencies for project de.ipb-halle.msbi:MassBank-lib:jar:2.1.9-SNAPSHOT: Failed to collect dependencies at edu.ucdavis.fiehnlab.splash:core:jar:1.8: Failed to read artifact descriptor for edu.ucdavis.fiehnlab.splash:core:jar:1.8: Could not transfer artifact edu.ucdavis.fiehnlab.splash:core:pom:1.8 from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [releases (http://gose.fiehnlab.ucdavis.edu:55000/content/groups/public, default, releases+snapshots)] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :MassBank-lib
6_mariadb_1 is up-to-date
6_tomcat_1 is up-to-date
Starting 6_mariadb_1 ... done

Also found in relation to this: https://stackoverflow.com/questions/66980047/maven-build-failure-dependencyresolutionexception

meier-rene commented 3 years ago

Its probably a firewall issue. Pls try to open http://gose.fiehnlab.ucdavis.edu:55000/content/groups/public/edu/ucdavis/fiehnlab/fiehnlab-pom/1.0.11-SNAPSHOT/maven-metadata.xml manually. If it does not work your firewall is blocking host gose.fiehnlab.ucdavis.edu at port 55000

meowcat commented 3 years ago

This worked:

 wget http://gose.fiehnlab.ucdavis.edu:55000/content/groups/public/edu/ucdavis/fiehnlab/fiehnlab-pom/1.0.11-SNAPSHOT/maven-metadata.xml
--2021-04-15 11:59:09--  http://gose.fiehnlab.ucdavis.edu:55000/content/groups/public/edu/ucdavis/fiehnlab/fiehnlab-pom/1.0.11-SNAPSHOT/maven-metadata.xml
Resolving gose.fiehnlab.ucdavis.edu (gose.fiehnlab.ucdavis.edu)... 128.120.143.183
Connecting to gose.fiehnlab.ucdavis.edu (gose.fiehnlab.ucdavis.edu)|128.120.143.183|:55000... connected.
HTTP request sent, awaiting response... 200 OK
Length: 824 [application/xml]
Saving to: ‘maven-metadata.xml’

maven-metadata.xml                      100%[============================================================================>]     824  --.-KB/s    in 0s

2021-04-15 11:59:10 (115 MB/s) - ‘maven-metadata.xml’ saved [824/824]

Besides, the script has always worked on this machine until at least two weeks ago...

Checking the Maven docker image, it would appear that they switched to Maven 3.8.1 11 days ago. https://github.com/docker-library/official-images/commit/94c9a2a17d5a08114504b305059a6c4af54e1cbd#diff-79f56c4595d485f2c306310171f04dcd7d027f418e1a6bee7186dedd2fbedb7c

3.8.1 introduces a change in behaviour where external HTTP insecure URLs are now blocked by default: https://maven.apache.org/docs/3.8.1/release-notes.html#why-does-this-version-have-the-value-3-8-1

https://maven.apache.org/docs/3.8.1/release-notes.html#how-to-fix-when-i-get-a-http-repository-blocked

meier-rene commented 3 years ago

Ok, I was too lazy to actually try this. I have tried it and can reproduce it. Your hints will help me fixing this. I will report back.

meowcat commented 3 years ago

Quick fix is using maven:3.6-jdk-11 in compose (waiting for it to build, but seems to work.) The "defining mirror" thing I don't really understand.

meier-rene commented 3 years ago

Your quick fix is working for me. Thanks! I pushed the changes to the dev branch. Do you need a backport to the resent release? If its not very urgent, it will be in the next release.

The "defining mirror" is nothing we can apply at the repo. Its a personal setting for every user and that's why not well suited as a permanent fix.

I also moved the problem to some one else desk... https://github.com/berlinguyinca/spectra-hash/issues/48

Thanks for reporting and solving. I will close for now. Feel free to reopen if you need the stable release with the fix.

meowcat commented 3 years ago

The "defining mirror" is nothing we can apply at the repo. Its a personal setting for every user and that's why not well suited as a permanent fix.

OK, I suspected that.

Your quick fix is working for me. Thanks! I pushed the changes to the dev branch. Do you need a backport to the resent release? If its not very urgent, it will be in the next release.

Thanks! No backport needed, I use dev anyway.