Re: [akka-user] Apparent thread leak with non-default akka dispatcher

2016-03-23 Thread Viktor Klang
Great story, Jesse. Thanks for sharing!

On Wed, Mar 23, 2016 at 3:12 PM, Jesse C  wrote:

> Here is what we've figured out. We've got a native library that contains a
> thread local member that includes a ZMQ socket. That socket is apparently
> not being correctly cleaned-up on thread death. ZMQ sockets are created
> from a ZMQ context, which creates 2 helper threads upon construction. Those
> are the threads we were leaking.
>
> The actor in Akka was invoking this native library. In our old code, using
> Scala's now-deprecated, built-in actor library, we had locked that actor to
> a single thread, so there was never any thread leakage. In Akka, we were
> using a Pinned dispatcher, with the understanding that that would result in
> the same behavior. The scalaDocs say "Dedicates a unique thread for each
> actor passed in as reference."
>
> The akka manual also adds "Note that it's not guaranteed that the *same*
> thread is used over time, since the core pool timeout is used for
> PinnedDispatcher to keep resource usage down in case of idle actors. To
> use the same thread all the time you need to add
> thread-pool-executor.allow-core-timeout=off to the configuration of the
> PinnedDispatcher."
>
> We missed that part. It might help others to have that added to the
> scaladocs.
>
> The solution that we've found to work is to set the allow-core-timeout to
> off and the thread-pool-executor.keep-alive-time to a really high number.
> With those settings we've now got the behavior we thought we were
> originally getting, where the actor is locked into a single thread for its
> entire lifetime.
>
> We're also looking at fixing the thread leak issue in the native library.
>
> Thanks for the responses.
>
> cheers
> jesse c
>
>
> --
> >> 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 https://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Cheers,
√

-- 
>>  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 https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] Apparent thread leak with non-default akka dispatcher

2016-03-23 Thread Jesse C
Here is what we've figured out. We've got a native library that contains a 
thread local member that includes a ZMQ socket. That socket is apparently 
not being correctly cleaned-up on thread death. ZMQ sockets are created 
from a ZMQ context, which creates 2 helper threads upon construction. Those 
are the threads we were leaking. 

The actor in Akka was invoking this native library. In our old code, using 
Scala's now-deprecated, built-in actor library, we had locked that actor to 
a single thread, so there was never any thread leakage. In Akka, we were 
using a Pinned dispatcher, with the understanding that that would result in 
the same behavior. The scalaDocs say "Dedicates a unique thread for each 
actor passed in as reference."  

The akka manual also adds "Note that it's not guaranteed that the *same* 
thread is used over time, since the core pool timeout is used for 
PinnedDispatcher to keep resource usage down in case of idle actors. To use 
the same thread all the time you need to add 
thread-pool-executor.allow-core-timeout=off to the configuration of the 
PinnedDispatcher."

We missed that part. It might help others to have that added to the 
scaladocs.

The solution that we've found to work is to set the allow-core-timeout to 
off and the thread-pool-executor.keep-alive-time to a really high number. 
With those settings we've now got the behavior we thought we were 
originally getting, where the actor is locked into a single thread for its 
entire lifetime.

We're also looking at fixing the thread leak issue in the native library.

Thanks for the responses.

cheers
jesse c


-- 
>>  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 https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] Re: Node quarantined

2016-03-23 Thread Benjamin Black
I look forward to trying out the new version. Not totally sure it is the 
same issue I'm seeing this happen on a cluster where no node is being 
restarted. I shall continue to investigate what has changed on my side, 
because I wasn't see this before I upgraded other libraries.

