Why am I getting "Connection Closed on Error" with XMPP - xmpp

XMPP Library being used:
"org.igniterealtime.smack" % "smack-java7" % "4.1.8",
"org.igniterealtime.smack" % "smack-tcp" % "4.1.8",
"org.igniterealtime.smack" % "smack-core" % "4.1.8",
"org.igniterealtime.smack" % "smack-extensions" % "4.1.8",
Hi,
We have a XMPP server which connects to FCM XMPP server, sometime we see following errors from our XMPP Connection sometimes:
2018-11-30T19:08:38.306+05:30 STDIO [ERROR] Nov 30, 2018 7:08:38 PM org.jivesoftware.smack.AbstractXMPPConnection callConnectionClosedOnErrorListener
WARNING: Connection closed with error
java.io.EOFException: input contained no data
at org.xmlpull.mxp1.MXParser.fillBuf(MXParser.java:3003)
at org.xmlpull.mxp1.MXParser.more(MXParser.java:3046)
at org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1410)
at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1395)
at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPConnection.java:1177)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$300(XMPPTCPConnection.java:956)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$1.run(XMPPTCPConnection.java:971)
at java.lang.Thread.run(Thread.java:745)
2018-11-30T19:08:38.306+05:30 PROCESSORS [ERROR] XMPPConnectionListener -> connectionClosedOnError: null input contained no data
java.io.EOFException: input contained no data
at org.xmlpull.mxp1.MXParser.fillBuf(MXParser.java:3003) ~[stormjar.jar:?]
at org.xmlpull.mxp1.MXParser.more(MXParser.java:3046) ~[stormjar.jar:?]
at org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1410) ~[stormjar.jar:?]
at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1395) ~[stormjar.jar:?]
at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093) ~[stormjar.jar:?]
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPConnection.java:1177) [stormjar.jar:?]
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$300(XMPPTCPConnection.java:956) [stormjar.jar:?]
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$1.run(XMPPTCPConnection.java:971) [stormjar.jar:?]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_60]
2018-11-30T19:08:38.306+05:30 STDIO [INFO] 07:08:38 PM XMPPConnection closed due to an exception (1)
2018-11-30T19:08:38.306+05:30 STDIO [ERROR] java.io.EOFException: input contained no data
2018-11-30T19:08:38.306+05:30 STDIO [ERROR] at org.xmlpull.mxp1.MXParser.fillBuf(MXParser.java:3003)
2018-11-30T19:08:38.306+05:30 STDIO [ERROR] at org.xmlpull.mxp1.MXParser.more(MXParser.java:3046)
2018-11-30T19:08:38.306+05:30 STDIO [ERROR] at org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1410)
2018-11-30T19:08:38.306+05:30 STDIO [ERROR] at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1395)
2018-11-30T19:08:38.306+05:30 STDIO [ERROR] at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)
2018-11-30T19:08:38.306+05:30 STDIO [ERROR] at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPConnection.java:1177)
2018-11-30T19:08:38.306+05:30 STDIO [ERROR] at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$300(XMPPTCPConnection.java:956)
2018-11-30T19:08:38.306+05:30 STDIO [ERROR] at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$1.run(XMPPTCPConnection.java:971)
2018-11-30T19:08:38.306+05:30 STDIO [ERROR] at java.lang.Thread.run(Thread.java:745)
I am not able to not able to find what is the reason for these, why these are coming because same code works most of the time, but some times suddenly I start to get this error. I also see same reported here long back but no resolution.

Related

Neo4j community edition installation problem HostnamePortTest failure

