Re: [akka-user] akka-http Http.outgoingConnectionHttps and self-signed certs

2017-05-24 Thread Eric Swenson
Hi Joan,

To be honest, I haven’t looked at this stuff in ages.  We set up our own PKI CA 
and switched to using non-self-signed certs.  However, before we did this, I 
had gotten things working with self-signed certs.  Unfortunately, I don’t have 
that code in active usage anywhere now.  I did find the following commented-out 
code in one version of a service.   Not sure if it works and even compiles with 
the latest Akka.  But here it is in its ugly entirety:

/*

  // temporary code because we're using self-signed certs
  val classLoader: ClassLoader = Thread.currentThread().getContextClassLoader
  val jksInputStream = classLoader.getResourceAsStream(“dev.jks")
  val jksTempFilePathname = Files.createTempFile("jksTemp", "jks").toString
  val jksOutputStream = new FileOutputStream(jksTempFilePathname)
  try {
IOUtils.copy(jksInputStream, jksOutputStream)
  } finally {
jksInputStream.close
  }

  val trustStoreConfig = TrustStoreConfig(None, Some(jksTempFilePathname))
  val trustManagerConfig = 
TrustManagerConfig().withTrustStoreConfigs(List(trustStoreConfig))

  val looseConfig = SSLLooseConfig().withDisableHostnameVerification(true)

  val sslConfig = AkkaSSLConfig().mapSettings { s =>
s.withLoose(looseConfig).withTrustManagerConfig(trustManagerConfig)
  }

*/