On Wednesday, March 23, 2016 at 2:08:10 AM UTC-4, Patrik Nordwall wrote:
>
> We have fixed the issue that is noticed as 
> "Error encountered while processing system message acknowledgement buffer: 
> [-1 {}] ack: ACK[6, {}]"
>
> https://github.com/akka/akka/pull/20093
>
> It will be released in 2.4.3 and 2.3.15, probably by end of next week.
>
> /Patrik
> tis 22 mars 2016 kl. 23:39 skrev Guido Medina  >:
>
>> Yeah sorry I thought it was related with rolling restart.
>>
>> As for Netty, I'm using a *non-published yet* Netty with the following 
>> fixes:
>>
>> https://github.com/netty/netty/issues?q=milestone%3A3.10.6.Final+is%3Aclosed
>>
>> You can just get it from Git and:
>>
>> $ git checkout 3.10
>> $ mvn versions:set -DnewVersion=3.10.6.Final -DgenerateBackupPoms=false
>> $ mvn clean install
>>
>> And see if your problem goes away,
>>
>> Guido.
>>
>> On Tuesday, March 22, 2016 at 10:27:26 PM UTC, Benjamin Black wrote:
>>>
>>> Hi Guido, yes I'm aware of the leaving cluster conversation as I started 
>>> it :-) This is separate issue. I am observing this behavior whilst the 
>>> cluster seems stable with no nodes being added/removed. I suspect that this 
>>> issue was first observed when I upgraded a different library that brought 
>>> in a new version of the netty library.
>>>
>>> On Tuesday, March 22, 2016 at 6:23:14 PM UTC-4, Guido Medina wrote:

 Hi Benjamin,

 You have nodes with predefined ports, one thing I have which eliminates 
 that problem for these nodes is that
 only my seed node(s) have the port set, the rest will just get a 
 dynamic and available port, making it get a different port when you
 do a rolling restart.

 I suspect you are doing a rolling restart right? so you need to wait 
 for that node with that address to completely leave the cluster (I'm also 
 doing that),
 basically you terminate your system when you receive the message 
 *MemberRemoved* for *_self_* address.

 I think I saw a discussion related to quarantine nodes when they are 
 re-joining using the same address, not sure if here or if it is an actual 
 Git ticket.

 HTH,

 Guido.

>>> -- 
>> >> 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+...@googlegroups.com .
>> To post to this group, send email to akka...@googlegroups.com 
>> .
>> Visit this group at https://groups.google.com/group/akka-user.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
>>  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 https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] What's status of porting spray-caching?

2016-03-23 Thread Nikolay Artamonov
Ok, thanks, Konrad! )


2016-03-23 13:12 GMT+03:00 Konrad Malawski :

>
> Hi all! According to early plans
>  by
> Jonas Boner spray-caching was expected to be part of akka-http module. For
> now I can't find any caching utilites in latest akka-http 2.4.2.
>
> Oh wow that's very early plans :) Some things changed over the years since
> that announcement - check the news posts on the Lightbend blog for roadmap
> updates.
>
>
> * Is spray-caching still supposed to be ported?
>
> While it's not a top priority right now, I think it would be nice to have
> it around - likely as separate mini project.
>
> I mean hey, it pretty much is exactly 4 files :-)
>
>
> * Are there recommended caching libraries to use with akka-http?
>
> You can make your own by basing it on top of:
> https://github.com/spray/spray/blob/master/spray-caching/src/main/scala/spray/caching/Cache.scala
>
> Which should be very much API compatible actually with Akka HTTP :)
>
>
> Happy hakking!
>
> -- Konrad
>



-- 
С уважением,
Артамонов Николай
mailto:nartamo...@gmail.com

-- 
>>  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 https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] akka streams

2016-03-23 Thread Madabhattula Rajesh Kumar
Hi Konard,

Thank you for the details.

Regards,
Rajesh

On Wed, Mar 23, 2016 at 4:22 PM, Konrad Malawski 
wrote:

> They're not experimental. They are included in Akka 2.4.2 - stable.
>
> You're probably referring to the "Old versions" part on akka.io/docs –
> don't use old versions ;-)
>
> --
> Cheers,
> Konrad 'ktoso’ Malawski
> Akka  @ Lightbend 
> 
>
> On 23 March 2016 at 11:51:05, Madabhattula Rajesh Kumar (
> mrajaf...@gmail.com) wrote:
>
> Hi,
>
> Why akka streams are in experimental state? Any API changes/architecture
> changes are happening in coming releases?
>
> Can we use akka streams in production?
>
> Regards,
> Rajesh
> --
> >> 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 https://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
>>  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 https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] akka streams

2016-03-23 Thread Konrad Malawski
They're not experimental. They are included in Akka 2.4.2 - stable.

You're probably referring to the "Old versions" part on akka.io/docs – don't 
use old versions ;-)

-- 
Cheers,
Konrad 'ktoso’ Malawski
Akka @ Lightbend

