This version (2017/05/27 13:44) is a draft.
Approvals: 0/1

[04:34:45] <maziz> got it

[04:35:34] <maziz> thanks

[09:55:38] <cescoffier> purplefox_ temporalfox pmlopes : hello guys, I'm going to publish my example automation

[09:56:00] <cescoffier> so far, in core example, we have only one small bug in a ruby example (codegen failure)

[09:56:20] <purplefox_> great, are you going to submit a PR?

[09:58:04] <cescoffier> will be in its own repository

[09:58:15] <cescoffier> right now will be in my own space, and later in the vertx org

[09:58:22] <cescoffier> it clones the example repo automatically

[10:00:17] <cescoffier> BTW purplefox_ : we have comments on the blog now

[10:01:21] <temporalfox> cescoffier that iwll definiltely allow to automate checks

[10:01:21] <purplefox_> cescoffier: i saw, but the login doesn't work for me

[10:01:51] <cescoffier> hum, you may need an account on disqus

[10:02:07] <cescoffier> I will need your account name anyway to add you as moderator

[10:02:17] <cescoffier> (because there is a code of conduct ;-))

[10:02:47] <purplefox_> ok but i selected to login as twitter/google so why would i need a disqus account for that?

[10:03:02] <purplefox_> I thought the whole point of oauth was to avoid having to create lots of accounts everywhere! ;)

[10:03:16] <purplefox_> lol, code of conduct

[10:03:52] <cescoffier> let me see, is it to post a comment ?

[10:04:18] <temporalfox> :-)

[10:05:00] <cescoffier> alex was able to comment

[10:06:41] <cescoffier> (I'm discovering Disqus - so probably not set up correctly)

[10:08:05] <cescoffier> purplefox_ I've allowed guest to comment (without acount)

[10:22:57] <purplefox_> cescoffier: i'm not sure we should allow guest comments or we might get people like mr bloggy commenting ;)

[10:23:17] <cescoffier> purplefox_: yes, was kind of impressive

[10:23:27] <cescoffier> as soon as I enabled this, a new post

[10:23:33] <purplefox_> lol

[10:23:34] <cescoffier> probably a spam bot

[10:23:56] <purplefox_> it was me actually :)

[10:24:01] <purplefox_> just testing the guest functionality

[10:24:11] <purplefox_> but probably this will invite spammers

[10:24:21] <cescoffier> Oh :-)

[10:24:43] <cescoffier> you are as reactive as a spam bot ;-)

[10:26:43] <cescoffier> purplefox_: guest comment not allowed anymore

[10:29:27] <purplefox_> yeah so it seems you need to sign up with disqus first then you can choose to link your account with google/facebook etc

[10:29:31] <purplefox_> it's a bit weird but it works

[10:34:03] <temporalfox> purplefox_ along with ceylon work, I'd like to improve cleanup and improve codegen

[10:34:16] <temporalfox> tests have become really messy

[10:34:44] <temporalfox> to make it easier to support and also easier to use by lang implementors

[10:34:57] <purplefox_> sounds like a good idea

[10:55:13] <cescoffier> purplefox_: did you review the post of pmlopes ?

[10:56:45] <purplefox_> which post is that?

[10:59:09] <cescoffier> purplefox_:

[11:01:43] <purplefox_> looks good to me :)

[11:02:14] <pmlopes> purplefox_ do you have a minute to talk about some redis bug that i am looking at?

[11:02:29] <purplefox_> sure

[11:02:52] <pmlopes> i am getting the exception: Can't invoke task later as EventLoop rejected it > jjva.util.concurrent.RejectedExecutionException: event executor terminated

[11:03:09] <pmlopes> when i write a test case that just loops 1000 times over a simple get operation

[11:03:57] <purplefox_> sounds like the event loop pool is getting shutdown, e.g. the vert.x instance is being closed

[11:04:26] <pmlopes> the stacktrace does not contain any method call from the redis client so i am a big puzzeled, i also put some breakpoint and it appears that during the execution it seems that the eventloop is about to shutdown

[11:05:19] <pmlopes> yes, but what can trigger that? this is my test:

[11:05:20] <purplefox_> do you have a reproducer I could take a look at?