I tried to install two versions of Neo4j community edition (4.2.0-SNAPSHOT and 4.1.4-SNAPSHOT).
Both are failing with these errors:
[ERROR] Failures:
[ERROR] HostnamePortTest.testGetHostAddressUnknown:121 Expected java.net.UnknownHostException to be thrown, but nothing was thrown.
[ERROR] HostnamePortTest.testMatchesIPWithHostUnknown:267 Expected java.net.UnknownHostException to be thrown, but nothing was thrown.
[ERROR] HostnamePortTest.testMatchesKnownHostWithHostUnknown:332 Expected java.net.UnknownHostException to be thrown, but nothing was thrown.
[ERROR] HostnamePortTest.testMatchesNullHostWithUnknownHost:387 Expected java.net.UnknownHostException to be thrown, but nothing was thrown.
[ERROR] HostnamePortTest.testMatchesUnknownHosts:135 Expected java.net.UnknownHostException to be thrown, but nothing was thrown.
[INFO]
[ERROR] Tests run: 222, Failures: 5, Errors: 0, Skipped: 0
I can finish the installation with skip tests flag enabled but later when I try to connect to Neo4j I'm getting these errors:
[error] Oct 08, 2020 10:50:19 AM org.neo4j.driver.internal.logging.JULogger info
[error] INFO: Direct driver instance 1881901842 created for server address localhost:7687
[error] Oct 08, 2020 10:50:19 AM org.neo4j.driver.internal.logging.JULogger info
[error] INFO: Closing driver instance 1881901842
[error] Oct 08, 2020 10:50:19 AM org.neo4j.driver.internal.logging.JULogger info
[error] INFO: Closing connection pool towards localhost:7687
Can someone help, I'm not sure what are these errors about?
Thanks,
Joe
It looks like Neo4j community edition works fine even though test cases produce errors. I'm still not sure where are those errors coming from, they don't make much sense.
As for the second part it looks like Neo4j Java driver is printing INFO messages as ERROR messages to console ([error] INFO: Closing driver instance 1496355635). Again I'm not sure why.
My solution was to skip test cases during installation with this command:
mvn install -DskipTests

WARN Executor: Issue communicating with driver in heartbeater

in my app spark streaming I received this error, when the app read a file stream.
[error] Nonzero exit code: 1
[error] (Compile / run) Nonzero exit code: 1
[error] Total time: 48 s, completed Jan 18, 2019 2:04:07 PM
sbt:project1> 19/01/18 14:04:10 WARN Executor: Issue communicating with driver in heartbeater
org.apache.spark.SparkException: Exception thrown in awaitResult:
at org.apache.spark.util.ThreadUtils$.awaitResult(ThreadUtils.scala:226)
at org.apache.spark.rpc.RpcTimeout.awaitResult(RpcTimeout.scala:75)
at org.apache.spark.rpc.RpcEndpointRef.askSync(RpcEndpointRef.scala:92)
at org.apache.spark.executor.Executor.org$apache$spark$executor$Executor$$reportHeartBeat(Executor.scala:835)
at org.apache.spark.executor.Executor$$anon$2.$anonfun$run$24(Executor.scala:864)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
at org.apache.spark.util.Utils$.logUncaughtExceptions(Utils.scala:1945)
at org.apache.spark.executor.Executor$$anon$2.run(Executor.scala:864)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.spark.SparkException: Could not find HeartbeatReceiver.
at org.apache.spark.rpc.netty.Dispatcher.postMessage(Dispatcher.scala:160)
at org.apache.spark.rpc.netty.Dispatcher.postLocalMessage(Dispatcher.scala:135)
at org.apache.spark.rpc.netty.NettyRpcEnv.ask(NettyRpcEnv.scala:229)
at org.apache.spark.rpc.netty.NettyRpcEndpointRef.ask(NettyRpcEnv.scala:523)
at org.apache.spark.rpc.RpcEndpointRef.askSync(RpcEndpointRef.scala:91)
... 12 more
I increase executor memory e network timeout
.set("spark.executor.memory", "5g")
.set("spark.network.timeout", "600s")
How can I solve this issue?
Thanks

Scala Neo4j OGM - Will not scan annotated NodeEntity classes - IllegalArgumentException