On 23 March 2016 at 11:51:05, Madabhattula Rajesh Kumar (mrajaf...@gmail.com) 
wrote:

Hi,

Why akka streams are in experimental state? Any API changes/architecture 
changes are happening in coming releases?

Can we use akka streams in production?

Regards,
Rajesh
--
>> 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 https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

-- 
>>  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 https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


[akka-user] akka streams

2016-03-23 Thread Madabhattula Rajesh Kumar
Hi,

Why akka streams are in experimental state? Any API changes/architecture 
changes are happening in coming releases?

Can we use akka streams in production?

Regards,
Rajesh

-- 
>>  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 https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] akka.actor.PreRestartException Happening whenever there is restart

2016-03-23 Thread Biniam Asnake
Thank you. I solved the issue by checking for *message.isEmpty()* rather 
than *null*.

@Override
void preRestart (Throwable reason, Option message) throws Exception {

log.error("preRestart called at ${self()}. Error: ${reason?.message}.")

if(!message.isEmpty()) {

self().tell(message.get(), sender())
log.error("preRestart: Resending message class: '${message.getClass()}' 
to ${self()}.")
}

super.preRestart(reason, message)
}




On Friday, March 11, 2016 at 3:45:52 PM UTC+1, Akka Team wrote:
>
> Option.get does not return null for an empty option, it throws an 
> exception.
>
> --
> Johan Andrén
> Akka Team, Lightbend Inc.
>

-- 
>>  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 https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] What's status of porting spray-caching?

2016-03-23 Thread Konrad Malawski

Hi all! According to early plans by Jonas Boner spray-caching was expected to 
be part of akka-http module. For now I can't find any caching utilites in 
latest akka-http 2.4.2.
Oh wow that's very early plans :) Some things changed over the years since that 
announcement - check the news posts on the Lightbend blog for roadmap updates.



* Is spray-caching still supposed to be ported?
While it's not a top priority right now, I think it would be nice to have it 
around - likely as separate mini project.

I mean hey, it pretty much is exactly 4 files :-)



* Are there recommended caching libraries to use with akka-http?
You can make your own by basing it on top of: 
https://github.com/spray/spray/blob/master/spray-caching/src/main/scala/spray/caching/Cache.scala

Which should be very much API compatible actually with Akka HTTP :)



Happy hakking!

-- Konrad

-- 
>>  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 https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] stash with big queues

2016-03-23 Thread Akka Team
Hi Tim,

The reason why this is O(n^2) because unstashAll puts back all stashed
elements to the mailbox again which is O(n) and in worst case you will do
this for every Nth element resulting in the quadratic behavior.

In such cases I recommend to use instead an explicit internal queue where
you drain elements to from the mailbox instead of putting onto the stash.
This complicates your actor a bit but in this case the queuing behavior is
part of your business logic.

-Endre

On Tue, Mar 22, 2016 at 1:28 PM, Tim Pigden  wrote:

> I've got an FSM with Stash, something like this
>
> when (Idle)
>   case Event(cmd: ...)
> process() // asynchronous activity
> goto Processing
>
>
> when(Processing)
>   case Event(updated:...)
> // do something with result
> unstashAll()
> goto (Idle)
>   case Event(cmd: ..)
> stash()
> stay
>
>
> There are periods where my process() cannot keep up with the incoming
> queue. This is not an intrinsic problem. But a problem appears to exist
> that if the queue gets sufficiently big, I spend more time doing unstashAll
> and restashing all the messages than I do processing. If my queue consists
> of n elements then I end up with O(n^2) stash and process events.
>
> I guess this means stash should not be used in cases other than queue is
> unlikely to get big. Is there a standard alternative or should I just go
> and write my own BigQueueStash ?
>
> I should add I don't think it ever gets so big that I should worry about
> back pressure - it's just queue management
>
>
>
>
>
>
>
>
>
>
>
>
> --
> >> 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 https://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Akka Team
Typesafe - Reactive apps on the JVM
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 https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] Re: Akka Supervisor Strategy

2016-03-23 Thread Akka Team
Hi,

The maxNrOfRetries parameter only applies to restarts: "the number of times
a child actor is allowed to be restarted, negative value means no limit, if
the limit is exceeded the child actor is stopped"

