maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary White" <gary_wh...@verizon.net>
Subject RE: (java.net.SocketException) caught when connecting to the target host: Invalid argument: connect
Date Sun, 05 Aug 2012 00:58:37 GMT
I spoke too soon.  I disabled IPv6 on my network adapter and it didn't fix
the problem.  After I sent the previous email, I decided to try the VM arg
and it did the trick.  I'm curious as to why one worked and the other
didn't.

Thanks again,
Gary

-----Original Message-----
From: Gary White [mailto:gary_white@verizon.net] 
Sent: Saturday, August 04, 2012 8:36 PM
To: 'Maven Users List'
Subject: RE: (java.net.SocketException) caught when connecting to the target
host: Invalid argument: connect
Markku,

Your suggestion sounded promising but unfortunately didn't resolve the
problem.

Thanks anyway.

Gary

-----Original Message-----
From: Markku Saarela [mailto:markku.saarela@pp6.inet.fi]
Sent: Saturday, August 04, 2012 5:01 AM
To: users@maven.apache.org
Subject: Re: (java.net.SocketException) caught when connecting to the target
host: Invalid argument: connect

Hi,

You probably hit IPv4 vs IPv6 incompatibility.  JDK 7 uses IPv6 by default
to connect (if OS and network adapter supports it).

Try run Java with this VM argument -Djava.net.preferIPv4Stack=true or try to
set your network adapted only use IPv4 .

Markku