[11:05:59] <pmlopes> the test passes strangely enough

[11:06:17] <pmlopes> but in the 10000 runs i get around 20 of these exceptions

[11:06:33] <purplefox_> ok will take a look

[11:10:35] <purplefox_> pmlopes: ok, the exceptions occur after the end of the test

[11:10:55] <purplefox_> (add a Thread.sleep() after the await() and you will see)

[11:12:02] <purplefox_> so it's probably happening when the vert.x instance is closed

[11:13:20] <pmlopes> ok

[11:50:04] <purplefox_> pmlopes: the problem occurs because Vert.x uses shutdownNow on the netty event loop group which more or less always gives this exception if channels are open when this happened.

[11:50:51] <purplefox_> the exceptions go away if shutdownNow is replace with shutdownGracefully (shutdownNow is actually deprecated, maybe because of this weird behaviour)

[11:51:05] <purplefox_> but shutdownGracefully appears to be blocking so not sure if we can use that..

[11:51:14] <purplefox_> in any case it appears harmless, just ugly in the logs

[11:51:51] <pmlopes> ok, i will continue with my issue, this does not seem to be the cause of it! thanks for your help!

[11:54:16] <purplefox_> i will try and figure out a solution which does not result in ugly logs like this

[12:46:08] <cescoffier> pmlopes: your post has been published:

[12:46:57] <pmlopes> :)

[13:15:00] <AlexLehm> purplefox_: Hi Tim, I left the idle timeout code in the source by mistake, so it is still in the 3.0.0 version of the mail module

[13:15:14] <AlexLehm> I hope that is not a big problem and we can remove it in the next version

[15:24:24] <purplefox_> pmlopes: sent a PR to fix those annoying exceptions in the logs

[15:24:46] <pmlopes> thanks! i am also almost done with the redis bug

[16:16:05] <cescoffier> purplefox_ pmlopes temporalfox : I've published a blog post showing an init.d script for vert.x 3 application (packaged as a fat jar)

[16:16:13] <cescoffier> temporalfox: look at the gist integration ;-)

[16:19:44] <purplefox_> cescoffier: cool!

[16:20:11] <cescoffier> we had this question on the mailing list couple of days ago

[16:21:14] <purplefox_> cescoffier: have you tried appending the script to the jar itself so it can be run directly as a single unit?

[16:22:15] <cescoffier> yes you can do it, then you just need the service wrapper (a basic script provided by operating system just delegating calls to your script)

[16:22:30] <cescoffier> (good idea for another post ;-) )

[16:23:53] <cescoffier> but you need to install something in the init.d directory

[16:24:08] <purplefox_> i'm not sure you'd even a service wrapper (?), aiui with spring boot jars you can just add a symlink from init.d straight to the jar…

[16:26:04] <pmlopes> i think the next step would be making a systemd unit file, way simpler and apparently the “new” standard

[16:26:53] <cescoffier> well the new standard is docker no ?

[16:26:58] <cescoffier> ;-)

[16:27:08] <cescoffier> no you are right, systemd unit file seems to be the hype

[16:27:13] <cescoffier> init.d is still widely used

[16:28:18] <pmlopes> [Service]

[16:28:26] <pmlopes> Type=simple

[16:28:29] <pmlopes> ExecStart=${JAVA_HOME}/bin/java ${JAVA_OPTS} -jar my-fat.jar

[16:28:33] <pmlopes> that is it! :)

[16:28:39] <cescoffier> hum… nope

[16:28:57] <cescoffier> most of your variables are not set yet

[16:29:53] <cescoffier> and I'm not sure expansion works in unit file

[16:30:03] <pmlopes> EnvironmentFile=-/etc/var.file

