[akka-user] Re: Akka-Http Entity Stream Truncation
Hi, I saw this exception happen in production with Play 2.6.x but could not replicate it. After reading your post I turned throttling on, made a request and killed the tab before it was done sending data and got the exception on localhost. Thank you, Dusan On Monday, July 10, 2017 at 9:08:29 AM UTC-7, Michael Pisula wrote: > > Hi Johannes, > perfect, thanks for the insight. I think we can work with that. > > Cheers, > Michael > > Am Montag, 10. Juli 2017 16:55:55 UTC+2 schrieb johannes...@lightbend.com: >> >> Hi Michael, >> >> On Monday, July 10, 2017 at 9:01:00 AM UTC+2, Michael Pisula wrote: >>> >>> As far as I saw from the source code, it could point to a problem with >>> header parsing, but I am not exactly sure what could cause the problem. >>> >> >> The place in the code is actually misleading, as it the error is only >> prepared at that place after all headers have been read. The error will >> only be reported, however, only later on if the connection is closed while >> there's still data expected on the connection. That will be the case if a >> `Content-Length` was specified but less than the given number of bytes was >> read before the connection was closed, or if `chunked` transfer encoding >> was used, if the connection was closed before the final empty chunk was >> sent. >> >> You could set `akka.http.server.log-unencrypted-network-bytes = 1000` to >> see all data that was sent on the connection which might help with >> debugging the issue. >> > -- >> 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 Persistence and avoiding var in favor of context.become
Learning akka persistence, I was initially reluctant to use vars to capture state since we generally try to avoid vars when possible. But when experimenting with context.become(receiveBlock(stateParam)) inside a receiveRecover implementation, it appeared to interfere with its ability to stash other messages. (akka 2.4.20) It tried to handle normal messages that it didn't try to handle when I wasn't using context.become. Is it possible and reasonable to use context.become instead of var to capture state using Akka Persistence? At first glance, it seems like the interplay between receiveCommand and receiveRecover could get rather tricky, especially if your actor has initialization behavior that changes its receiveCommand behavior - for instance, initializing receiveCommand with an empty collection to start, i.e. def receiveCommand: Receive = initialReceive(List.empty) Thanks, Curt Siffert -- >> 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] Removing programmatically and dynamically Node from Cluster
Thanks, that makes sense. I have to read more about the gossip protocol :) I think I will use manual intervention by setting up an AWS service to monitor nodes. I could implement a simple SPR but there would be many cases I don´t know how to solve at the moment: 1) If I run 2 nodes with dynamic IPs and there is a network partition the Split Brain Resolver is not in a position to determine what to do 2) To implement a keep majority algorithm I think I would need to run an odd number of nodes and the SPR would know what nodes to Down based on a threshold 3) Even with an odd number of nodes (like 3) what if all of them become unreachable between each other, same scenario as 1 and the the SPR wouldn't know what to do. Sounds like a difficult mess to implement! I wonder if the commercial package solve those cases and how? Thanks Justin! Sebastian. El jueves, 14 de septiembre de 2017, 9:39:29 (UTC-3), Justin du coeur escribió: > > On Wed, Sep 13, 2017 at 5:55 PM, Sebastian Oliveri> wrote: > >> Am I in the right direction? I was thinking more in a server that crashes >> more than a vertical network partition affecting many nodes... >> > > The problem is, how do you tell the difference? Specifically, when you > get a network partition, it *looks* to each node like the other one(s) have > crashed. So if they then down each other, you have split-brain. > > That's the key issue: from the *outside*, it's usually impossible to tell > the difference between a dead node and a network partition. If the node is > dead, then sure, you want to down it. But if it's a network partition, you > must *not* down it unless it has matching logic that causes it to > deliberately crash *itself*. Without that, you're likely to get > split-brain. > > I may be misunderstanding you, but keep in mind that all the infamous > auto-down does is detect an Unreachable member, *wait* a few seconds, and > then down it. It sounds like you're suggesting doing the same thing > without the wait, but the results will be the same... > -- >> 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] Http 2.0 request using SSL cert files in akka http
The HTTP/2 support in Akka HTTP is so far only server side, there is no client implementation. So you would have to use some other HTTP client to achieve that for now. -- Johan Akka Team On Wed, Sep 6, 2017 at 2:50 PM,wrote: > Hi Friends, > > I have been using akka http for a year and found it to be useful. > > Recently I have a need to make Http 2.0 requests using akka http. > Consider the below curl request. I want to convert the below curl request > to an equivalent scala code using akka http. > > > curl -d '{"aps":{"alert":{"title":"Hello from PushCrew","body":"Yay! > Notification from Safari","action":"Click"},"url-args":["ss","ss"]}}' > --cert 'h1.pem':'qwerty' -H "apns-topic: web.io.github.batra" --http2 > https://api.push.apple.com:443/3/device/0E705B379AD669DB060DEF1EF60A05 > 0A92F60366F97BBC08B1086241C455FE8A > > Notes: Its an Http 2.0 request, it uses pem encoded certificate file in > the option "--cert" > Let me know if you need any futher information. > > > > Thanks > Mahesh > > > -- > >> 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: how can write and read async with socket (councurent) ?
The Akka IO API is actor based and a bit more low level, requiring more boilerplate, the streams one is a higher level API which fits some problems (and mindsets) very well. Performance will likely not differ much so try both and use the one you find easiest to understand and achieve what you want with. -- Johan Akka Team On Wed, Sep 13, 2017 at 4:01 PM,wrote: > Someone who can help me ??? > > On Saturday, September 2, 2017 at 3:53:20 PM UTC+4:30, > techlan...@gmail.com wrote: > >> hi every one >> I'm using akka 2.5.x how can call Socket async for read and write ?(what >> is the best solution) >> i need many connection concurrency for send email this is sample code >> java ? >> >> public boolean sendEmail(String data, String from, String to,String subject) >> throws IOException { >> Socket socket; >> InputStream inn; >> OutputStream outt; >> BufferedReader msg; >> socket = new Socket(mailHost, SMTP_PORT); >> if (socket == null) { >> return false; >> } >> inn = socket.getInputStream(); >> outt = socket.getOutputStream(); >> in = new BufferedReader(new InputStreamReader(inn)); >> out = new PrintWriter(new OutputStreamWriter(outt), true); >> if (inn == null || outt == null) { >> log("Failed to open streams to socket."); >> return false; >> } >> String initialID = in.readLine(); >> out.println("HELO " + localhost.getHostName()); >> String welcome = in.readLine(); >> out.println("MAIL From:<" + from + ">"); >> String senderOK = in.readLine(); >> out.println("RCPT TO:<" + to + ">"); >> String recipientOK = in.readLine(); >> out.println("DATA"); >> out.println("From:Ehsan test<"+from+">"); >> out.println("To:Ehsan uni<"+to+">"); >> out.println("Cc:khodam <"+to+">"); >> out.println("Subject:"+subject); >> Date d=new Date(); >> out.println("Date:"+d.toString()); >> // this body of email >> out.println(data); >> out.println("."); >> // end of email >> String acceptedOK = in.readLine(); >> out.println("QUIT"); >> return true; >> } >> } >> how can implement with akka ? >> how can write and read async ? >> could help me for this 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] Removing programmatically and dynamically Node from Cluster
On Wed, Sep 13, 2017 at 5:55 PM, Sebastian Oliveriwrote: > Am I in the right direction? I was thinking more in a server that crashes > more than a vertical network partition affecting many nodes... > The problem is, how do you tell the difference? Specifically, when you get a network partition, it *looks* to each node like the other one(s) have crashed. So if they then down each other, you have split-brain. That's the key issue: from the *outside*, it's usually impossible to tell the difference between a dead node and a network partition. If the node is dead, then sure, you want to down it. But if it's a network partition, you must *not* down it unless it has matching logic that causes it to deliberately crash *itself*. Without that, you're likely to get split-brain. I may be misunderstanding you, but keep in mind that all the infamous auto-down does is detect an Unreachable member, *wait* a few seconds, and then down it. It sounds like you're suggesting doing the same thing without the wait, but the results will be the same... -- >> 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] Recommand JAVA OPTS for Akka application
Hi Akka Team, I have an Akka app using Akka Streams, Akka Cluster and Akka Actors. I cannot found in the documentation some recommandations on the JAVA OPTS to set. Do you have any advices on which java opts (other than -DXms and -DXmm) to set or not ? Thanking your in advance, Alifirat Kilic. -- >> 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] Node unexpectedly quarantined after `quarantine-after-silence`
Hi guys, Recently we had an issue in live with one of three our nodes, so eventually we restarted it. Then after 2 days running it was unexpectedly quarantined, without any other strange misbehaviours. Some facts to rebuild history: 1. We have seed-nodes configured in exact order: [node1, node2, node3] 2. Restart of node3 3. Node3 received "Welcome from node2" (make attention it is not node1) which I would expect that node3 tries node1 first... at least we always had welcome from the node1 4. After 2 days node3 has been quarantined. The only suspicion configuration regarding 2 day period is `quarantine-after-silence` makes sense. Ant ideas about this? Looks like there is something fishy going on here. -- >> 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 cluster http management
Thank u it works -- >> 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] Cluster on Different JVM's
Hello, i am trying to do a small program using akka cluster . i want to execute cluster program on two system with displaying simple message . i have one cluster(like c1) associate with one actorsystem( say a1) and i have another cluster( say c2) with actor system( say a2) in another system . i want to display message from one system to another through seednodes of c1 to seed nodes of c2 . but i dont no how to communicate please help me with this problem Thanks & Regards , V. Sai Kiran Sarma -- >> 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.