Problem: Annotated classes are not being loaded into the class map.
My understanding on how to use the OGM:
Pass your domain (which includes your NodeEntity annotated classes) to the SessionFactory
Open a Session. At this point, behind the scenes, a class map of the annotated NodeEntity classes is built. This is referenced in the stacktrace on line 3 as "Building annotation class map". You'll see it mapped 0 on the next line.
Pass an instance of an annotated NodeEntity class to session.save
Your entity is now saved in Neo4j!
In this sample project, the domain is testdomain, and the only annotated NodeEntity, Person, is defined in the same file. I would expect this would eliminate any issues finding what classes to build into the persistent class map behind the scenes. But as seen in the log, the class map is not considering the domain I pass to SessionFactory.
This prevents any data from being saved to Neo.
You can clone the project and run the app yourself to reproduce the problem (instructions in README).
Stacktrace:
[info] Running testdomain.Test
2018-03-08 13:54:09 INFO DomainInfo:160 - Starting Post-processing phase
2018-03-08 13:54:09 INFO DomainInfo:126 - Building annotation class map
2018-03-08 13:54:09 INFO DomainInfo:139 - Building interface class map for 0 classes
2018-03-08 13:54:09 INFO DomainInfo:215 - Post-processing complete
[error] (run-main-0) java.lang.IllegalArgumentException: Class class testdomain.Person is not a valid entity class. Please check the entity mapping.
[error] java.lang.IllegalArgumentException: Class class testdomain.Person is not a valid entity class. Please check the entity mapping.
[error] at org.neo4j.ogm.session.delegates.SaveDelegate.save(SaveDelegate.java:88)
[error] at org.neo4j.ogm.session.delegates.SaveDelegate.save(SaveDelegate.java:40)
[error] at org.neo4j.ogm.session.Neo4jSession.save(Neo4jSession.java:469)
[error] at testdomain.Test$.delayedEndpoint$testdomain$Test$1(Test.scala:32)
[error] at testdomain.Test$delayedInit$body.apply(Test.scala:26)
[error] at scala.Function0.apply$mcV$sp(Function0.scala:34)
[error] at scala.Function0.apply$mcV$sp$(Function0.scala:34)
[error] at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
[error] at scala.App.$anonfun$main$1$adapted(App.scala:76)
[error] at scala.collection.immutable.List.foreach(List.scala:389)
[error] at scala.App.main(App.scala:76)
[error] at scala.App.main$(App.scala:74)
[error] at testdomain.Test$.main(Test.scala:26)
[error] at testdomain.Test.main(Test.scala)
[error] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[error] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[error] at java.lang.reflect.Method.invoke(Unknown Source)
[error] at sbt.Run.invokeMain(Run.scala:93)
[error] at sbt.Run.run0(Run.scala:87)
[error] at sbt.Run.execute$1(Run.scala:65)
[error] at sbt.Run.$anonfun$run$4(Run.scala:77)
[error] at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
[error] at sbt.util.InterfaceUtil$$anon$1.get(InterfaceUtil.scala:10)
[error] at sbt.TrapExit$App.run(TrapExit.scala:252)
[error] at java.lang.Thread.run(Unknown Source)
[error] java.lang.RuntimeException: Nonzero exit code: 1
[error] at sbt.Run$.executeTrapExit(Run.scala:124)
[error] at sbt.Run.run(Run.scala:77)
[error] at sbt.Defaults$.$anonfun$bgRunTask$5(Defaults.scala:1169)
[error] at sbt.Defaults$.$anonfun$bgRunTask$5$adapted(Defaults.scala:1164)
[error] at sbt.internal.BackgroundThreadPool.$anonfun$run$1(DefaultBackgroundJobService.scala:366)
[error] at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
[error] at scala.util.Try$.apply(Try.scala:209)
[error] at sbt.internal.BackgroundThreadPool$BackgroundRunnable.run(DefaultBackgroundJobService.scala:289)
[error] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
[error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
[error] at java.lang.Thread.run(Unknown Source)
[error] (Compile / run) Nonzero exit code: 1
[error] Total time: 6 s, completed Mar 8, 2018 1:54:09 PM
I have searched high and low to try to resolve this issue. However, I am new at scala, so this must be something simple I am missing, right?
-skyfer
This issue has been resolved with a modification to the Neo4j OGM library. The details are in this issue on their github.

Play framework doesn't bind port in "Start" mode

If I run play run from my scala project root, it launches normally and I can test against it.
If I run play start, it does not bind to a port and there's no log output or any other indication that anything is wrong.
$ play run
[info] Loading project definition from /Users/Daenyth/myproject/project
[info] Set current project to myproject (in build file:/Users/Daenyth/myproject/)
--- (Running the application from SBT, auto-reloading is enabled) ---
[info] play - Listening for HTTP on /0:0:0:0:0:0:0:0%0:9000
(Server started, use Ctrl+D to stop and go back to the console...)
$ play start
[info] Loading project definition from /Users/Daenyth/Localytics/myproject/project
[info] Set current project to profile-api (in build file:/Users/Daenyth/myproject/)
(Starting server. Type Ctrl+D to exit logs, the server will remain in background)
If I start the app by using the launcher generated by play dist or play stage it shows me the process ID but it does not bind the port.
I'm at a loss on how to proceed here - googling hasn't returned anything useful at all.
Edit:
After leaving it running for quite a long time (at least 10 minutes, I'm not sure), it finally put this output:
[error] c.j.b.h.AbstractConnectionHook - Failed to obtain initial connection Sleeping for 0ms and trying again. Attempts left: 0. Exception: java.net.ConnectException: Connection timed out.Message:Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
Oops, cannot start the server.
Configuration error: Configuration error[Cannot connect to database [default]]
at play.api.Configuration$.play$api$Configuration$$configError(Configuration.scala:92)
at play.api.Configuration.reportError(Configuration.scala:570)
at play.api.db.BoneCPPlugin$$anonfun$onStart$1.apply(DB.scala:252)
at play.api.db.BoneCPPlugin$$anonfun$onStart$1.apply(DB.scala:243)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
at scala.collection.immutable.List.foreach(List.scala:318)
at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)
at scala.collection.AbstractTraversable.map(Traversable.scala:105)
at play.api.db.BoneCPPlugin.onStart(DB.scala:243)
at play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:88)
at play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:88)
at scala.collection.immutable.List.foreach(List.scala:318)
at play.api.Play$$anonfun$start$1.apply$mcV$sp(Play.scala:88)
at play.api.Play$$anonfun$start$1.apply(Play.scala:88)
at play.api.Play$$anonfun$start$1.apply(Play.scala:88)
at play.utils.Threads$.withContextClassLoader(Threads.scala:18)
at play.api.Play$.start(Play.scala:87)
at play.core.StaticApplication.<init>(ApplicationProvider.scala:52)
at play.core.server.NettyServer$.createServer(NettyServer.scala:243)
at play.core.server.NettyServer$$anonfun$main$3.apply(NettyServer.scala:279)
at play.core.server.NettyServer$$anonfun$main$3.apply(NettyServer.scala:274)
at scala.Option.map(Option.scala:145)
at play.core.server.NettyServer$.main(NettyServer.scala:274)
at play.core.server.NettyServer.main(NettyServer.scala)
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1116)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:344)
at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2332)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2369)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2153)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:792)
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:381)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:305)
at java.sql.DriverManager.getConnection(DriverManager.java:571)
at java.sql.DriverManager.getConnection(DriverManager.java:215)
at com.jolbox.bonecp.BoneCP.obtainRawInternalConnection(BoneCP.java:363)
at com.jolbox.bonecp.BoneCP.<init>(BoneCP.java:416)
at com.jolbox.bonecp.BoneCPDataSource.getConnection(BoneCPDataSource.java:120)
at play.api.db.BoneCPPlugin$$anonfun$onStart$1.apply(DB.scala:245)
... 22 more
Caused by: java.net.ConnectException: Connection timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at java.net.Socket.connect(Socket.java:528)
at java.net.Socket.<init>(Socket.java:425)
at java.net.Socket.<init>(Socket.java:241)
at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:257)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:294)
... 40 more
The issue here was that the mysql server that I had configured was not reachable from my local machine, and I had a mistake in my EC2 security group that prevented my deployed instance from connecting. The defaults for timeout and max retry are very high, so I didn't see it at first because it doesn't print anything if you ^C it.
Changing my network security rules solved the problem.