> On May 24, 2017, at 04:46, Joan G  wrote:
> 
> What happened at the end?
> I'm having the same issue and find insane that disabling all the security 
> (just to identify where is the issue) is still not working.
> 
> On Wednesday, 18 May 2016 22:13:03 UTC+1, Eric Swenson wrote:
> Apart from my prior point — that it is not practical for my test environment 
> to configure all the trust anchors (self signed cert signer), I decided to 
> try it anyhow for a single self-signed cert. I still am having issues: here 
> is the code:
> 
> val trustStoreConfig = TrustStoreConfig(None, 
> Some("/Users/eswenson/self-signed-cert.jks"))
>   val trustManagerConfig = 
> TrustManagerConfig().withTrustStoreConfigs(List(trustStoreConfig))
> 
>   val looseConfig = SSLLooseConfig().withAcceptAnyCertificate(true).
> withDisableHostnameVerification(true).
> withAllowLegacyHelloMessages(Some(true)).
> withAllowUnsafeRenegotiation(Some(true)).
> withAllowWeakCiphers(true).
> withAllowWeakProtocols(true).
> withDisableSNI(true)
> 
>   val sslConfig = AkkaSSLConfig().mapSettings(s =>
>  s.withLoose(looseConfig).withTrustManagerConfig(trustManagerConfig)
>   )
> 
>   val connectionContext = Http().createClientHttpsContext(sslConfig)
> 
>   lazy val connectionFlow: Flow[HttpRequest, HttpResponse, Any] =
> Http().outgoingConnectionHttps(host, port, connectionContext)
> 
>   def httpSRequest(request: HttpRequest): Future[HttpResponse] =
> Source.single(request).via(connectionFlow).runWith(Sink.head)
> 
> As you can see, I’m using a trust store with the self-signed cert in it.  
> Even with the trust store and enabling all the loose config options (I tried 
> it without looseConfig to no avail), I’m still getting errors:
> 
> background log: info: [INFO] [05/17/2016 18:49:17.574] 
> [ClusterSystem-akka.actor.default-dispatcher-25] 
> [ExperimentInstance(akka://ClusterSystem <>)] fetchExperiment: 
> exception=akka.stream.ConnectionException: Hostname verification failed! 
> Expected session to be for 
> xxx-GfsElb-1RLMB4EAK0HUM-785838730.us-west-2.elb.amazonaws.com 
> 
> background log: error: akka.stream.ConnectionException: Hostname verification 
> failed! Expected session to be for 
> xxx-GfsElElb-1RLMB4EAK0HUM-785838730.us-west-2.elb.amazonaws.com 
> 
> 
> Why is it doing any host name verification?  The loose config specifies:
> 
>  withDisableHostnameVerification(true)
> 
> I’m finding it hard to believe it is this hard to do HTTPS with self-signed 
> certs.  Any suggestions?
> 
> — Eric
> 
>> On May 17, 2016, at 5:11 PM, Eric Swenson swenson.org 
>> > wrote:
>> 
>> I don't want or need to configure a specific trust anchor. I want to be able 
>> to do the equivalent of "curl -k" on a set of local servers, with different 
>> signing certs. I would have thought the loose "acceptAnyCertificate" would 
>> have been precisely for this.  What does that setting do?
>> 
>> If the only way to allow self-signed certs is through setting up a trust 
>> store, I can do that.
>> 
>> 
>> -- Eric
>> 
>> 
>> On May 17, 2016, at 16:30, Konrad Malawski lightbend.com 
>> > wrote:
>> 
>>> Have you attempted to "do the right thing" ™?
>>> Which is to add the certificate to a trust store, instead of disabling all 
>>> TLS features?
>>> 
>>> It's actually not that hard and documented here: 
>>> http://typesafehub.github.io/ssl-config/CertificateGeneration.html 
>>> 

Re: [akka-user] ANNOUNCE: New Akka documentation, website and Akka 2.5.2 released

2017-05-24 Thread Konrad Malawski
We believe it may still be indexing the new pages;
If that's not the case we'll investigate deeper shortly :-)

Thanks for reporting

-- 
Konrad `ktoso` Malawski
Akka  @ Lightbend 

On 24 May 2017 at 20:04:18, Richard Rodseth (rrods...@gmail.com) wrote:

Looks nice.

However, if I go to

http://akka.io/docs/

and type "Dispatcher" in the search box, nothing happens. There's no Search
button, and Enter does nothing either.
Chrome, OS X.
Am I missing something?




On Wed, May 24, 2017 at 7:56 AM, Arnout Engelen <
arnout.enge...@lightbend.com> wrote:

> Dear hakkers,
>
> We are excited to announce not only a new patch release of Akka 2.5 but
> also brand new akka.io website and documentation.
>
> New
> documentation
>
> One conclusion from the community survey 2016
>  was
> that the getting started experience of Akka must be improved. Therefore we
> have written completely new Getting Started
>  and
> Quickstart  guides.
>
> A special thanks to Endre Varga  who wrote
> most of the Getting Started guide.
>
> You find the landing page for the documentation at http://akka.io/docs/
>
> The documentation tooling has been changed to Paradox
> . The markdown syntax and the zero
> installation will make it easier for contributors to help out with
> improving the documentation. Such contributions are very welcome and you
> find instructions in CONTRIBUTING.md
> .
>
> Akka
> 2.5.2
>
> If you are using Cluster Sharding with "remembering entities" there is one
> important change that requires that you make a change to your code when
> updating to 2.5.2. To solve a critical issue #22289
>  that could result in
> duplicate entities when the extractShardId function is changed (e.g.
> between deployments) there is now a new message Shard.StartEntity(
> entityId)that the extractShardId must understand. See example in Scala
> 
>  or Java
> 
> .
>
> Some other notable improvements and bug fixes of Akka 2.5.2 are:
>
>- Sharding entities not restarted after full cluster restart in ddata
>mode, #22868 
>- Bug in sharding snapshot deletion, #22916
>
>- Report cause for Akka IO TCP CommandFailed, #22954
>
>- BackoffSupervisor can reply to messages when child is stopped, #21213
>
>
> The development branch of Akka Typed has been merged back to master and is
> included in Akka 2.5.2, see the blog post series starting with Akka
> Typed: Hello World in the new API
> . The APIs may still
> change but we are confident that most of it is now stable. We will continue
> the work by integrating with other parts of Akka, such as Streams,
> Persistence, and Cluster.
>
> A total of 77 issues were closed since 2.5.1. The complete list of closed
> issues can be found on the 2.5.2
>  and 2.5.99-TYPED-M1
>  milestones on
> github.
>
> 
> Credits
>
> For this release we had the help of 27 committers – thank you all very
> much!
>
> commits  added  removed
>  44   7021 4706 Patrik Nordwall
>  29  2045322586 Arnout Engelen
>  18   2290 2122 Martynas Mickevičius
>  10   3173 1547 Johan Andrén
>   6272  233 Konrad `ktoso` Malawski
>   5118   17 Richard Imaoka
>   4137   37 andrea
>   3862  426 Peter Vlugter
>   2 37   11 Roland Kuhn
>   2 26   21 Hawstein
>   2 12   12 Philippus Baalman
>   14763 drewhk
>   1 66   21 Johannes Rudolph
>   1 22   22 stanislav
>   1 289 Chris Martin
>   1 185 Nafer Sanabria
>   1  88 Age Mooij
>   1  88 Lukas Phaf
>   1  95 Zahari Dichev
>   1  22 Masaru Nomura
>   1  11 Bartosz Kowalik
>   1  11 Sebastian Gavril
>   

Re: [akka-user] ANNOUNCE: New Akka documentation, website and Akka 2.5.2 released

2017-05-24 Thread Richard Rodseth
Looks nice.

However, if I go to

http://akka.io/docs/

and type "Dispatcher" in the search box, nothing happens. There's no Search
button, and Enter does nothing either.
Chrome, OS X.
Am I missing something?




On Wed, May 24, 2017 at 7:56 AM, Arnout Engelen <
arnout.enge...@lightbend.com> wrote:

> Dear hakkers,
>
> We are excited to announce not only a new patch release of Akka 2.5 but
> also brand new akka.io website and documentation.
>
> New
> documentation
>
> One conclusion from the community survey 2016
>  was
> that the getting started experience of Akka must be improved. Therefore we
> have written completely new Getting Started
>  and
> Quickstart  guides.
>
> A special thanks to Endre Varga  who wrote
> most of the Getting Started guide.
>
> You find the landing page for the documentation at http://akka.io/docs/
>
> The documentation tooling has been changed to Paradox
> . The markdown syntax and the zero
> installation will make it easier for contributors to help out with
> improving the documentation. Such contributions are very welcome and you
> find instructions in CONTRIBUTING.md
> .
>
> Akka
> 2.5.2
>
> If you are using Cluster Sharding with "remembering entities" there is one
> important change that requires that you make a change to your code when
> updating to 2.5.2. To solve a critical issue #22289
>  that could result in
> duplicate entities when the extractShardId function is changed (e.g.
> between deployments) there is now a new message Shard.StartEntity(
> entityId)that the extractShardId must understand. See example in Scala
> 
>  or Java
> 
> .
>
> Some other notable improvements and bug fixes of Akka 2.5.2 are:
>
>- Sharding entities not restarted after full cluster restart in ddata
>mode, #22868 
>- Bug in sharding snapshot deletion, #22916
>
>- Report cause for Akka IO TCP CommandFailed, #22954
>
>- BackoffSupervisor can reply to messages when child is stopped, #21213
>
>
> The development branch of Akka Typed has been merged back to master and is
> included in Akka 2.5.2, see the blog post series starting with Akka
> Typed: Hello World in the new API
> . The APIs may still
> change but we are confident that most of it is now stable. We will continue
> the work by integrating with other parts of Akka, such as Streams,
> Persistence, and Cluster.
>
> A total of 77 issues were closed since 2.5.1. The complete list of closed
> issues can be found on the 2.5.2
>  and 2.5.99-TYPED-M1
>  milestones on
> github.
>
> 
> Credits
>
> For this release we had the help of 27 committers – thank you all very
> much!
>
> commits  added  removed
>  44   7021 4706 Patrik Nordwall
>  29  2045322586 Arnout Engelen
>  18   2290 2122 Martynas Mickevičius
>  10   3173 1547 Johan Andrén
>   6272  233 Konrad `ktoso` Malawski
>   5118   17 Richard Imaoka
>   4137   37 andrea
>   3862  426 Peter Vlugter
>   2 37   11 Roland Kuhn
>   2 26   21 Hawstein
>   2 12   12 Philippus Baalman
>   14763 drewhk
>   1 66   21 Johannes Rudolph
>   1 22   22 stanislav
>   1 289 Chris Martin
>   1 185 Nafer Sanabria
>   1  88 Age Mooij
>   1  88 Lukas Phaf
>   1  95 Zahari Dichev
>   1  22 Masaru Nomura
>   1  11 Bartosz Kowalik
>   1  11 Sebastian Gavril
>   1  11 Alena Varkockova
>   1  11 André Laszlo
>   1  10 Packt
>   1  00 synox
>   1  00 Dale Wijnand
>
> Happy hakking!
>
> – The Akka Team
>
> --
> >> Read the docs: http://akka.io/docs/
> >> Check 

Re: [EXT] [akka-user] Re: has anyone attempted a multi-source authentication?

2017-05-24 Thread Andrew Norman
Johannes,
That worked pretty well! Now writing the custom directive that wrappers the 
multi-auth and another cookie directive, that was a pretty wild “welcome to 
akka-http” undertaking!

-Andrew

From:  on behalf of 
"johannes.rudo...@lightbend.com" 
Reply-To: "akka-user@googlegroups.com" 
Date: Monday, May 22, 2017 at 5:11 AM
To: Akka User List 
Subject: [EXT] [akka-user] Re: has anyone attempted a multi-source 
authentication?

Hi Andrew,

here's a general idea at how it could work:

If you model each authentication method as a `Directive1[Session]` that returns 
the session (or user, principal, etc.) for that authentication method and all 
of the directive return the a value of the same type or a type with a common 
supertype then you can combine each of those directives with `|`:


def authentication: Directive1[Session] = cookieAuthentication | 
tokenAuthentication | basicAuthentication

The first one will be used with highest precedence and the other ones will only 
be tried if all the previous once have rejected the request.

Is that what you are looking for?

Johannes

On Saturday, May 20, 2017 at 12:47:03 AM UTC+2, Andrew Norman wrote:
This would be for a system that services requests from users directly and also 
with other systems. Users would have a session cookie and non-user systems a 
token.

The idea / paradigm here is the old java interceptor authentication approach 
where authentication was attempted a number of ways before the action is 
handled. If any of the various types of authentication was successful then the 
action can be invoked (provided the authenticated entity is authorized to 
invoke the target action).

So looking at the akka-http setup, I'm seeing that there is cookie handling 
directive and there are authentication directive (that look like they are wired 
to handle usernames and passwords). Is there some sort of directive that 
resembles or can work with the multi-source auth paradigm?
--
>> 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 a topic in the Google 
Groups "Akka User List" group.
To unsubscribe from this topic, visit 
https://groups.google.com/d/topic/akka-user/EuZvou0x7l0/unsubscribe.
To unsubscribe from this group and all its topics, 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] ANNOUNCE: New Akka documentation, website and Akka 2.5.2 released