On 3.8.2012 16:22, Gary White wrote:
> I encountered the above error (more complete listing at end of
> email/post) on a new Windows 7 64 bit machine that I'm in the process 
> of setting up.  I originally encountered problems running mvn against 
> a few projects that I had moved from an XP machine and decided to 
> troubleshoot using the following basic command from Maven By Example 
> that
is used to create a simple project:
>
>   
>
> mvn archetype:generate -DgroupId=org.sonatype.mavenbook.simple
> -DartifactId=simple -Dpackage=org.sonatype -Dversion=1.0-SNAPSHOT
>
>   
>
> I've tried this with both the 32 & 64 bit versions of JDK 7u5.  I 
> tried Maven versions 2.2.1, 3.0.3 and 3.0.4 (output below is from 
> 3.0.4).  I've also tried it with Windows Firewall completely disabled 
> and AV completely removed.  I'm connected via Verizon FIOS with the
default router setup.
> Maven works fine on the other XP machine on the same network.
>
>   
>
> Any help is greatly appreciated.
>
> Gary
>
>   
>
> Truncated output follows (I can send complete output if necessary); 
> note - the error repeats for each of the following plugins:
>
> org.apache.maven.plugins:maven-clean-plugin:2.4.1
>
> org.apache.maven.plugins:maven-install-plugin:2.3.1
>
> org.apache.maven.plugins:maven-deploy-plugin:2.7
>
> org.apache.maven.plugins:maven-site-plugin:3.0
>
> org.apache.maven.plugins:maven-antrun-plugin:1.3
>
> org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5
>
> org.apache.maven.plugins:maven-dependency-plugin:2.1
>
> org.apache.maven.plugins:maven-release-plugin:2.0
>
>   
>
> Output:
>
>   
>
> C:\workspace\ch-simple>mvn archetype:generate 
> -DgroupId=org.sonatype.mavenbook.simple -DartifactId=simple 
> -Dpackage=org.sonatype -Dversion=1.0-SNAPSHOT -e -X
>
> Apache Maven 3.0.4 (r1232337; 2012-01-17 03:44:56-0500)
>
> Maven home: C:\Tools\apache-maven
>
> Java version: 1.7.0_05, vendor: Oracle Corporation
>
> Java home: C:\Program Files (x86)\Java\jdk1.7.0_05\jre
>
> Default locale: en_US, platform encoding: Cp1252
>
> OS name: "windows 7", version: "6.1", arch: "x86", family: "windows"
>
> [INFO] Error stacktraces are turned on.
>
> [DEBUG] Reading global settings from
> C:\Tools\apache-maven\conf\settings.xml
>
> [DEBUG] Reading user settings from C:\Users\Gary\.m2\settings.xml
>
> [DEBUG] Using local repository at C:\Users\Gary\.m2\repository
>
> [DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10 
> for C:\Users\Gary\.m2\repository
>
> [INFO] Scanning for projects...
>
> [DEBUG] Extension realms for project
org.apache.maven:standalone-pom:pom:1:
> (none)
>
> [DEBUG] Looking up lifecyle mappings for packaging pom from 
> ClassRealm[plexus.core, parent: null]
>
> [DEBUG] Resolving plugin prefix archetype from 
> [org.apache.maven.plugins, org.codehaus.mojo]
>
> [DEBUG] Using connector WagonRepositoryConnector with priority 0 for
> http://repo.maven.apache.org/maven2
>
> Downloading:
> http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-cle
> an-plu gin/2.4.1/maven-clean-plugin-2.4.1.pom
>
> Aug 03, 2012 8:00:44 AM
> org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRe
> questD
> irector tryConnect
>
> INFO: I/O exception (java.net.SocketException) caught when connecting 
> to the target host: Invalid argument: connect
>
> Aug 03, 2012 8:00:44 AM
> org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRe
> questD
> irector tryConnect
>
> INFO: Retrying connect
>
> Aug 03, 2012 8:00:44 AM
> org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRe
> questD
> irector tryConnect
>
> INFO: I/O exception (java.net.SocketException) caught when connecting 
> to the target host: Invalid argument: connect
>
> Aug 03, 2012 8:00:44 AM
> org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRe
> questD
> irector tryConnect
>
> INFO: Retrying connect
>
> Aug 03, 2012 8:00:44 AM
> org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRe
> questD
> irector tryConnect
>
> INFO: I/O exception (java.net.SocketException) caught when connecting 
> to the target host: Invalid argument: connect
>
> Aug 03, 2012 8:00:44 AM
> org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRe
> questD
> irector tryConnect
>
> INFO: Retrying connect
>
> [DEBUG] Writing resolution tracking file 
> C:\Users\Gary\.m2\repository\org\apache\maven\plugins\maven-clean-plug
> in\2.4 .1\maven-clean-plugin-2.4.1.pom.lastUpdated
>
> [WARNING] Failed to retrieve plugin descriptor for
> org.apache.maven.plugins:maven-clean-plugin:2.4.1: Plugin
> org.apache.maven.plugins:maven-clean-plugin:2.4.1 or one of its 
> dependencies could not be resolved: Failed to read artifact descriptor 
> for
> org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1
>
> org.apache.maven.plugin.PluginResolutionException: Plugin
> org.apache.maven.plugins:maven-clean-plugin:2.4.1 or one of its 
> dependencies could not be resolved: Failed to read artifact descriptor 
> for
> org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1
>
>          at
> org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.res
> olve(D
> efaultPluginDependenciesResolver.java:129)
>
>          at
> org.apache.maven.plugin.internal.DefaultMavenPluginManager.getPluginDe
> script
> or(DefaultMavenPluginManager.java:142)
>
>          at
> org.apache.maven.plugin.DefaultBuildPluginManager.loadPlugin(DefaultBu
> ildPlu
> ginManager.java:59)
>
>          at
> org.apache.maven.plugin.prefix.internal.DefaultPluginPrefixResolver.re
> solveF
> romProject(DefaultPluginPrefixResolver.java:139)
>
>          at
> org.apache.maven.plugin.prefix.internal.DefaultPluginPrefixResolver.re
> solveF
> romProject(DefaultPluginPrefixResolver.java:122)
>
>          at
> org.apache.maven.plugin.prefix.internal.DefaultPluginPrefixResolver.re
> solve(
> DefaultPluginPrefixResolver.java:86)
>
>          at
> org.apache.maven.lifecycle.internal.MojoDescriptorCreator.findPluginFo
> rPrefi
> x(MojoDescriptorCreator.java:262)
>
>          at
> org.apache.maven.lifecycle.internal.MojoDescriptorCreator.getMojoDescr
> iptor(
> MojoDescriptorCreator.java:222)
>
>          at
> org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalcula
> tor.ca
> lculateTaskSegments(DefaultLifecycleTaskSegmentCalculator.java:106)
>
>          at
> org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalcula
> tor.ca
> lculateTaskSegments(DefaultLifecycleTaskSegmentCalculator.java:86)
>
>          at
> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycle
> Starte
> r.java:98)
>
>          at
> org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
>
>          at
> org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
>
>          at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
>
>          at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
>
>          at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
>
>          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
>
>          at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j
> ava:57
> )
>
>          at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess
> orImpl
> .java:43)
>
>          at java.lang.reflect.Method.invoke(Method.java:601)
>
>          at
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launc
> her.ja
> va:290)
>
>          at
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java
> :230)
>
>          at
>
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.
> java:409)
>
>          at
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:3
> 52)
>
> Caused by: org.sonatype.aether.resolution.ArtifactDescriptorException:
> Failed to read artifact descriptor for
> org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1
>
>          at
> org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.l
> oadPom
> (DefaultArtifactDescriptorReader.java:296)
>
>          at
> org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.r
> eadArt
> ifactDescriptor(DefaultArtifactDescriptorReader.java:186)
>
>          at
> org.sonatype.aether.impl.internal.DefaultRepositorySystem.readArtifact
> Descri
> ptor(DefaultRepositorySystem.java:279)
>
>          at
> org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.res
> olve(D
> efaultPluginDependenciesResolver.java:115)
>
>          ... 23 more
>
> Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: 
> Could not transfer artifact
> org.apache.maven.plugins:maven-clean-plugin:pom:2.4.1
> from/to central (http://repo.maven.apache.org/maven2): Invalid argument:
> connect
>
>          at
> org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(Defa
> ultArt
> ifactResolver.java:538)
>
>          at
> org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtif
> acts(D
> efaultArtifactResolver.java:216)
>
>          at
> org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtif
> act(De
> faultArtifactResolver.java:193)
>
>          at
> org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.l
> oadPom
> (DefaultArtifactDescriptorReader.java:281)
>
>          ... 26 more
>
> Caused by: org.sonatype.aether.transfer.ArtifactTransferException: 
> Could not transfer artifact
> org.apache.maven.plugins:maven-clean-plugin:pom:2.4.1
> from/to central (http://repo.maven.apache.org/maven2): Invalid argument:
> connect
>
>          at
> org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(Wa
> gonRep
> ositoryConnector.java:951)
>
>          at
> org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(Wa
> gonRep
> ositoryConnector.java:941)
>
>          at
> org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.r
> un(Wag
> onRepositoryConnector.java:669)
>
>          at
> org.sonatype.aether.util.concurrency.RunnableErrorForwarder$1.run(Runn
> ableEr
> rorForwarder.java:60)
>
>          at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.j
> ava:11
> 10)
>
>          at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.
> java:6
> 03)
>
>          at java.lang.Thread.run(Thread.java:722)
>
> Caused by: org.apache.maven.wagon.TransferFailedException: Invalid
argument:
> connect
>
>          at
> org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.fillInputD
> ata(Ab
> stractHttpClientWagon.java:799)
>
>          at
> org.apache.maven.wagon.StreamWagon.getInputStream(StreamWagon.java:116
> )
>
>          at
> org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:88)
>
>          at
> org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61)
>
>          at
> org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.r
> un(Wag
> onRepositoryConnector.java:601)
>
>          ... 4 more
>
> Caused by: java.net.SocketException: Invalid argument: connect
>
>          at java.net.DualStackPlainSocketImpl.connect0(Native Method)
>
>          at
> java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketIm
> pl.jav
> a:69)
>
>          at
> java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.jav
> a:339)
>
>          at
> java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketI
> mpl.ja
> va:200)
>
>          at
> java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:
> 182)
>
>          at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:157)
>
>          at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
>
>          at java.net.Socket.connect(Socket.java:579)
>
>          at
> org.apache.maven.wagon.providers.http.httpclient.conn.scheme.PlainSock
> etFact
> ory.connectSocket(PlainSocketFactory.java:123)
>
>          at
> org.apache.maven.wagon.providers.http.httpclient.impl.conn.DefaultClie
> ntConn
> ectionOperator.openConnection(DefaultClientConnectionOperator.java:148
> )
>
>          at
> org.apache.maven.wagon.providers.http.httpclient.impl.conn.AbstractPoo
> lEntry
> .open(AbstractPoolEntry.java:149)
>
>          at
> org.apache.maven.wagon.providers.http.httpclient.impl.conn.AbstractPoo
> ledCon
> nAdapter.open(AbstractPooledConnAdapter.java:121)
>
>          at
> org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRe
> questD
> irector.tryConnect(DefaultRequestDirector.java:573)
>
>          at
> org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRe
> questD
> irector.execute(DefaultRequestDirector.java:425)
>
>          at
> org.apache.maven.wagon.providers.http.httpclient.impl.client.AbstractH
> ttpCli
> ent.execute(AbstractHttpClient.java:820)
>
>          at
> org.apache.maven.wagon.providers.http.httpclient.impl.client.AbstractH
> ttpCli
> ent.execute(AbstractHttpClient.java:754)
>
>          at
> org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.execute(Ab
> stract
> HttpClientWagon.java:674)
>
>          at
> org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.fillInputD
> ata(Ab
> stractHttpClientWagon.java:793)
>
>          ... 8 more
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message