Maven build failure: Read time out

I have tried all the possible solutions found here, including:
find ~/.m2 -name "*.lastUpdated" -exec grep -q "Could not transfer" {} \; -print -exec rm {} \;
mvn -U clean
It does not work anyway, the specific log is as below:
btw: I was trying to run a struts2 sample code from mkyong site
[DEBUG] =======================================================================
[DEBUG] com.mkyong.common:Struts2Example:war:com.mkyong.common
[DEBUG] junit:junit:jar:3.8.1:test
[DEBUG] org.apache.struts:struts2-core:jar:2.1.8:compile
[DEBUG] com.opensymphony:xwork-core:jar:2.1.6:compile
[DEBUG] org.springframework:spring-test:jar:2.5.6:compile
[DEBUG] commons-logging:commons-logging:jar:1.1.1:compile
[DEBUG] org.freemarker:freemarker:jar:2.3.15:compile
[DEBUG] ognl:ognl:jar:2.7.3:compile
[DEBUG] commons-fileupload:commons-fileupload:jar:1.2.1:compile
[DEBUG] commons-io:commons-io:jar:1.3.2:compile
[DEBUG] com.sun:tools:jar:1.5.0:system
[DEBUG] org.apache.struts:struts2-convention-plugin:jar:2.1.8:compile
[DEBUG] Using connector WagonRepositoryConnector with priority 0 for http://repo
.maven.apache.org/maven2
Downloading: http://repo.maven.apache.org/maven2/org/apache/struts/struts2-core/
2.1.8/struts2-core-2.1.8.jar
[DEBUG] Writing resolution tracking file D:\ProgramData\apache-maven-repo\.m2\re
pository\org\apache\struts\struts2-core\2.1.8\struts2-core-2.1.8.jar.lastUpdated
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 52:31.162s
[INFO] Finished at: Fri Jan 18 20:16:49 CST 2013
[INFO] Final Memory: 2M/5M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project Struts2Example: Could not resolve depe
ndencies for project com.mkyong.common:Struts2Example:war:com.mkyong.common: Cou
ld not transfer artifact org.apache.struts:struts2-core:jar:2.1.8 from/to centra
l (http://repo.maven.apache.org/maven2): GET request of: org/apache/struts/strut
s2-core/2.1.8/struts2-core-2.1.8.jar from central failed: Read timed out -> [Hel
p 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal o
n project Struts2Example: Could not resolve dependencies for project com.mkyong.
common:Struts2Example:war:com.mkyong.common: Could not transfer artifact org.apa
che.struts:struts2-core:jar:2.1.8 from/to central (http://repo.maven.apache.org/
maven2): GET request of: org/apache/struts/struts2-core/2.1.8/struts2-core-2.1.8
.jar from central failed
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDe
pendencies(LifecycleDependencyResolver.java:210)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resol
veProjectDependencies(LifecycleDependencyResolver.java:117)
at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAr
eResolved(MojoExecutor.java:258)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:201)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBu
ild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl
eStarter.java:161)
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.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
cher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
352)
Caused by: org.apache.maven.project.DependencyResolutionException: Could not res
olve dependencies for project com.mkyong.common:Struts2Example:war:com.mkyong.co
mmon: Could not transfer artifact org.apache.struts:struts2-core:jar:2.1.8 from/
to central (http://repo.maven.apache.org/maven2): GET request of: org/apache/str
uts/struts2-core/2.1.8/struts2-core-2.1.8.jar from central failed
at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(D
efaultProjectDependenciesResolver.java:189)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDe
pendencies(LifecycleDependencyResolver.java:185)
... 22 more
Caused by: org.sonatype.aether.resolution.DependencyResolutionException: Could n
ot transfer artifact org.apache.struts:struts2-core:jar:2.1.8 from/to central (h
ttp://repo.maven.apache.org/maven2): GET request of: org/apache/struts/struts2-c
ore/2.1.8/struts2-core-2.1.8.jar from central failed
at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveDepe
ndencies(DefaultRepositorySystem.java:375)
at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(D
efaultProjectDependenciesResolver.java:183)
... 23 more
Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Could not
transfer artifact org.apache.struts:struts2-core:jar:2.1.8 from/to central (htt
p://repo.maven.apache.org/maven2): GET request of: org/apache/struts/struts2-cor
e/2.1.8/struts2-core-2.1.8.jar from central failed
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(Def
aultArtifactResolver.java:538)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArti
facts(DefaultArtifactResolver.java:216)
at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveDepe
ndencies(DefaultRepositorySystem.java:358)
... 24 more
Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not tra
nsfer artifact org.apache.struts:struts2-core:jar:2.1.8 from/to central (http://
repo.maven.apache.org/maven2): GET request of: org/apache/struts/struts2-core/2.
1.8/struts2-core-2.1.8.jar from central failed
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(W
agonRepositoryConnector.java:951)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(W
agonRepositoryConnector.java:941)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.
run(WagonRepositoryConnector.java:669)
at org.sonatype.aether.util.concurrency.RunnableErrorForwarder$1.run(Run
nableErrorForwarder.java:60)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.apache.maven.wagon.TransferFailedException: GET request of: org/a
pache/struts/struts2-core/2.1.8/struts2-core-2.1.8.jar from central failed
at org.apache.maven.wagon.AbstractWagon.getTransfer(AbstractWagon.java:3
49)
at org.apache.maven.wagon.AbstractWagon.getTransfer(AbstractWagon.java:3
10)
at org.apache.maven.wagon.AbstractWagon.getTransfer(AbstractWagon.java:2
87)
at org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:97)
at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.
run(WagonRepositoryConnector.java:601)
... 4 more
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at org.apache.maven.wagon.providers.http.httpclient.impl.io.AbstractSess
ionInputBuffer.read(AbstractSessionInputBuffer.java:187)
at org.apache.maven.wagon.providers.http.httpclient.impl.io.ContentLengt
hInputStream.read(ContentLengthInputStream.java:176)
at org.apache.maven.wagon.providers.http.httpclient.conn.EofSensorInputS
tream.read(EofSensorInputStream.java:138)
at org.apache.maven.wagon.AbstractWagon.transfer(AbstractWagon.java:493)
at org.apache.maven.wagon.AbstractWagon.getTransfer(AbstractWagon.java:3
39)
... 9 more
Read timed out means you have a network problem. Either repo.maven.apache.org is down (very unlikely) or you have connectivity issues on your end.
Read Timeout errors can also happen with big dependency resolution on slow networks (that you may not be able to fix by yourself). You may also want to consider this other thread, here you will find how to increase the Maven Wagon timeout which will help you in such cases.
Also check the official documentation for more details.
But using wget I am able to download instance. It is almost halt here..waited more than 15 mins..
INFO]
[INFO] --- maven-checkstyle-plugin:2.13:check (validate-checkstyle) # onos ---
[DEBUG] Using connector WagonRepositoryConnector with priority 0.0 for http://repo.maven.apache.org/maven2
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-module-xhtml/1.2/doxia-module-xhtml-1.2.pom
2/2 KB
Regards,
Bala