That's something we'll have to take care of in the internals.
We have a ticket for this https://github.com/akka/akka/issues/15349 as well
as using the new dead-letter
<http://doc.akka.io/docs/akka/snapshot/java/event-bus.html#dead-letters>
suppresion <https://github.com/akka/akka/issues/15163> mechanism to make
error logging way cleaner soon <https://github.com/akka/akka/issues/16450>.

Please look forward to it! :-)

On Mon, Jan 12, 2015 at 7:55 PM, Allan Brighton <allane...@gmail.com> wrote:

> Is there some way to avoid getting these error messages in the log, or is
> that something that will be fixed in the next release?
> Is there any way that I can properly terminate the connection? It seems
> like all this is internal to akka-http.
>
> --
> Allan
>
> On Thursday, January 1, 2015 at 10:53:59 AM UTC+1, Akka Team wrote:
>>
>> 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 <alla...@gmail.com>
>> 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://TestServer@127.0.
>> 0.1: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://TestClient@127.0.
>> 0.1: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/71f43ff
>> 30f4b15b5cd85dd9e95ebc7e84eb5a3 (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/3b71f43ff30f4b15b5cd85dd9e95eb
>> c7e84eb5a3
>> [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/71f43ff
>> 30f4b15b5cd85dd9e95ebc7e84eb5a3 (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/71f43ff
>> 30f4b15b5cd85dd9e95ebc7e84eb5a3 (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/
>>
>> ...
>
>  --
> >>>>>>>>>> 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 akka-user+unsubscr...@googlegroups.com.
> To post to this group, send email to akka-user@googlegroups.com.
> 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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to