Please note though that the supervision block is similar to "receive" in
that you can safely access your actor's state, and "sender()" will point to
the actor being currently supervised. I.e. you can simply create a Map
storing ActorRef -> Int pairs (restart count for actor) to track resume
counts (you can store timestamps if you want to do a windowed approach).

-Endre


On Mon, Mar 21, 2016 at 10:08 PM, AS  wrote:

> instead of resume, if I use Restart ever thing works fine. But I don't
> want to use restart; which will initialize the actor.
>
>
> On Monday, March 21, 2016 at 11:15:19 AM UTC-5, AS wrote:
>>
>> Hi,
>>
>> I have setup supervisorStrategy as following in a supervisor ActorB, the
>> ActorC creates and ActorC.
>>
>> class ActorB extends Actor{
>>
>>   private var actorC: Option[ActorRef] = None
>>
>>
>>   override val supervisorStrategy = OneForOneStrategy(maxNrOfRetries = 2,
>>  withinTimeRange = FiniteDuration(1, TimeUnit.MINUTES),loggingEnabled = 
>> true) {
>>  case _: TimeoutException => Resume
>>  case _: AskTimeoutException => Resume
>>   }
>>
>>
>>   override def preStart(): Unit = {
>> actorC = Some(context.actorOf(ActorC.props, "actorC"))
>> context.watch(actorB.get)
>>   }
>>
>> }
>>
>>
>> The ActorA is supervisor for ActorB, my understanding is that ActorB will 
>> Resume 2 time in 1 minute in case of TimeoutException or AskTimeoutException 
>> and afterwards it will escalate to ActorA.
>>
>>
>>
>> class ActorA extends Actor{
>>
>>   private var actorB: Option[ActorRef] = None
>>
>>
>>   override val supervisorStrategy = OneForOneStrategy{
>>  case _: TimeoutException => Stop
>>  case _: AskTimeoutException => Stop
>>   }
>>
>>
>>   override def preStart(): Unit = {
>>  actorC = Some(context.actorOf(ActorB.props, "actorC"))
>>  context.watch(actorB.get)
>>   }
>>
>>
>> def receive: Receive = {
>>
>>   case t: Terminated => {
>> context.stop(self)
>> context.system.shutdown()
>>
>>   }
>>
>>
>> }
>>
>>
>> This means ActorA should shutdown system after 2 times resume strategy in 1 
>> minute, but I don't see it is happening, not sure where I a going wrong.
>>
>>
>> Thanks
>>
>> Arun
>>
>>
>> --
> >> 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 https://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Akka Team
Typesafe - Reactive apps on the JVM
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 https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


[akka-user] What's status of porting spray-caching?

2016-03-23 Thread Nikolay Artamonov
Hi all! According to early plans 
 by 
Jonas Boner spray-caching was expected to be part of akka-http module. For 
now I can't find any caching utilites in latest akka-http 2.4.2.

* Is spray-caching still supposed to be ported?
* Are there recommended caching libraries to use with akka-http?

Thanks!

-- 
>>  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 https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] Usage of EventFilters in akka.testkit

2016-03-23 Thread Roland Kuhn
Yes, indeed, thanks for sharing! It would be awesome if you could add this to 
the docs, if you don’t mind.

Regards,

Roland