2017-05-24 Thread Arnout Engelen
Dear hakkers,

We are excited to announce not only a new patch release of Akka 2.5 but
also brand new akka.io website and documentation.
New
documentation

One conclusion from the community survey 2016
 was
that the getting started experience of Akka must be improved. Therefore we
have written completely new Getting Started
 and
Quickstart  guides.

A special thanks to Endre Varga  who wrote most
of the Getting Started guide.

You find the landing page for the documentation at http://akka.io/docs/

The documentation tooling has been changed to Paradox
. The markdown syntax and the zero
installation will make it easier for contributors to help out with
improving the documentation. Such contributions are very welcome and you
find instructions in CONTRIBUTING.md
.
Akka
2.5.2

If you are using Cluster Sharding with "remembering entities" there is one
important change that requires that you make a change to your code when
updating to 2.5.2. To solve a critical issue #22289
 that could result in duplicate
entities when the extractShardId function is changed (e.g. between
deployments) there is now a new message Shard.StartEntity(entityId)that the
extractShardId must understand. See example in Scala

 or Java

.

Some other notable improvements and bug fixes of Akka 2.5.2 are:

   - Sharding entities not restarted after full cluster restart in ddata
   mode, #22868 
   - Bug in sharding snapshot deletion, #22916
   
   - Report cause for Akka IO TCP CommandFailed, #22954
   
   - BackoffSupervisor can reply to messages when child is stopped, #21213
   

