I'm trying to build a DSpace program. I get the following exception:

INFO: I/O exception (java.net.SocketException) caught when processing request to {s}->https://repo.maven.apache.org:443: Permission denied: connect 

I quote the contents of the CMD output:


 D:\DSpace_runtime\DSPACE\dspace>mvn package Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Reactor Build Order: [INFO] [INFO] DSpace Addon Modules [INFO] DSpace Kernel :: Additions and Local Customizations [INFO] DSpace XML-UI (Manakin) :: Local Customizations [INFO] DSpace JSP-UI :: Local Customizations [INFO] DSpace RDF :: Local Customizations [INFO] DSpace REST :: Local Customizations [INFO] DSpace SWORD :: Local Customizations [INFO] DSpace SWORD v2 :: Local Customizations [INFO] DSpace SOLR :: Local Customizations [INFO] DSpace OAI-PMH :: Local Customizations [INFO] DSpace Assembly and Configuration [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building DSpace Addon Modules 6.0 [INFO] ------------------------------------------------------------------------ Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven -enforcer-plugin/1.4.1/maven-enforcer-plugin-1.4.1.pom юъЄ 27, 2016 3:29:24 PM org.apache.maven.wagon.providers.http.httpclient.impl.ex ecchain.RetryExec execute INFO: I/O exception (java.net.SocketException) caught when processing request to {s}->https://repo.maven.apache.org:443: Permission denied: connect юъЄ 27, 2016 3:29:24 PM org.apache.maven.wagon.providers.http.httpclient.impl.ex ecchain.RetryExec execute INFO: Retrying request to {s}->https://repo.maven.apache.org:443 юъЄ 27, 2016 3:29:45 PM org.apache.maven.wagon.providers.http.httpclient.impl.ex ecchain.RetryExec execute INFO: I/O exception (java.net.SocketException) caught when processing request to {s}->https://repo.maven.apache.org:443: Permission denied: connect юъЄ 27, 2016 3:29:45 PM org.apache.maven.wagon.providers.http.httpclient.impl.ex ecchain.RetryExec execute INFO: Retrying request to {s}->https://repo.maven.apache.org:443 юъЄ 27, 2016 3:30:06 PM org.apache.maven.wagon.providers.http.httpclient.impl.ex ecchain.RetryExec execute INFO: I/O exception (java.net.SocketException) caught when processing request to {s}->https://repo.maven.apache.org:443: Permission denied: connect юъЄ 27, 2016 3:30:06 PM org.apache.maven.wagon.providers.http.httpclient.impl.ex ecchain.RetryExec execute INFO: Retrying request to {s}->https://repo.maven.apache.org:443 [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] DSpace Addon Modules ............................... FAILURE [01:24 min] [INFO] DSpace Kernel :: Additions and Local Customizations SKIPPED [INFO] DSpace XML-UI (Manakin) :: Local Customizations .... SKIPPED [INFO] DSpace JSP-UI :: Local Customizations .............. SKIPPED [INFO] DSpace RDF :: Local Customizations ................. SKIPPED [INFO] DSpace REST :: Local Customizations ................ SKIPPED [INFO] DSpace SWORD :: Local Customizations ............... SKIPPED [INFO] DSpace SWORD v2 :: Local Customizations ............ SKIPPED [INFO] DSpace SOLR :: Local Customizations ................ SKIPPED [INFO] DSpace OAI-PMH :: Local Customizations ............. SKIPPED [INFO] DSpace Assembly and Configuration .................. SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 01:24 min [INFO] Finished at: 2016-10-27T15:30:27+05:00 [INFO] Final Memory: 8M/21M [INFO] ------------------------------------------------------------------------ [ERROR] Plugin org.apache.maven.plugins:maven-enforcer-plugin:1.4.1 or one of it s dependencies could not be resolved: Failed to read artifact descriptor for org .apache.maven.plugins:maven-enforcer-plugin:jar:1.4.1: Could not transfer artifa ct org.apache.maven.plugins:maven-enforcer-plugin:pom:1.4.1 from/to central (htt ps://repo.maven.apache.org/maven2): Permission denied: connect -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit ch. [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 rea d the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResoluti onException 

Of the recommendations on the Internet, I found only the use of the Djava.net.preferIPv4Stack = true option, but it does not work in my case. It is also recommended to disable the firewall. Disconnected. Also does not work. They also say that this is a typical Java 7 error, but the Oracle website does not allow you to download Java 6, arguing that you only need to use the latest version, so I can’t confirm this version.

It turned out that this exception does not occur on the server, that is, DSpace is collected without errors. Perhaps the server works bypassing a certain firewall, but I don’t know how to check it.

  • And why not 8 download? - Andrew Bystrov
  • I have the eighth)))). I think the problem with the seventh version is relevant for the eighth. - DP0
  • And through the browser on the machine that starts the maven, you can go to this address repo.maven.apache.org:443 ? - Andrew Bystrov
  • Yes. All links are working. - DP0
  • one
    Do you work in an office, do you have a proxy? Or from home? - Igor Kudryashov

1 answer 1

Most likely there is a proxy. If its parameters are unknown, try changing the https protocol to http. This can be done, for example, by setting a profile in your settings.xml file.

 <profiles> <profile> <id>central</id> <!--Override the repository (and pluginRepository) "central" from the Maven Super POM --> <repositories> <repository> <id>central</id> <url>http://repo1.maven.org/maven2</url> <releases> <enabled>true</enabled> </releases> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>central</id> <url>http://repo1.maven.org/maven2</url> <releases> <enabled>true</enabled> </releases> </pluginRepository> </pluginRepositories> </profile> </profiles> 

Next you need to activate this profile.

 <activeProfiles> <!--make the profile active all the time --> <activeProfile>central</activeProfile> </activeProfiles> 

Just in case, look at the setting of the proxy Configuring a proxy

  • I do not have the settings.xml file. There is pom.xml. Looks like yours, but there are no <repository> tags. - DP0
  • Your settings.xml file is in your OS profile in the .m2 directory. For example, for Windows 7, this would be C:\Users\ВАШЕ_ИМЯ_ПОЛЬЗОВАТЕЛЯ\.m2\settings.xml - Igor Kudryashov
  • This file is neither on my computer nor on the server. In the .m2 directory there is only a subdirectory repository - DP0
  • You should read this - Installing Apache Maven and this - Configuring Apache Maven - Igor Kudryashov