> 23 mar 2016 kl. 10:17 skrev Sven Hodapp :
> 
> I've found a solution:
> 
>   EventFilter.info(pattern="log content", occurrences=1) intercept {
> ac ! Consume(...)
>   }
> 
> Regards,
> Sven 
> 
> Am Dienstag, 22. März 2016 09:13:13 UTC+1 schrieb Sven Hodapp:
> Dear reader,
> 
> I've seen in the documentation that it is possible to do assertions on Akka 
> log messages.
> 
> http://doc.akka.io/docs/akka/current/scala/testing.html#Expecting_Log_Messages
>  
> 
> 
> But the documentation is here a bit sparsely and doesn't explain how to do 
> "non-exception" assertions.
> You can give me an hint how to do it?
> 
> My current code looks similar to this:
> 
> class TheActorSpec(_system: ActorSystem)
>   extends TestKit(_system)
>   with ImplicitSender
>   with Matchers
>   with FlatSpecLike
>   with BeforeAndAfterAll {
> 
>   def this() = this(ActorSystem("testsystem", ConfigFactory.parseString("""
>   akka.loggers = ["akka.testkit.TestEventListener"]
>   """)))
> 
>   override def afterAll: Unit = {
> system.shutdown()
> system.awaitTermination(10.seconds)
>   }
> 
>   "An Actor" should "be able to assert log messages" in {
> val ac = TestActorRef(Props[TheActor])
> 
> ac ! Consume(...)
>  
> // Or with pattern="..."?
> EventFilter.info(message="the log content", 
> source=classOf[TheActor].getName, occurrences=1).assertDone(1.second)  
> 
>   }
> 
> }
> 
> But I get Stacktraces like "[...] java.lang.AssertionError: assertion failed: 
> 1 messages outstanding on InfoFilter [...]".
> Within TheActor Consume is log.info ("the log content") 
> called.
> 
> Anybody an idea what's wrong or how to use EventFilter correctly?
> 
> Thanks!
> 
> Regards,
> Sven
> 
> 
> -- 
> >> 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 https://groups.google.com/group/akka-user 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
>>  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 https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] Re: Node quarantined

2016-03-23 Thread Guido Medina
*Correction:* Set that only for non-seed nodes.

On Wednesday, March 23, 2016 at 9:38:44 AM UTC, Guido Medina wrote:
>
> Hi Benjamin,
>
> For what I could understand from the issue, this is happening only to 
> nodes that rejoined
> the cluster under the same address (host and port) so I believe that 
> setting
>
> akka.remote.netty.tcp.port = 0
>
> should solve the problem in the meantime,
>
> Cheers,
>
> Guido.
>

-- 
>>  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 https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] Re: Node quarantined

2016-03-23 Thread Guido Medina
Hi Benjamin,

For what I could understand from the issue, this is happening only to nodes 
that rejoined
the cluster under the same address (host and port) so I believe that setting

akka.remote.netty.tcp.port = 0

should solve the problem in the meantime,

Cheers,

Guido.

-- 
>>  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 https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] Re: Node quarantined

2016-03-23 Thread Patrik Nordwall
We have fixed the issue that is noticed as
"Error encountered while processing system message acknowledgement buffer:
[-1 {}] ack: ACK[6, {}]"

https://github.com/akka/akka/pull/20093

It will be released in 2.4.3 and 2.3.15, probably by end of next week.

/Patrik
tis 22 mars 2016 kl. 23:39 skrev Guido Medina :

> Yeah sorry I thought it was related with rolling restart.
>
> As for Netty, I'm using a *non-published yet* Netty with the following
> fixes:
>
> https://github.com/netty/netty/issues?q=milestone%3A3.10.6.Final+is%3Aclosed
>
> You can just get it from Git and:
>
> $ git checkout 3.10
> $ mvn versions:set -DnewVersion=3.10.6.Final -DgenerateBackupPoms=false
> $ mvn clean install
>
> And see if your problem goes away,
>
> Guido.
>
> On Tuesday, March 22, 2016 at 10:27:26 PM UTC, Benjamin Black wrote:
>>
>> Hi Guido, yes I'm aware of the leaving cluster conversation as I started
>> it :-) This is separate issue. I am observing this behavior whilst the
>> cluster seems stable with no nodes being added/removed. I suspect that this
>> issue was first observed when I upgraded a different library that brought
>> in a new version of the netty library.
>>
>> On Tuesday, March 22, 2016 at 6:23:14 PM UTC-4, Guido Medina wrote:
>>>
>>> Hi Benjamin,
>>>
>>> You have nodes with predefined ports, one thing I have which eliminates
>>> that problem for these nodes is that
>>> only my seed node(s) have the port set, the rest will just get a dynamic
>>> and available port, making it get a different port when you
>>> do a rolling restart.
>>>
>>> I suspect you are doing a rolling restart right? so you need to wait for
>>> that node with that address to completely leave the cluster (I'm also doing
>>> that),
>>> basically you terminate your system when you receive the message
>>> *MemberRemoved* for *_self_* address.
>>>
>>> I think I saw a discussion related to quarantine nodes when they are
>>> re-joining using the same address, not sure if here or if it is an actual
>>> Git ticket.
>>>
>>> HTH,
>>>
>>> Guido.
>>>
>> --
> >> 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 https://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
>>  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 https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.