The development branch of Akka Typed has been merged back to master and is
included in Akka 2.5.2, see the blog post series starting with Akka Typed:
Hello World in the new API .
The APIs may still change but we are confident that most of it is now
stable. We will continue the work by integrating with other parts of Akka,
such as Streams, Persistence, and Cluster.

A total of 77 issues were closed since 2.5.1. The complete list of closed
issues can be found on the 2.5.2
 and 2.5.99-TYPED-M1
 milestones on github.

Credits

For this release we had the help of 27 committers – thank you all very much!

commits  added  removed
 44   7021 4706 Patrik Nordwall
 29  2045322586 Arnout Engelen
 18   2290 2122 Martynas Mickevičius
 10   3173 1547 Johan Andrén
  6272  233 Konrad `ktoso` Malawski
  5118   17 Richard Imaoka
  4137   37 andrea
  3862  426 Peter Vlugter
  2 37   11 Roland Kuhn
  2 26   21 Hawstein
  2 12   12 Philippus Baalman
  14763 drewhk
  1 66   21 Johannes Rudolph
  1 22   22 stanislav
  1 289 Chris Martin
  1 185 Nafer Sanabria
  1  88 Age Mooij
  1  88 Lukas Phaf
  1  95 Zahari Dichev
  1  22 Masaru Nomura
  1  11 Bartosz Kowalik
  1  11 Sebastian Gavril
  1  11 Alena Varkockova
  1  11 André Laszlo
  1  10 Packt
  1  00 synox
  1  00 Dale Wijnand

Happy hakking!

– The Akka Team

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

Re: [akka-user] akka-http Http.outgoingConnectionHttps and self-signed certs

2017-05-24 Thread Joan G
What happened at the end?
I'm having the same issue and find insane that disabling all the security 
(just to identify where is the issue) is still not working.

