[akka-user] Re: How to configure cluster for two machines

2016-09-22 Thread Gerard W
Thanks maod...,

Please see my response to *√*

Regards

El jueves, 22 de septiembre de 2016, 10:10:52 (UTC-3), maod...@yahoo.com.cn 
escribió:
>
> you should set one of hos to start up with port 2552.
>
>
>
> 在 2016年9月22日星期四 UTC+8上午2:29:34,Gerard W写道:
>>
>> I'm using Akka 2.3.15 (java) and I'm trying to get a cluster with two 
>> members in two different hosts. Everything runs fine when I start the two 
>> nodes on a single machine, but then when I try to start up the second node 
>> on a different machine, it keeps getting "Association with remote system 
>> [...] has failed". 
>> I know I'm probably not configuring it right, but I don't know exactly 
>> how to do it.
>>
>> So in the hostA (ip 192.168.2.21) I'm running an actor on 2552 that joins 
>> successfully to the cluster. The application.conf looks like:
>>
>> akka {
>>   actor {
>> provider = "akka.cluster.ClusterActorRefProvider"
>>   }  
>>   remote {
>> log-remote-lifecycle-events = off
>> netty.tcp {
>>   hostname = "192.168.2.21"
>>   port = 0
>> }
>>   }
>>   cluster {
>> seed-nodes = [
>>   "akka.tcp://MulticastPocCluster@192.168.2.21:2552"]
>>
>>   }
>> }
>> akka.cluster.metrics.enabled=off
>> akka.extensions=["akka.cluster.metrics.ClusterMetricsExtension"]
>>
>> akka.cluster.metrics.native-library-extract-folder=${user.dir}/target/native
>>
>> I've copied everything over to hostB (ip 192.168.2.55), modified the 
>> application.conf file to:
>>
>> akka {
>>   actor {
>> provider = "akka.cluster.ClusterActorRefProvider"
>>   }
>>   remote {
>> log-remote-lifecycle-events = off
>> netty.tcp {
>>   hostname = "192.168.2.55"
>>   port = 0
>> }
>>   }
>>   cluster {
>> seed-nodes = [
>>   # Seed node in the other host
>>   "akka.tcp://MulticastPocCluster@192.168.2.21:2552"]
>>   }
>> }
>> akka.cluster.metrics.enabled=off
>> akka.extensions=["akka.cluster.metrics.ClusterMetricsExtension"]
>>
>> akka.cluster.metrics.native-library-extract-folder=${user.dir}/target/native
>>
>> I've verified that I can ping hostA from hostB by ip address. But I get 
>> this error when I try to start up an actor on hostB:
>>
>> INFO] [09/21/2016 12:52:53.229] 
>> [MulticastPocCluster-akka.remote.default-remote-dispatcher-6] [akka.tcp://
>> MulticastPocCluster@192.168.2.55:2552/system/transports/akkaprotocolmanager.tcp0/akkaProtocol-tcp%3A%2F%2FMulticastPocCluster%40192.168.2.21%3A2552-1]
>>  
>> No response from remote for outbound association. Associate timed out after 
>> [15000 ms].
>> [WARN] [09/21/2016 12:52:53.232] 
>> [MulticastPocCluster-akka.remote.default-remote-dispatcher-5] [akka.tcp://
>> MulticastPocCluster@192.168.2.55:2552/system/endpointManager/reliableEndpointWriter-akka.tcp%3A%2F%2FMulticastPocCluster%40192.168.2.21%3A2552-0]
>>  
>> Association with remote system [akka.tcp://
>> MulticastPocCluster@192.168.2.21:2552] has failed, address is now gated 
>> for [5000] ms. Reason: [Association failed with [akka.tcp://
>> MulticastPocCluster@192.168.2.21:2552]] Caused by: [No response from 
>> remote for outbound association. Associate timed out after [15000 ms].]
>>
>> Log from hostA:
>>
>> [INFO] [09/21/2016 12:51:14.402] [main] [akka.remote.Remoting] Starting 
>> remoting
>> [INFO] [09/21/2016 12:51:14.649] [main] [akka.remote.Remoting] Remoting 
>> started; listening on addresses :[akka.tcp://
>> MulticastPocCluster@192.168.2.21:2552]
>> [INFO] [09/21/2016 12:51:14.663] [main] 
>> [akka.cluster.Cluster(akka://MulticastPocCluster)] Cluster Node [akka.tcp://
>> MulticastPocCluster@192.168.2.21:2552] - Starting up...
>> [INFO] [09/21/2016 12:51:14.762] [main] 
>> [akka.cluster.Cluster(akka://MulticastPocCluster)] Cluster Node [akka.tcp://
>> MulticastPocCluster@192.168.2.21:2552] - Registered cluster JMX MBean 
>> [akka:type=Cluster]
>> [INFO] [09/21/2016 12:51:14.762] [main] 
>> [akka.cluster.Cluster(akka://MulticastPocCluster)] Cluster Node [akka.tcp://
>> MulticastPocCluster@192.168.2.21:2552] - Started up successfully
>> [INFO] [09/21/2016 12:51:14.796] 
>> [MulticastPocCluster-akka.actor.default-dispatcher-2] 
>> [akka.cluster.Cluster(akka://MulticastPocCluster)] Cluster Node [akka.tcp://
>> MulticastPocCluster@192.168.2.21:2552] - Node [akka.tcp://
>> MulticastPocCluster@192.168.2.21:2552] is JOINING, roles []
>> [INFO] [09/21/2016 12:51:14.809] 
>> [MulticastPocCluster-akka.actor.default-dispatcher-2] 
>> [akka.cluster.Cluster(akka://MulticastPocCluster)] Cluster Node [akka.tcp://
>> MulticastPocCluster@192.168.2.21:2552] - Leader is moving node 
>> [akka.tcp://MulticastPocCluster@192.168.2.21:2552] to [Up]
>> sep 21, 2016 12:51:15 PM kamon.sigar.SigarProvisioner provision
>> ADVERTENCIA: Sigar library is already provisioned.
>> [INFO] [09/21/2016 12:51:15.376] 
>> [MulticastPocCluster-akka.actor.default-dispatcher-3] 
>> [akka.cluster.Cluster(akka://MulticastPocCluster)] Cluster Node [akka.tcp://
>> MulticastPocCluster@192.168.2.21:2552] - Metrics collection has started 
>> 

Re: [akka-user] How to configure cluster for two machines

2016-09-22 Thread Gerard W
I'm sorry, I did not mention (nor remember :-P) that I was overriding that 
configuration setting to 2552 in my java code.
So, to make it coherent I removed the override from the code and changed 
the configuration of HostA to the following:

akka {
  actor {
provider = "akka.cluster.ClusterActorRefProvider"
  }
  remote {
log-remote-lifecycle-events = off
netty.tcp {
  hostname = "192.168.2.21"
  port = 2552
}
  }
  cluster {
seed-nodes = [
  "akka.tcp://MulticastPocCluster@192.168.2.21:2552"]
  }
}
akka.cluster.metrics.enabled=off
akka.extensions=["akka.cluster.metrics.ClusterMetricsExtension"]
akka.cluster.metrics.native-library-extract-folder=${user.dir}/target/native

In hostB the configuration remains unchanged:

akka {
  actor {
provider = "akka.cluster.ClusterActorRefProvider"
  }
  remote {
log-remote-lifecycle-events = off
netty.tcp {
  hostname = "192.168.2.55"
  port = 0
}
  }
  cluster {
seed-nodes = [
  # Seed node in the other host
  "akka.tcp://MulticastPocCluster@192.168.2.21:2552"]
  }
}
akka.cluster.metrics.enabled=off
akka.extensions=["akka.cluster.metrics.ClusterMetricsExtension"]
akka.cluster.metrics.native-library-extract-folder=${user.dir}/target/native

Again, when I try to start up the actor on HostB, I get the same error as 
in my previous post:

[INFO] [09/22/2016 11:21:45.895] 
[MulticastPocCluster-akka.remote.default-remote-dispatcher-6] 
[akka.tcp://MulticastPocCluster@192.168.2.55:51361/system/transports/akkaprotocolmanager.tcp0/akkaProtocol-tcp%3A%2F%2FMulticastPocCluster%40192.168.2.21%3A2552-1]
 
No response from remote for outbound association. Associate timed out after 
[15000 ms].
[WARN] [09/22/2016 11:21:45.899] 
[MulticastPocCluster-akka.remote.default-remote-dispatcher-5] 
[akka.tcp://MulticastPocCluster@192.168.2.55:51361/system/endpointManager/reliableEndpointWriter-akka.tcp%3A%2F%2FMulticastPocCluster%40192.168.2.21%3A2552-0]
 
Association with remote system 
[akka.tcp://MulticastPocCluster@192.168.2.21:2552] has failed, address is 
now gated for [5000] ms. Reason: [Association failed with 
[akka.tcp://MulticastPocCluster@192.168.2.21:2552]] Caused by: [No response 
from remote for outbound association. Associate timed out after [15000 ms].]

Log from hostA:

[INFO] [09/22/2016 11:20:59.344] [main] [akka.remote.Remoting] Starting 
remoting
[INFO] [09/22/2016 11:20:59.610] [main] [akka.remote.Remoting] Remoting 
started; listening on addresses 
:[akka.tcp://MulticastPocCluster@192.168.2.21:2552]
[INFO] [09/22/2016 11:20:59.625] [main] 
[akka.cluster.Cluster(akka://MulticastPocCluster)] Cluster Node 
[akka.tcp://MulticastPocCluster@192.168.2.21:2552] - Starting up...
[INFO] [09/22/2016 11:20:59.722] [main] 
[akka.cluster.Cluster(akka://MulticastPocCluster)] Cluster Node 
[akka.tcp://MulticastPocCluster@192.168.2.21:2552] - Registered cluster JMX 
MBean [akka:type=Cluster]
[INFO] [09/22/2016 11:20:59.722] [main] 
[akka.cluster.Cluster(akka://MulticastPocCluster)] Cluster Node 
[akka.tcp://MulticastPocCluster@192.168.2.21:2552] - Started up successfully
[INFO] [09/22/2016 11:20:59.757] 
[MulticastPocCluster-akka.actor.default-dispatcher-2] 
[akka.cluster.Cluster(akka://MulticastPocCluster)] Cluster Node 
[akka.tcp://MulticastPocCluster@192.168.2.21:2552] - Node 
[akka.tcp://MulticastPocCluster@192.168.2.21:2552] is JOINING, roles []
[INFO] [09/22/2016 11:20:59.770] 
[MulticastPocCluster-akka.actor.default-dispatcher-2] 
[akka.cluster.Cluster(akka://MulticastPocCluster)] Cluster Node 
[akka.tcp://MulticastPocCluster@192.168.2.21:2552] - Leader is moving node 
[akka.tcp://MulticastPocCluster@192.168.2.21:2552] to [Up]
sep 22, 2016 11:21:00 AM kamon.sigar.SigarProvisioner provision
ADVERTENCIA: Sigar library is already provisioned.
[INFO] [09/22/2016 11:21:00.324] 
[MulticastPocCluster-akka.actor.default-dispatcher-15] 
[akka.cluster.Cluster(akka://MulticastPocCluster)] Cluster Node 
[akka.tcp://MulticastPocCluster@192.168.2.21:2552] - Metrics collection has 
started successfully

Log from hostB:

[INFO] [09/22/2016 11:21:30.579] [main] [akka.remote.Remoting] Starting 
remoting
[INFO] [09/22/2016 11:21:30.749] [main] [akka.remote.Remoting] Remoting 
started; listening on addresses 
:[akka.tcp://MulticastPocCluster@192.168.2.55:51361]
[INFO] [09/22/2016 11:21:30.759] [main] 
[akka.cluster.Cluster(akka://MulticastPocCluster)] Cluster Node 
[akka.tcp://MulticastPocCluster@192.168.2.55:51361] - Starting up...
[INFO] [09/22/2016 11:21:30.829] [main] 
[akka.cluster.Cluster(akka://MulticastPocCluster)] Cluster Node 
[akka.tcp://MulticastPocCluster@192.168.2.55:51361] - Registered cluster 
JMX MBean [akka:type=Cluster]
[INFO] [09/22/2016 11:21:30.829] [main] 
[akka.cluster.Cluster(akka://MulticastPocCluster)] Cluster Node 
[akka.tcp://MulticastPocCluster@192.168.2.55:51361] - Started up 
successfully
sep 22, 2016 11:21:30 AM kamon.sigar.SigarProvisioner provision
ADVERTENCIA: Sigar library is already 

Re: [akka-user] Akka-Http The Connection Pool Gets Stuck sometimes

2016-09-22 Thread 'Eli Orzitzer' via Akka User List
No, I do consume the databytes.

On Thursday, September 22, 2016 at 5:37:40 PM UTC+3, √ wrote:
>
> Are you forgetting to consume the request body?
>
> -- 
> Cheers,
> √
>
> On Sep 22, 2016 15:10, "'Eli Orzitzer' via Akka User List" <
> akka...@googlegroups.com > wrote:
>
>> Hi,
>>
>> I have a stream that periodically does http outgoing request using the 
>> super pool.
>>
>> It seems that if I set the time between the http requests to be 30 
>> seconds, the http is stuck (verified using log before the http the after, 
>> the one after never gets printed)
>>
>> Also, if there is a failure during the http and I immediately retry the 
>> request (using Retry from contrib) the http is stuck again. For this 
>> scenario I can post a simple reproducer.
>>
>> For both cases sending the request only after 40 seconds solves the issue.
>>
>>
>> Is this a bug or am I missing something?
>>
>> Thanks!
>> Eli
>>
>> -- 
>> >> 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] Akka-Http The Connection Pool Gets Stuck sometimes

2016-09-22 Thread Viktor Klang
Are you forgetting to consume the request body?

-- 
Cheers,
√

On Sep 22, 2016 15:10, "'Eli Orzitzer' via Akka User List" <
akka-user@googlegroups.com> wrote:

> Hi,
>
> I have a stream that periodically does http outgoing request using the
> super pool.
>
> It seems that if I set the time between the http requests to be 30
> seconds, the http is stuck (verified using log before the http the after,
> the one after never gets printed)
>
> Also, if there is a failure during the http and I immediately retry the
> request (using Retry from contrib) the http is stuck again. For this
> scenario I can post a simple reproducer.
>
> For both cases sending the request only after 40 seconds solves the issue.
>
>
> Is this a bug or am I missing something?
>
> Thanks!
> Eli
>
> --
> >> 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] Re: How to configure cluster for two machines

2016-09-22 Thread maodihao
you should set one of hos to start up with port 2552.



在 2016年9月22日星期四 UTC+8上午2:29:34,Gerard W写道:
>
> I'm using Akka 2.3.15 (java) and I'm trying to get a cluster with two 
> members in two different hosts. Everything runs fine when I start the two 
> nodes on a single machine, but then when I try to start up the second node 
> on a different machine, it keeps getting "Association with remote system 
> [...] has failed". 
> I know I'm probably not configuring it right, but I don't know exactly how 
> to do it.
>
> So in the hostA (ip 192.168.2.21) I'm running an actor on 2552 that joins 
> successfully to the cluster. The application.conf looks like:
>
> akka {
>   actor {
> provider = "akka.cluster.ClusterActorRefProvider"
>   }  
>   remote {
> log-remote-lifecycle-events = off
> netty.tcp {
>   hostname = "192.168.2.21"
>   port = 0
> }
>   }
>   cluster {
> seed-nodes = [
>   "akka.tcp://MulticastPocCluster@192.168.2.21:2552"]
>
>   }
> }
> akka.cluster.metrics.enabled=off
> akka.extensions=["akka.cluster.metrics.ClusterMetricsExtension"]
>
> akka.cluster.metrics.native-library-extract-folder=${user.dir}/target/native
>
> I've copied everything over to hostB (ip 192.168.2.55), modified the 
> application.conf file to:
>
> akka {
>   actor {
> provider = "akka.cluster.ClusterActorRefProvider"
>   }
>   remote {
> log-remote-lifecycle-events = off
> netty.tcp {
>   hostname = "192.168.2.55"
>   port = 0
> }
>   }
>   cluster {
> seed-nodes = [
>   # Seed node in the other host
>   "akka.tcp://MulticastPocCluster@192.168.2.21:2552"]
>   }
> }
> akka.cluster.metrics.enabled=off
> akka.extensions=["akka.cluster.metrics.ClusterMetricsExtension"]
>
> akka.cluster.metrics.native-library-extract-folder=${user.dir}/target/native
>
> I've verified that I can ping hostA from hostB by ip address. But I get 
> this error when I try to start up an actor on hostB:
>
> INFO] [09/21/2016 12:52:53.229] 
> [MulticastPocCluster-akka.remote.default-remote-dispatcher-6] [akka.tcp://
> MulticastPocCluster@192.168.2.55:2552/system/transports/akkaprotocolmanager.tcp0/akkaProtocol-tcp%3A%2F%2FMulticastPocCluster%40192.168.2.21%3A2552-1]
>  
> No response from remote for outbound association. Associate timed out after 
> [15000 ms].
> [WARN] [09/21/2016 12:52:53.232] 
> [MulticastPocCluster-akka.remote.default-remote-dispatcher-5] [akka.tcp://
> MulticastPocCluster@192.168.2.55:2552/system/endpointManager/reliableEndpointWriter-akka.tcp%3A%2F%2FMulticastPocCluster%40192.168.2.21%3A2552-0]
>  
> Association with remote system [akka.tcp://
> MulticastPocCluster@192.168.2.21:2552] has failed, address is now gated 
> for [5000] ms. Reason: [Association failed with [akka.tcp://
> MulticastPocCluster@192.168.2.21:2552]] Caused by: [No response from 
> remote for outbound association. Associate timed out after [15000 ms].]
>
> Log from hostA:
>
> [INFO] [09/21/2016 12:51:14.402] [main] [akka.remote.Remoting] Starting 
> remoting
> [INFO] [09/21/2016 12:51:14.649] [main] [akka.remote.Remoting] Remoting 
> started; listening on addresses :[akka.tcp://
> MulticastPocCluster@192.168.2.21:2552]
> [INFO] [09/21/2016 12:51:14.663] [main] 
> [akka.cluster.Cluster(akka://MulticastPocCluster)] Cluster Node [akka.tcp://
> MulticastPocCluster@192.168.2.21:2552] - Starting up...
> [INFO] [09/21/2016 12:51:14.762] [main] 
> [akka.cluster.Cluster(akka://MulticastPocCluster)] Cluster Node [akka.tcp://
> MulticastPocCluster@192.168.2.21:2552] - Registered cluster JMX MBean 
> [akka:type=Cluster]
> [INFO] [09/21/2016 12:51:14.762] [main] 
> [akka.cluster.Cluster(akka://MulticastPocCluster)] Cluster Node [akka.tcp://
> MulticastPocCluster@192.168.2.21:2552] - Started up successfully
> [INFO] [09/21/2016 12:51:14.796] 
> [MulticastPocCluster-akka.actor.default-dispatcher-2] 
> [akka.cluster.Cluster(akka://MulticastPocCluster)] Cluster Node [akka.tcp://
> MulticastPocCluster@192.168.2.21:2552] - Node [akka.tcp://
> MulticastPocCluster@192.168.2.21:2552] is JOINING, roles []
> [INFO] [09/21/2016 12:51:14.809] 
> [MulticastPocCluster-akka.actor.default-dispatcher-2] 
> [akka.cluster.Cluster(akka://MulticastPocCluster)] Cluster Node [akka.tcp://
> MulticastPocCluster@192.168.2.21:2552] - Leader is moving node 
> [akka.tcp://MulticastPocCluster@192.168.2.21:2552] to [Up]
> sep 21, 2016 12:51:15 PM kamon.sigar.SigarProvisioner provision
> ADVERTENCIA: Sigar library is already provisioned.
> [INFO] [09/21/2016 12:51:15.376] 
> [MulticastPocCluster-akka.actor.default-dispatcher-3] 
> [akka.cluster.Cluster(akka://MulticastPocCluster)] Cluster Node [akka.tcp://
> MulticastPocCluster@192.168.2.21:2552] - Metrics collection has started 
> successfully
>
> Log from hostB:
>
> [INFO] [09/21/2016 12:52:37.915] [main] [akka.remote.Remoting] Starting 
> remoting
> [INFO] [09/21/2016 12:52:38.087] [main] [akka.remote.Remoting] Remoting 
> started; listening on addresses :[akka.tcp://
> 

[akka-user] Akka-Http The Connection Pool Gets Stuck sometimes

2016-09-22 Thread 'Eli Orzitzer' via Akka User List
Hi,

I have a stream that periodically does http outgoing request using the 
super pool.

It seems that if I set the time between the http requests to be 30 seconds, 
the http is stuck (verified using log before the http the after, the one 
after never gets printed)

Also, if there is a failure during the http and I immediately retry the 
request (using Retry from contrib) the http is stuck again. For this 
scenario I can post a simple reproducer.

For both cases sending the request only after 40 seconds solves the issue.


Is this a bug or am I missing something?

Thanks!
Eli

-- 
>>  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] Re: [akka-http] String cannot be cast to Message

2016-09-22 Thread 'Johannes Rudolph' via Akka User List
Hi Ronny,

I agree that error message is little helpful. Maybe you are sending plain 
Strings to the actor created by Source.actorRef? (Still we might want to 
improve the error message in that case.)

Johannes

On Monday, September 19, 2016 at 12:08:52 AM UTC+2, Ronny Bräunlich wrote:
>
> Hi everyone,
>
> I am quite new to Akka and Websockets. I tried to create a simple 
> Websocket server using Akka HTTP following mostly this example [1].
> Everytime I send a message to my own server I get the following exception:
>
> [ERROR] [09/18/2016 15:37:01.533] 
> [default-akka.actor.default-dispatcher-4] 
> [akka.actor.ActorSystemImpl(default)] WebSocket handler failed with 
> java.lang.String cannot be cast to akka.http.javadsl.model.ws.Message
> java.lang.ClassCastException: java.lang.String cannot be cast to 
> akka.http.javadsl.model.ws.Message
> at akka.stream.impl.fusing.Map$$anon$8.onPush(Ops.scala:42)
> at 
> akka.stream.impl.fusing.GraphInterpreter.processPush(GraphInterpreter.scala:747)
> at 
> akka.stream.impl.fusing.GraphInterpreter.processEvent(GraphInterpreter.scala:710)
> at 
> akka.stream.impl.fusing.GraphInterpreter.execute(GraphInterpreter.scala:616)
> at 
> akka.stream.impl.fusing.GraphInterpreterShell.runBatch(ActorGraphInterpreter.scala:471)
> at 
> akka.stream.impl.fusing.GraphInterpreterShell.receive(ActorGraphInterpreter.scala:410)
> at 
> akka.stream.impl.fusing.ActorGraphInterpreter.akka$stream$impl$fusing$ActorGraphInterpreter$$processEvent(ActorGraphInterpreter.scala:603)
> at 
> akka.stream.impl.fusing.ActorGraphInterpreter$$anonfun$receive$1.applyOrElse(ActorGraphInterpreter.scala:618)
> at akka.actor.Actor.aroundReceive(Actor.scala:484)
> at akka.actor.ActorCell.receiveMessage(ActorCell.scala:526)
> at akka.actor.ActorCell.invoke(ActorCell.scala:495)
> at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:257)
> at akka.dispatch.Mailbox.run(Mailbox.scala:224)
> at akka.dispatch.Mailbox.exec(Mailbox.scala:234)
> at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
> at 
> java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
> at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
> at 
> java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
>
> Currently, I have no idea why it crashes like this because the method 
> handleWebSocketMessages() expects a Flow so there is 
> no chance I could use a String. Did I miss some configuration for implicit 
> conversion?
>
> You can see the server here [2] and the client here [3]. I am using Akka 
> HTTP Core and Experimental 2.12.0-RC1 version 2.4.10.
>
>
> Thank you for your help.
>
> Cheers,
> Ronny
>
> [1] 
> http://markatta.com/codemonkey/blog/2016/04/18/chat-with-akka-http-websockets/
> [2] https://gist.github.com/rbraeunlich/e2582075e2ccc0fd63580bdd95585aa5
> [3] https://gist.github.com/rbraeunlich/eded91382d72a3d90e8182ca1b077d01
>

-- 
>>  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] Streams - Tcp outgoing reconnecting

2016-09-22 Thread Konrad Malawski
Please check akka/* repositories :-)
Such as akka/akka-stream-contrib – akka-contrib-extra is not a supported
thing and was mostly driven by conductr some time ago, not very alive right
now.

In fact, we do have new reconnection facilities in that repo:
https://github.com/akka/akka-stream-contrib/blob/master/contrib/src/main/scala/akka/stream/contrib/Retry.scala

-- 
Konrad `ktoso` Malawski
Akka  @ Lightbend 

On 22 September 2016 at 01:13:03, Ladislav Skokan (sko...@gmail.com) wrote:

Hi

I try to implement TCP outgoing stream and I need to reconnect if TCP
server restarts. I found that there was a reconnecting pattern in Akka
streams and it was removed here


What is the best way to reconnect client socket today. Any code example
somewhere?

Thank you, Ladislav.

--
>> 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] Streams - Tcp outgoing reconnecting

2016-09-22 Thread Ladislav Skokan
Hi

I try to implement TCP outgoing stream and I need to reconnect if TCP 
server restarts. I found that there was a reconnecting pattern in Akka 
streams and it was removed here 
 

What is the best way to reconnect client socket today. Any code example 
somewhere?

Thank you, Ladislav.

-- 
>>  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] out-of-the-box support for json serialization for akka persistence?

2016-09-22 Thread Morten Kjetland
Hi,

We have been using Akka Persistence with Json-serialization (Jackson) in
production for almost two years now, and it has been a great success.

Since we currently have more than 10 different applications using this
technique, we build some common utilities and addons that we are using.
We opensources this code a year ago:
https://github.com/NextGenTel/akka-tools

It contains akka-tools-json-serializing

which
is a akka-serializer using Jackson. In addition to the normal easy
json-schema-evolving when adding new properties, it also has build in
support for breaking schema-changes (we have used this in also production).

At the time we started, there was no other jdbc-journal-plugin, so we wrote
our own: akka-tools-jdbc-journal

-
We have only used it with Oracle and H2, but I guess it would also work
with Postgres - If not, I would be happy to help you make it work.

When using our akka-tools-jdbc-journal

in
combination with akka-tools-json-serializing

you
get a "killer feature" :) .. We write the json as plain-text in an extra
write-only-column.
This way you can do a manual select from the journal-table and see for your
own what the events looks like.

-Morten


On Wed, Sep 21, 2016 at 10:02 PM Patrik Nordwall 
wrote:

> For Lagom I wrote json serializer that is using Jackson. You can look at
> it for inspiration. It's stored in Cassandra as bytes, but how it's stored
> is less important as far as I can see.
>
> /Patrik
> ons 21 sep. 2016 kl. 17:58 skrev Tim Pigden :
>
>> Hi Justin
>> Thanks for the comments. However, as I said I have decided that I do want
>> to use json asa format, so I'm really looking to see who has direct
>> experience of that.
>> The serialization format is less orthogonal that you might expect, given
>> that the database table layouts are all part of the plugin and as far as I
>> can see, all use blob rather than json format with no obvious way to change
>> that.
>> And yes the json-ness does make a difference to me. Without going into
>> elaborate CQRS "Q" coding, it will enable the developers to find out about
>> how the system is being used, what sort of messages are being created with
>> what payloads, through simple sql. My increased data volumes are extremely
>> unlikely to burden a single server db in the short to medium term.
>>
>> Tim
>>
>>
>> On Wednesday, September 21, 2016 at 2:58:27 PM UTC+1, Justin du coeur
>> wrote:
>>
>>> A few general reactions (personally, I'm using Kryo over Cassandra, so I
>>> can't address the direct questions):
>>>
>>> Keep in mind that json is a relatively bulky serialization format --
>>> it's going to take rather more disk space than more typical options like
>>> protobuf.
>>>
>>> In *general*, the serialization format and database are pretty
>>> orthogonal concerns.  It's possible that json might have specific
>>> advantages when used with a json-native DB like Mongo, but AFAICT the
>>> Cassandra driver is the most mature in general.  Are you planning on using
>>> the json-ness in some particular way?
>>>
>>> Finally, remember that json doesn't save you from all the complications
>>> of schema evolution: you're still going to need to think about how you deal
>>> with missing fields, name changes, and stuff like that.  It's probably a
>>> bit easier than Kryo, but only a bit.  Schema evolution is a real bear --
>>> making sure I can deal with it took most of my effort in getting
>>> Persistence up and running...
>>>
>> On Wed, Sep 21, 2016 at 9:16 AM, Tim Pigden  wrote:
>>>
>> Hi
 Reading

 http://doc.akka.io/docs/akka/2.4.10/scala/persistence-schema-evolution.html

 and thinking about what we currently do, I've concluded that I'd like
 to serialize my events as json.
 The article suggests I should check the list of plugins to see which
 specifically support json. But I can't find clear indications that any of
 them do from the respective github pages (apologies if I've missed
 something). Most seem to want the target database tables to be a BLOB with
 no option of a native json type.

 My current database target is Postgres (because we use postgis for
 mapping and because I need a proper sql database for data warehouse).
 However, for the event serialization I could certainly contemplate
 something else if it made the current development path quicker and easier.
 MongoDB or Cassandra are obvious possible targets.

 So my question is: is anyone actually using json as a serialization
 format, and if so
 a) what database and driver?
 b) is the database-native json 

Re: [akka-user] out-of-the-box support for json serialization for akka persistence?

2016-09-22 Thread Jan-Pieter van den Heuvel
Hi Tim,

You might also have a look at Stamina 
. Keep in mind that this only has 
support for spray-json.

Kind regards,
Jan-Pieter

Op woensdag 21 september 2016 22:02:47 UTC+2 schreef Patrik Nordwall:
>
> For Lagom I wrote json serializer that is using Jackson. You can look at 
> it for inspiration. It's stored in Cassandra as bytes, but how it's stored 
> is less important as far as I can see.
>
> /Patrik
> ons 21 sep. 2016 kl. 17:58 skrev Tim Pigden  >:
>
>> Hi Justin
>> Thanks for the comments. However, as I said I have decided that I do want 
>> to use json asa format, so I'm really looking to see who has direct 
>> experience of that. 
>> The serialization format is less orthogonal that you might expect, given 
>> that the database table layouts are all part of the plugin and as far as I 
>> can see, all use blob rather than json format with no obvious way to change 
>> that.
>> And yes the json-ness does make a difference to me. Without going into 
>> elaborate CQRS "Q" coding, it will enable the developers to find out about 
>> how the system is being used, what sort of messages are being created with 
>> what payloads, through simple sql. My increased data volumes are extremely 
>> unlikely to burden a single server db in the short to medium term.
>>
>> Tim
>>
>>
>> On Wednesday, September 21, 2016 at 2:58:27 PM UTC+1, Justin du coeur 
>> wrote:
>>
>>> A few general reactions (personally, I'm using Kryo over Cassandra, so I 
>>> can't address the direct questions):
>>>
>>> Keep in mind that json is a relatively bulky serialization format -- 
>>> it's going to take rather more disk space than more typical options like 
>>> protobuf.
>>>
>>> In *general*, the serialization format and database are pretty 
>>> orthogonal concerns.  It's possible that json might have specific 
>>> advantages when used with a json-native DB like Mongo, but AFAICT the 
>>> Cassandra driver is the most mature in general.  Are you planning on using 
>>> the json-ness in some particular way?
>>>
>>> Finally, remember that json doesn't save you from all the complications 
>>> of schema evolution: you're still going to need to think about how you deal 
>>> with missing fields, name changes, and stuff like that.  It's probably a 
>>> bit easier than Kryo, but only a bit.  Schema evolution is a real bear -- 
>>> making sure I can deal with it took most of my effort in getting 
>>> Persistence up and running...
>>>
>> On Wed, Sep 21, 2016 at 9:16 AM, Tim Pigden  wrote:
>>>
>> Hi
 Reading 

 http://doc.akka.io/docs/akka/2.4.10/scala/persistence-schema-evolution.html

 and thinking about what we currently do, I've concluded that I'd like 
 to serialize my events as json.
 The article suggests I should check the list of plugins to see which 
 specifically support json. But I can't find clear indications that any of 
 them do from the respective github pages (apologies if I've missed 
 something). Most seem to want the target database tables to be a BLOB with 
 no option of a native json type.

 My current database target is Postgres (because we use postgis for 
 mapping and because I need a proper sql database for data warehouse). 
 However, for the event serialization I could certainly contemplate 
 something else if it made the current development path quicker and easier. 
 MongoDB or Cassandra are obvious possible targets.

 So my question is: is anyone actually using json as a serialization 
 format, and if so
 a) what database and driver?
 b) is the database-native json support being used (if any?)
 c) how much effort was it? I can already serialize everthing to json 
 that needs to go in the persistence journal or snapshots.

 it's got to be something with active support/interest.

 Thanks
 tim

>>> -- 
 >> 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