[16:30:10] <cescoffier> (because expansion is managed by the shell, and here…. it's not a shell (which make them more secured)

[16:30:17] <cescoffier> yes, that's what is missing

[16:30:23] <cescoffier> so you need the unit file and the env

[16:30:39] <cescoffier> the env is basically the beginning of the init.d file (all the variables)

[16:31:09] <pmlopes> you're right for expansion i need to wrap with bash -c

[16:31:17] <cescoffier> do you know if unit allows retrieving the current status ?

[16:31:29] <cescoffier> like service foo status ?

[16:31:56] <cescoffier> (most of example I'm finding are made to start docker container ;-))

[16:32:20] <pmlopes> you can add: SuccessExitStatus=123

[16:32:23] <cescoffier> the expansion stuff is the same issue we have in the docker file

[16:32:53] <cescoffier> that's the exeit status not the current status

[16:32:59] <cescoffier> for instance the process may have died

[16:33:08] <cescoffier> (for whatever reason)

[16:33:23] <cescoffier> generally we check that the PID still exist in ps

[16:34:39] <pmlopes> oh for that you should do: systemctl status application.service

[16:35:15] <pmlopes> systemd does not use pid files afaik

[16:38:58] <Sticky> as much as linux probably didnt need ANOTHER convention for starting services, I am much prefering upstart jobs to writing init.d scripts

[17:02:08] <pmlopes> cescoffier: this works for me:

[17:02:54] <pmlopes> cescoffier: install with: systemctl –user enable cpu.service

[17:03:06] <pmlopes> and then systemctl –user start cpu

[17:03:29] <pmlopes> i've installed to the local user so there is no need for root

[17:03:43] <pmlopes> for root then remove –user :)

[17:06:56] <cescoffi_> cool !

[17:07:18] <cescoffi_> there will be another post tomorrow thanks !

[17:10:02] <cescoffi_> and the $JAVA_OPTS works ?

[17:10:13] <cescoffi_> how does it get expanded ?

[19:27:43] <Odiel> I'm trying to implement a handler to override the response content when there is a 404 error, but I'm not able to find what I'm suppose to use to do so, can anybody give me some hints?

[19:38:17] <purplefox_> Odiel: do you mean, you would like to handle 404s yourself in the case that no other routes match?

[19:39:39] <Odiel> purplefox_: yes, that is exactly what I'll like to do

[19:40:03] <Odiel> I have a piece of code, but I'm not sure if what I'm doing is the right approach

[19:40:06] <purplefox_> you should just be able to set a handler on a route that matches everything and set it as the last route, e.g.

[19:40:25] <purplefox_> router.route().handler(rc → handle your 404 in here);

[19:40:57] <Odiel> ah

[19:41:05] <Odiel> that is what I have already

[19:41:16] <Odiel> I thought there was another way of doing it

[19:41:22] <Odiel> router.route().handler(context → { System.out.println(“failure”); HttpServerResponse response = context.response(); Route currentRoute = context.currentRoute(); if (currentRoute.getPath() == null) { response.setStatusCode(HttpStatus.SC_NOT_FOUND); response.end(“Error”); return; }; });

[19:42:01] <Odiel> I'm checking if there is no matched route, then I'm generating a not found error

[19:42:10] <purplefox_> that's pretty garbled can you post in ?

[19:42:26] <Odiel> yes, let me to dthat

[19:42:30] <Odiel> let me do that*

[19:43:08] <Odiel>

[19:44:08] <Odiel> what do you think?

[20:07:25] <aesteve> hi everyone, hi temporalfox

[20:08:02] <aesteve> I was trying to play with service proxy, I hadn't since the first 3.0 snapshots

[20:08:18] <aesteve> and I got a very weird error

[20:08:20] <aesteve> java.lang.IllegalStateException: endPosTable already set

[20:28:03] <purplefox_> Odiel: I'm not sure I understand why you're checking if path is null….

[20:29:27] <Odiel> purplefox_: in order to make sure no previous route was matched

[20:30:34] <purplefox_> i guess I don't really understand what you want to do

[20:31:24] <purplefox_> if you just want this handler to be called when no other routes match you don't need to add that check

[20:31:47] <purplefox_> and, in fact i can't think why path would ever be null anway

[20:31:55] <Odiel> what would happen if any of the previous handler is not finishing the response?

[20:32:46] <purplefox_> the next handler will only be called if you have explicitly called next() in the previosu handler

[20:33:22] <purplefox_> if (currentRoute.getPath() == null) will always be true in this handler

[20:33:26] <purplefox_> so it's redundant

[20:33:39] <Odiel> ah, ok I see what you mean

[20:34:53] <Odiel> thanks for the help