On Wednesday, 18 May 2016 22:13:03 UTC+1, Eric Swenson wrote:
>
> Apart from my prior point — that it is not practical for my test 
> environment to configure all the trust anchors (self signed cert signer), I 
> decided to try it anyhow for a single self-signed cert. I still am having 
> issues: here is the code:
>
> val trustStoreConfig = TrustStoreConfig(None, 
> Some("/Users/eswenson/self-signed-cert.jks"))
>   val trustManagerConfig = 
> TrustManagerConfig().withTrustStoreConfigs(List(trustStoreConfig))
>
>   val looseConfig = SSLLooseConfig().withAcceptAnyCertificate(true).
> withDisableHostnameVerification(true).
> withAllowLegacyHelloMessages(Some(true)).
> withAllowUnsafeRenegotiation(Some(true)).
> withAllowWeakCiphers(true).
> withAllowWeakProtocols(true).
> withDisableSNI(true)
>
>   val sslConfig = AkkaSSLConfig().mapSettings(s =>
>  s.withLoose(looseConfig).withTrustManagerConfig(trustManagerConfig)
>   )
>
>   val connectionContext = Http().createClientHttpsContext(sslConfig)
>
>   lazy val connectionFlow: Flow[HttpRequest, HttpResponse, Any] =
> Http().outgoingConnectionHttps(host, port, connectionContext)
>
>   def httpSRequest(request: HttpRequest): Future[HttpResponse] =
> Source.single(request).via(connectionFlow).runWith(Sink.head)
>
> As you can see, I’m using a trust store with the self-signed cert in it. 
>  Even with the trust store and enabling all the loose config options (I 
> tried it without looseConfig to no avail), I’m still getting errors:
>
> background log: info: [INFO] [05/17/2016 18:49:17.574] 
> [ClusterSystem-akka.actor.default-dispatcher-25] [ExperimentInstance(
> akka://ClusterSystem)] fetchExperiment: 
> exception=akka.stream.ConnectionException: Hostname verification failed! 
> Expected session to be for 
> xxx-GfsElb-1RLMB4EAK0HUM-785838730.us-west-2.elb.amazonaws.com 
> 
> background log: error: akka.stream.ConnectionException: Hostname 
> verification failed! Expected session to be for 
> xxx-GfsElElb-1RLMB4EAK0HUM-785838730.us-west-2.elb.amazonaws.com 
> 
>
> Why is it doing any host name verification?  The loose config specifies:
>
>  withDisableHostnameVerification(true)
>
> I’m finding it hard to believe it is this hard to do HTTPS with 
> self-signed certs.  Any suggestions?
>
> — Eric
>
> On May 17, 2016, at 5:11 PM, Eric Swenson  
> wrote:
>
> I don't want or need to configure a specific trust anchor. I want to be 
> able to do the equivalent of "curl -k" on a set of local servers, with 
> different signing certs. I would have thought the loose 
> "acceptAnyCertificate" would have been precisely for this.  What does that 
> setting do?
>
> If the only way to allow self-signed certs is through setting up a trust 
> store, I can do that.
>
>
> -- Eric
>
>
> On May 17, 2016, at 16:30, Konrad Malawski  > wrote:
>
> Have you attempted to "do the right thing" ™?
> Which is to add the certificate to a trust store, instead of disabling all 
> TLS features?
>
> It's actually not that hard and documented here: 
> http://typesafehub.github.io/ssl-config/CertificateGeneration.html
>
> Also, you can always drop down to the raw low level Java APIs, as this 
> example shows: 
>
> https://github.com/akka/akka/blob/master/akka-http-tests/src/main/java/akka/http/javadsl/server/examples/simple/SimpleServerApp.java
> (it's server side, but the same process can be done for client – pretty 
> much)
>
> -- 
> Konrad `ktoso` Malawski
> Akka  @ Lightbend 
>
> On 18 May 2016 at 01:25:32, Eric Swenson (er...@swenson.org ) 
> wrote:
>
> I have a need (no, not in production) to have an akka-based service 
> contact another service using TLS where the remote service is using a 
> self-signed cert.
>
> I've used AkkaSSLConfig to configure the "loose" settings:
>
> val looseConfig = SSLLooseConfig().withAcceptAnyCertificate(true).
>   withDisableHostnameVerification(true).
>   withAllowLegacyHelloMessages(Some(true)).
>   withAllowUnsafeRenegotiation(Some(true)).
>   withAllowWeakCiphers(true).
>   withAllowWeakProtocols(true).
>   withDisableSNI(true)
>
>
> and despite trying all of the, still get the following exception when 
> trying to access the remote service:
>
>  sun.security.validator.ValidatorException: PKIX path building failed: 
> sun.security.provider.certpath.SunCertPathBuilderException: unable to find 
> valid certification path to requested target
>
>
> It was my impression that the loose config:
>
>
> withAcceptAnyCertificate(true)
>
>
> should have prevented the TLS implementation from trying to verify the 
> cert. 
>
>
> What am I 

Re: [akka-user] Akka Distributed Data Sample thowing OversizedPayloadException

2017-05-24 Thread Patrik Nordwall
That's interesting. I see the same problem when running that example. It
shouldn't be much data involved there. I have created issue
https://github.com/akka/akka-samples/issues/25 and will look into it.

/Patrik

On Tue, May 23, 2017 at 7:25 PM, Mainak Ghosh 
wrote:

> Hey Patrick,
>
> I might have pasted the wrong log. Here is the correct one:
>
> [JVM-1] [INFO] [05/22/2017 16:31:25.245] [ScalaTest-main]
> [akka.remote.Remoting] Starting remoting
> [JVM-3] [INFO] [05/22/2017 16:31:25.245] [ScalaTest-main]
> [akka.remote.Remoting] Starting remoting
> [JVM-2] [INFO] [05/22/2017 16:31:25.355] [ScalaTest-main]
> [akka.remote.Remoting] Starting remoting
> [JVM-3] [INFO] [05/22/2017 16:31:25.665] [ScalaTest-main]
> [akka.remote.Remoting] Remoting started; listening on addresses
> :[akka.tcp://VotingServiceSpec@localhost:56966]
> [JVM-3] [INFO] [05/22/2017 16:31:25.681] [ScalaTest-main]
> [akka.remote.Remoting] Remoting now listens on addresses:
> [akka.tcp://VotingServiceSpec@localhost:56966]
> [JVM-3] [INFO] [05/22/2017 16:31:25.696] [ScalaTest-main]
> [akka.cluster.Cluster(akka://VotingServiceSpec)] Cluster Node
> [akka.tcp://VotingServiceSpec@localhost:56966] - Starting up...
> [JVM-1] [INFO] [05/22/2017 16:31:25.728] [ScalaTest-main]
> [akka.remote.Remoting] Remoting started; listening on addresses
> :[akka.tcp://VotingServiceSpec@localhost:56969]
> [JVM-1] [INFO] [05/22/2017 16:31:25.728] [ScalaTest-main]
> [akka.remote.Remoting] Remoting now listens on addresses:
> [akka.tcp://VotingServiceSpec@localhost:56969]
> [JVM-1] [INFO] [05/22/2017 16:31:25.747] [ScalaTest-main]
> [akka.cluster.Cluster(akka://VotingServiceSpec)] Cluster Node
> [akka.tcp://VotingServiceSpec@localhost:56969] - Starting up...
> [JVM-3] [INFO] [05/22/2017 16:31:25.830] [ScalaTest-main]
> [akka.cluster.Cluster(akka://VotingServiceSpec)] Cluster Node
> [akka.tcp://VotingServiceSpec@localhost:56966] - Registered cluster JMX
> MBean [akka:type=Cluster]
> [JVM-3] [INFO] [05/22/2017 16:31:25.830] [ScalaTest-main]
> [akka.cluster.Cluster(akka://VotingServiceSpec)] Cluster Node
> [akka.tcp://VotingServiceSpec@localhost:56966] - Started up successfully
> [JVM-2] [INFO] [05/22/2017 16:31:25.861] [ScalaTest-main]
> [akka.remote.Remoting] Remoting started; listening on addresses
> :[akka.tcp://VotingServiceSpec@localhost:56978]
> [JVM-2] [INFO] [05/22/2017 16:31:25.861] [ScalaTest-main]
> [akka.remote.Remoting] Remoting now listens on addresses:
> [akka.tcp://VotingServiceSpec@localhost:56978]
> [JVM-3] [INFO] [05/22/2017 16:31:25.861] 
> [VotingServiceSpec-akka.actor.default-dispatcher-5]
> [akka.cluster.Cluster(akka://VotingServiceSpec)] Cluster Node
> [akka.tcp://VotingServiceSpec@localhost:56966] - No seed-nodes
> configured, manual cluster join required
> [JVM-2] [INFO] [05/22/2017 16:31:25.892] [ScalaTest-main]
> [akka.cluster.Cluster(akka://VotingServiceSpec)] Cluster Node
> [akka.tcp://VotingServiceSpec@localhost:56978] - Starting up...
> [JVM-1] [INFO] [05/22/2017 16:31:25.906] [ScalaTest-main]
> [akka.cluster.Cluster(akka://VotingServiceSpec)] Cluster Node
> [akka.tcp://VotingServiceSpec@localhost:56969] - Registered cluster JMX
> MBean [akka:type=Cluster]
> [JVM-1] [INFO] [05/22/2017 16:31:25.906] [ScalaTest-main]
> [akka.cluster.Cluster(akka://VotingServiceSpec)] Cluster Node
> [akka.tcp://VotingServiceSpec@localhost:56969] - Started up successfully
> [JVM-1] [INFO] [05/22/2017 16:31:25.921] 
> [VotingServiceSpec-akka.actor.default-dispatcher-8]
> [akka.cluster.Cluster(akka://VotingServiceSpec)] Cluster Node
> [akka.tcp://VotingServiceSpec@localhost:56969] - No seed-nodes
> configured, manual cluster join required
> [JVM-2] [INFO] [05/22/2017 16:31:26.073] [ScalaTest-main]
> [akka.cluster.Cluster(akka://VotingServiceSpec)] Cluster Node
> [akka.tcp://VotingServiceSpec@localhost:56978] - Registered cluster JMX
> MBean [akka:type=Cluster]
> [JVM-2] [INFO] [05/22/2017 16:31:26.073] [ScalaTest-main]
> [akka.cluster.Cluster(akka://VotingServiceSpec)] Cluster Node
> [akka.tcp://VotingServiceSpec@localhost:56978] - Started up successfully
> [JVM-2] [INFO] [05/22/2017 16:31:26.104] 
> [VotingServiceSpec-akka.actor.default-dispatcher-3]
> [akka.cluster.Cluster(akka://VotingServiceSpec)] Cluster Node
> [akka.tcp://VotingServiceSpec@localhost:56978] - No seed-nodes
> configured, manual cluster join required
> [JVM-1] [INFO] [05/22/2017 16:31:26.260] [ScalaTest-main] [
> VotingServiceSpecMultiJvmNode1(akka://VotingServiceSpec)] Role [node-1]
> started with address [akka.tcp://VotingServiceSpec@localhost:56969]
> [JVM-2] [INFO] [05/22/2017 16:31:26.338] [ScalaTest-main] [
> VotingServiceSpecMultiJvmNode2(akka://VotingServiceSpec)] Role [node-2]
> started with address [akka.tcp://VotingServiceSpec@localhost:56978]
> [JVM-3] [INFO] [05/22/2017 16:31:26.338] [ScalaTest-main] [
> VotingServiceSpecMultiJvmNode3(akka://VotingServiceSpec)] Role [node-3]
> started with address [akka.tcp://VotingServiceSpec@localhost:56966]
> 

Re: [akka-user] How to load dataase records into ram by akka and java

2017-05-24 Thread Konrad Malawski
You'll still of course use some jdbc driver to pull the data out.
You can use Slick to get a Reactive Stream which you can easily consume
using Akka Streams:

Source.fromPublisher(db.stream(strm.result))

which you could then use mapAsync or other operators on to make it process
more at the same time.

But it'd be the same query..

Or you can use the cluster to fire off multiple queries for a given range
of IDs and thus spreading the loading across the nodes.
Actually, the exact same thing will just work with multiple actors that
would query for a range and populate it thanks to that in parallel.



-- 
Konrad `ktoso` Malawski
Akka  @ Lightbend 

On 24 May 2017 at 14:22:53, morteza Davodi (morteza.dav...@gmail.com) wrote:

I want load million records from oracle DB onto ram fast as a possible, my
current solution is very slow, i use pure jdbc code with single thread,
read record per record and store on memcached, i want use akka as a
in-memory database and in-memory computation. before i dirty my hands with
code, i want know available akka's solutions for loading oracle records on
ram instead a traditional jdbc solution.

-- 
>> 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: Issue in Sending messages through akka cluster.

2017-05-24 Thread Patrik Nordwall
You have to implement some flow control, such as as using the "Work
Pulling" pattern
,
throttling, or send acknowledgment messages back from the consumer. If
producer is sending messages at a higher rate than they can be consumed
those messages must be buffered somewhere and that can eventually result in
out of memory. The buffers in Artery are bounded and will start dropping
messages if overwhelmed.

Cheers,
Patrik

On Wed, May 24, 2017 at 9:57 AM, chaitanya  wrote:

> Following is the console output of my program it says Dropping messages
> due to overflow of send queue. How to solve this?
>
>  GET Messages   >>> Content
>  GET Messages   >>> Content
> 12:49:35.091 [ClusterSystem-akka.actor.default-dispatcher-3] DEBUG
> a.r.a.Association(akka://ClusterSystem) - Dropping message
> [ActorSelectionMessage(java.lang.String)] from
> [Actor[akka://ClusterSystem/user/master_1#-495216506]] to [Actor[akka://
> ClusterSystem@127.0.0.1:2551/]] due to overflow of send queue, size [3072]
> 12:49:35.092 [ClusterSystem-akka.actor.default-dispatcher-3] DEBUG
> a.r.a.Association(akka://ClusterSystem) - Dropping message
> [ActorSelectionMessage(java.lang.String)] from
> [Actor[akka://ClusterSystem/user/master_1#-495216506]] to [Actor[akka://
> ClusterSystem@127.0.0.1:2551/]] due to overflow of send queue, size [3072]
> 12:49:35.092 [ClusterSystem-akka.actor.default-dispatcher-3] DEBUG
> a.r.a.Association(akka://ClusterSystem) - Dropping message
> [ActorSelectionMessage(java.lang.String)] from
> [Actor[akka://ClusterSystem/user/master_1#-495216506]] to [Actor[akka://
> ClusterSystem@127.0.0.1:2551/]] due to overflow of send queue, size [3072]
> 12:49:35.092 [ClusterSystem-akka.actor.default-dispatcher-3] INFO
>  a.r.RemoteActorRefProvider$RemoteDeadLetterActorRef - Message
> [java.lang.String] from Actor[akka://ClusterSystem/user/master_1#-495216506]
> to Actor[akka://ClusterSystem/deadLetters] was not delivered. [1] dead
> letters encountered. This logging can be turned off or adjusted with
> configuration settings 'akka.log-dead-letters' and
> 'akka.log-dead-letters-during-shutdown'.
> 12:49:35.093 [ClusterSystem-akka.actor.default-dispatcher-3] INFO
>  a.r.RemoteActorRefProvider$RemoteDeadLetterActorRef - Message
> [java.lang.String] from Actor[akka://ClusterSystem/user/master_1#-495216506]
> to Actor[akka://ClusterSystem/deadLetters] was not delivered. [2] dead
> letters encountered. This logging can be turned off or adjusted with
> configuration settings 'akka.log-dead-letters' and
> 'akka.log-dead-letters-during-shutdown'.
> 12:49:35.093 [ClusterSystem-akka.actor.default-dispatcher-2] DEBUG
> a.r.a.Association(akka://ClusterSystem) - Dropping message
> [ActorSelectionMessage(java.lang.String)] from
> [Actor[akka://ClusterSystem/user/master_1#-495216506]] to [Actor[akka://
> ClusterSystem@127.0.0.1:2551/]] due to overflow of send queue, size [3072]
> 12:49:35.095 [ClusterSystem-akka.actor.default-dispatcher-2] DEBUG
> a.r.a.Association(akka://ClusterSystem) - Dropping message
> [ActorSelectionMessage(java.lang.String)] from
> [Actor[akka://ClusterSystem/user/master_1#-495216506]] to [Actor[akka://
> ClusterSystem@127.0.0.1:2551/]] due to overflow of send queue, size [3072]
> 12:49:35.097 [ClusterSystem-akka.actor.default-dispatcher-2] DEBUG
> a.r.a.Association(akka://ClusterSystem) - Dropping message
> [ActorSelectionMessage(java.lang.String)] from
> [Actor[akka://ClusterSystem/user/master_1#-495216506]] to [Actor[akka://
> ClusterSystem@127.0.0.1:2551/]] due to overflow of send queue, size [3072]
>
> How can
>
> On Wednesday, 24 May 2017 00:05:42 UTC+5:30, chaitanya wrote:
>>
>> Hi guys,'
>> I am a newbie to akka cluster  and  i have created a sample program. I am
>> using producer consumer pattern. My producer sends messages to consumer
>> which are 2 seed nodes.
>> The program works fine when no of messages are less like in thousands but
>> the program seems to seize when i send huge no of messages to seed nodes.
>>
>> I have implemented artery remoting and for this i refer to 
>> http://doc.akka.io/docs/akka/2.5/java/remoting-artery.html
>>
>> Please find project in attached zip. Can anyone please help me out with
>> this 
>>
>> --
> >> 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] How to load dataase records into ram by akka and java

2017-05-24 Thread morteza Davodi
I want load million records from oracle DB onto ram fast as a possible, my 
current solution is very slow, i use pure jdbc code with single thread, read 
record per record and store on memcached, i want use akka as a in-memory 
database and in-memory computation. before i dirty my hands with code, i want 
know available akka's solutions for loading oracle records on ram instead a 
traditional jdbc solution. 

-- 
>>  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: Issue in Sending messages through akka cluster.

2017-05-24 Thread chaitanya
Following is the console output of my program it says Dropping messages due 
to overflow of send queue. How to solve this? 

 GET Messages   >>> Content
 GET Messages   >>> Content
12:49:35.091 [ClusterSystem-akka.actor.default-dispatcher-3] DEBUG 
a.r.a.Association(akka://ClusterSystem) - Dropping message 
[ActorSelectionMessage(java.lang.String)] from 
[Actor[akka://ClusterSystem/user/master_1#-495216506]] to 
[Actor[akka://ClusterSystem@127.0.0.1:2551/]] due to overflow of send 
queue, size [3072]
12:49:35.092 [ClusterSystem-akka.actor.default-dispatcher-3] DEBUG 
a.r.a.Association(akka://ClusterSystem) - Dropping message 
[ActorSelectionMessage(java.lang.String)] from 
[Actor[akka://ClusterSystem/user/master_1#-495216506]] to 
[Actor[akka://ClusterSystem@127.0.0.1:2551/]] due to overflow of send 
queue, size [3072]
12:49:35.092 [ClusterSystem-akka.actor.default-dispatcher-3] DEBUG 
a.r.a.Association(akka://ClusterSystem) - Dropping message 
[ActorSelectionMessage(java.lang.String)] from 
[Actor[akka://ClusterSystem/user/master_1#-495216506]] to 
[Actor[akka://ClusterSystem@127.0.0.1:2551/]] due to overflow of send 
queue, size [3072]
12:49:35.092 [ClusterSystem-akka.actor.default-dispatcher-3] INFO 
 a.r.RemoteActorRefProvider$RemoteDeadLetterActorRef - Message 
[java.lang.String] from 
Actor[akka://ClusterSystem/user/master_1#-495216506] to 
Actor[akka://ClusterSystem/deadLetters] was not delivered. [1] dead letters 
encountered. This logging can be turned off or adjusted with configuration 
settings 'akka.log-dead-letters' and 
'akka.log-dead-letters-during-shutdown'.
12:49:35.093 [ClusterSystem-akka.actor.default-dispatcher-3] INFO 
 a.r.RemoteActorRefProvider$RemoteDeadLetterActorRef - Message 
[java.lang.String] from 
Actor[akka://ClusterSystem/user/master_1#-495216506] to 
Actor[akka://ClusterSystem/deadLetters] was not delivered. [2] dead letters 
encountered. This logging can be turned off or adjusted with configuration 
settings 'akka.log-dead-letters' and 
'akka.log-dead-letters-during-shutdown'.
12:49:35.093 [ClusterSystem-akka.actor.default-dispatcher-2] DEBUG 
a.r.a.Association(akka://ClusterSystem) - Dropping message 
[ActorSelectionMessage(java.lang.String)] from 
[Actor[akka://ClusterSystem/user/master_1#-495216506]] to 
[Actor[akka://ClusterSystem@127.0.0.1:2551/]] due to overflow of send 
queue, size [3072]
12:49:35.095 [ClusterSystem-akka.actor.default-dispatcher-2] DEBUG 
a.r.a.Association(akka://ClusterSystem) - Dropping message 
[ActorSelectionMessage(java.lang.String)] from 
[Actor[akka://ClusterSystem/user/master_1#-495216506]] to 
[Actor[akka://ClusterSystem@127.0.0.1:2551/]] due to overflow of send 
queue, size [3072]
12:49:35.097 [ClusterSystem-akka.actor.default-dispatcher-2] DEBUG 
a.r.a.Association(akka://ClusterSystem) - Dropping message 
[ActorSelectionMessage(java.lang.String)] from 
[Actor[akka://ClusterSystem/user/master_1#-495216506]] to 
[Actor[akka://ClusterSystem@127.0.0.1:2551/]] due to overflow of send 
queue, size [3072]

How can 

On Wednesday, 24 May 2017 00:05:42 UTC+5:30, chaitanya wrote:
>
> Hi guys,'
> I am a newbie to akka cluster  and  i have created a sample program. I am 
> using producer consumer pattern. My producer sends messages to consumer 
> which are 2 seed nodes.
> The program works fine when no of messages are less like in thousands but 
> the program seems to seize when i send huge no of messages to seed nodes. 
>
> I have implemented artery remoting and for this i refer to  
> http://doc.akka.io/docs/akka/2.5/java/remoting-artery.html
>
> Please find project in attached zip. Can anyone please help me out with 
> this 
>
>

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