Hi, The ERROR logs are there because the Tcp connection was not terminated properly with a clean shutdown (FIN) but a connection reset (RST), which causes an error event in the stream. (The logging is a bit verbose here see https://github.com/akka/akka/issues/15349) In your test case this is not a real error but a false positive.
-Endre On Wed, Dec 31, 2014 at 12:54 PM, Allan Brighton <[email protected]> wrote: > Hi, > > I have a simple akka-http based server and client along with a test case > under https://github.com/abrighton/akka-http-test.git. > The test part looks like this: > > test("Test client and server") { > val server = TestServer() > val client = TestClient > > val file = makeTestFile() > > for { > id ← client.post(file) > exists1 ← client.head(id) > file1 ← client.get(id, file) > delete1 ← client.delete(id) > exists2 ← client.head(id) > } yield { > assert(id == HashGeneratorUtils.generateSHA1(file)) > assert(exists1) > assert(file1 == file) > assert(delete1) > assert(!exists2) > println("All Tests Passed") > server.shutdown() > client.shutdown() > file.delete() > } > } > > > > The test cases pass, but I get a bunch of internal akka errors logged: > > > test > 12:48:58.466 [pool-9-thread-1-ScalaTest-running-ClientServerTests] INFO > TestServer - Test server started > 12:48:58.999 [TestServer-akka.actor.default-dispatcher-2] INFO akka.event > .slf4j.Slf4jLogger - Slf4jLogger started > 12:48:59.106 [TestServer-akka.actor.default-dispatcher-2] INFO Remoting - > Starting remoting > 12:48:59.445 [TestServer-akka.actor.default-dispatcher-3] INFO Remoting - > Remoting started; listening on addresses :[akka.tcp:// > [email protected]:59705] > 12:48:59.949 [TestClient-akka.actor.default-dispatcher-3] INFO akka.event > .slf4j.Slf4jLogger - Slf4jLogger started > 12:48:59.962 [TestClient-akka.actor.default-dispatcher-3] INFO Remoting - > Starting remoting > 12:49:00.009 [TestClient-akka.actor.default-dispatcher-3] INFO Remoting - > Remoting started; listening on addresses :[akka.tcp:// > [email protected]:59706] > 12:49:00.053 [pool-9-thread-1-ScalaTest-running-ClientServerTests] INFO > TestClient - Uploading /var/folders/6w/s4pc9_ss0ll6dpdqxjsmq53c0000gn/T/ > 2001789562031682021.tmp to http: > //localhost:8549/3b71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3 > 12:49:00.473 [TestServer-akka.actor.default-dispatcher-14] INFO > TestServer - Accepted new connection from /127.0.0.1:59707 > 12:49:00.680 [TestServer-akka.actor.default-dispatcher-3] INFO TestServer > - Received POST request for /tmp/CsTestOversize/3b/ > 71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3 (uri = http: > //localhost:8549/3b71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3) > 12:49:00.860 [TestServer-akka.actor.default-dispatcher-15] INFO > TestServer - POST file is valid > 12:49:00.880 [ForkJoinPool-5-worker-3] INFO TestClient - Checking > existence of http: > //localhost:8549/3b71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3 > [info] ClientServerTests: > [info] - Test client and server > 12:49:00.940 [TestServer-akka.actor.default-dispatcher-4] INFO TestServer > - Accepted new connection from /127.0.0.1:59708 > 12:49:00.950 [TestServer-akka.actor.default-dispatcher-19] INFO > TestServer - Received HEAD request for /tmp/CsTestOversize/3b/ > 71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3 (uri = > http://localhost:8549/3b71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3) > (exists) > 12:49:00.955 [ForkJoinPool-5-worker-3] INFO TestClient - Downloading /var > /folders/6w/s4pc9_ss0ll6dpdqxjsmq53c0000gn/T/2001789562031682021.tmp from > http://localhost:8549/3b71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3 > 12:49:00.967 [TestServer-akka.actor.default-dispatcher-4] INFO TestServer > - Accepted new connection from /127.0.0.1:59709 > 12:49:00.975 [TestServer-akka.actor.default-dispatcher-16] INFO > TestServer - Received GET request for /tmp/CsTestOversize/3b/ > 71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3 (uri = http: > //localhost:8549/3b71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3) > 12:49:01.014 [TestServer-akka.actor.default-dispatcher-14] ERROR akka. > stream.impl.Broadcast - failure during processing > akka.stream.StreamTcpException: The connection closed with error > Connection reset by peer > 12:49:01.015 [TestServer-akka.actor.default-dispatcher-14] ERROR a.stream. > impl.SplitWhenProcessorImpl - failure during processing > akka.stream.StreamTcpException: The connection closed with error > Connection reset by peer > 12:49:01.015 [TestServer-akka.actor.default-dispatcher-14] ERROR akka. > stream.impl.PrefixAndTailImpl - failure during processing > akka.stream.StreamTcpException: The connection closed with error > Connection reset by peer > 12:49:01.015 [TestServer-akka.actor.default-dispatcher-14] ERROR akka. > stream.impl.ConcatAllImpl - failure during processing > akka.stream.StreamTcpException: The connection closed with error > Connection reset by peer > 12:49:01.015 [TestServer-akka.actor.default-dispatcher-14] ERROR a.stream. > impl.MapAsyncProcessorImpl - failure during processing > akka.stream.StreamTcpException: The connection closed with error > Connection reset by peer > [info] Run completed in 2 seconds, 880 milliseconds. > [info] Total number of tests run: 1 > [info] Suites: completed 1, aborted 0 > [info] Tests: succeeded 1, failed 0, canceled 0, ignored 0, pending 0 > [info] All tests passed. > [success] Total time: 3 s, completed 31-Dec-2014 12:49:01 > > XXX /var/folders/6w/s4pc9_ss0ll6dpdqxjsmq53c0000gn/T/ > 2001789562031682021.tmp is valid > 12:49:01.214 [ForkJoinPool-5-worker-3] INFO TestClient - Deleting http: > //localhost:8549/3b71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3 > 12:49:01.238 [TestServer-akka.actor.default-dispatcher-19] INFO > TestServer - Accepted new connection from /127.0.0.1:59710 > 12:49:01.245 [TestServer-akka.actor.default-dispatcher-3] INFO TestServer > - Received DELETE request for /tmp/CsTestOversize/3b/ > 71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3 (uri = http: > //localhost:8549/3b71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3) > 12:49:01.253 [ForkJoinPool-5-worker-3] INFO TestClient - Checking > existence of http: > //localhost:8549/3b71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3 > 12:49:01.256 [TestServer-akka.actor.default-dispatcher-4] ERROR akka. > stream.impl.Broadcast - failure during processing > akka.stream.StreamTcpException: The connection closed with error > Connection reset by peer > 12:49:01.258 [TestServer-akka.actor.default-dispatcher-2] ERROR a.stream. > impl.SplitWhenProcessorImpl - failure during processing > akka.stream.StreamTcpException: The connection closed with error > Connection reset by peer > 12:49:01.259 [TestServer-akka.actor.default-dispatcher-2] ERROR akka. > stream.impl.FlexiMergeImpl - failure during processing > akka.stream.StreamTcpException: The connection closed with error > Connection reset by peer > 12:49:01.259 [TestServer-akka.actor.default-dispatcher-2] ERROR akka. > stream.impl.PrefixAndTailImpl - failure during processing > akka.stream.StreamTcpException: The connection closed with error > Connection reset by peer > 12:49:01.259 [TestServer-akka.actor.default-dispatcher-2] ERROR akka. > stream.impl.ConcatAllImpl - failure during processing > akka.stream.StreamTcpException: The connection closed with error > Connection reset by peer > 12:49:01.259 [TestServer-akka.actor.default-dispatcher-2] ERROR a.stream. > impl.MapAsyncProcessorImpl - failure during processing > akka.stream.StreamTcpException: The connection closed with error > Connection reset by peer > 12:49:01.286 [TestServer-akka.actor.default-dispatcher-19] INFO > TestServer - Accepted new connection from /127.0.0.1:59711 > 12:49:01.295 [TestServer-akka.actor.default-dispatcher-4] INFO TestServer > - Received HEAD request for /tmp/CsTestOversize/3b/ > 71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3 (uri = > http://localhost:8549/3b71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3) > (not found) > 12:49:01.306 [TestServer-akka.actor.default-dispatcher-18] ERROR akka. > stream.impl.Broadcast - failure during processing > akka.stream.StreamTcpException: The connection closed with error > Connection reset by peer > 12:49:01.306 [TestServer-akka.actor.default-dispatcher-18] ERROR a.stream. > impl.SplitWhenProcessorImpl - failure during processing > akka.stream.StreamTcpException: The connection closed with error > Connection reset by peer > 12:49:01.307 [TestServer-akka.actor.default-dispatcher-18] ERROR akka. > stream.impl.PrefixAndTailImpl - failure during processing > akka.stream.StreamTcpException: The connection closed with error > Connection reset by peer > 12:49:01.307 [TestServer-akka.actor.default-dispatcher-18] ERROR akka. > stream.impl.ConcatAllImpl - failure during processing > akka.stream.StreamTcpException: The connection closed with error > Connection reset by peer > 12:49:01.307 [TestServer-akka.actor.default-dispatcher-18] ERROR a.stream. > impl.MapAsyncProcessorImpl - failure during processing > akka.stream.StreamTcpException: The connection closed with error > Connection reset by peer > All Tests Passed > 12:49:01.321 [TestClient-akka.actor.default-dispatcher-4] INFO a.r. > RemoteActorRefProvider$RemotingTerminator - Shutting down remote daemon. > 12:49:01.322 [TestServer-akka.actor.default-dispatcher-4] INFO a.r. > RemoteActorRefProvider$RemotingTerminator - Shutting down remote daemon. > 12:49:01.325 [TestServer-akka.actor.default-dispatcher-4] INFO a.r. > RemoteActorRefProvider$RemotingTerminator - Remote daemon shut down; > proceeding with flushing remote transports. > 12:49:01.327 [TestClient-akka.actor.default-dispatcher-4] INFO a.r. > RemoteActorRefProvider$RemotingTerminator - Remote daemon shut down; > proceeding with flushing remote transports. > 12:49:01.364 [TestClient-akka.actor.default-dispatcher-4] INFO a.r. > RemoteActorRefProvider$RemotingTerminator - Remoting shut down. > 12:49:01.365 [TestServer-akka.actor.default-dispatcher-3] INFO a.r. > RemoteActorRefProvider$RemotingTerminator - Remoting shut down. > > > Any idea what is causing the error messages? Is the code doing something > wrong? > > Thanks and happy new year! > > Allan > > -- > >>>>>>>>>> Read the docs: http://akka.io/docs/ > >>>>>>>>>> Check the FAQ: > http://doc.akka.io/docs/akka/current/additional/faq.html > >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user > --- > You received this message because you are subscribed to the Google Groups > "Akka User List" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/d/optout. > -- Akka Team Typesafe - The software stack for applications that scale Blog: letitcrash.com Twitter: @akkateam -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
