You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jclouds.apache.org by Giovanni Toraldo <gi...@cloudesire.com> on 2015/10/23 11:06:16 UTC

Oops with DigitalOcean and jclouds 1.9.1

Hi,

we are repeatedly getting a JsonSyntaxException during nightly builds,
but we are not able to reproduce this one locally, everything works
fine.

https://gist.github.com/gionn/e2eb0bae94369ec8ca7c

Suggestions?

-- 
Giovanni Toraldo
Lead Developer
https://cloudesire.com

Re: Oops with DigitalOcean and jclouds 1.9.1

Posted by Ignasi Barrera <na...@apache.org>.
I've just opened: https://github.com/jclouds/jclouds/pull/873

It would be great if you could build the PR branch and use that
version in your builds. Let's see if the more detailed exceptions
bring some light and help us understand what is going on.

On 27 October 2015 at 20:30, Giovanni Toraldo
<gi...@cloudesire.com> wrote:
> On Tue, Oct 27, 2015 at 6:19 PM, Ignasi Barrera <na...@apache.org> wrote:
>> In order to get a better understanding of what is going on, I'll push a
>> branch with verbose logging at that point. Would you be able to build that
>> and use it in your build, to see more context when the failure happens?
>
> Yeah, no problems, thanks!
>
> --
> Giovanni Toraldo
> Lead Developer
> https://cloudesire.com

Re: Oops with DigitalOcean and jclouds 1.9.1

Posted by Giovanni Toraldo <gi...@cloudesire.com>.
On Tue, Oct 27, 2015 at 6:19 PM, Ignasi Barrera <na...@apache.org> wrote:
> In order to get a better understanding of what is going on, I'll push a
> branch with verbose logging at that point. Would you be able to build that
> and use it in your build, to see more context when the failure happens?

Yeah, no problems, thanks!

-- 
Giovanni Toraldo
Lead Developer
https://cloudesire.com

Re: Oops with DigitalOcean and jclouds 1.9.1

Posted by Ignasi Barrera <na...@apache.org>.
Well, although it is gson the one that deserializes, it is using a strategy
class provided by jclouds to lookup the constructor or factory method to
invoke:
https://github.com/jclouds/jclouds/blob/master/core/src/main/java/org/jclouds/json/internal/NamingStrategies.java#L183

The domain objects in DigitalOcean use Google Auto, and are auto-generated
at build time. Perhaps that is what is causing conflicts with jacoco.

In order to get a better understanding of what is going on, I'll push a
branch with verbose logging at that point. Would you be able to build that
and use it in your build, to see more context when the failure happens?
Hi,

after a little of investigation, it's look like that I can reproduce
this bug only when running integration tests with jacoco coverage
agent enabled (that was the reason why I cannot reproduce on IDE nor
on production, but only when running integration tests under jenkins).

So this is probably a specific issue within GSON and the jacoco
bytecode instrumentation.

I've tried upgrading GSON to 2.4 and jacoco to 0.7.5.201505241946,
anything changed.

Not jclouds fault, I will try to report this upstream.

Thanks!

--
Giovanni Toraldo
Lead Developer
https://cloudesire.com

Re: Oops with DigitalOcean and jclouds 1.9.1

Posted by Giovanni Toraldo <gi...@cloudesire.com>.
Hi,

after a little of investigation, it's look like that I can reproduce
this bug only when running integration tests with jacoco coverage
agent enabled (that was the reason why I cannot reproduce on IDE nor
on production, but only when running integration tests under jenkins).

So this is probably a specific issue within GSON and the jacoco
bytecode instrumentation.

I've tried upgrading GSON to 2.4 and jacoco to 0.7.5.201505241946,
anything changed.

Not jclouds fault, I will try to report this upstream.

Thanks!

-- 
Giovanni Toraldo
Lead Developer
https://cloudesire.com

Re: Oops with DigitalOcean and jclouds 1.9.1

Posted by Ignasi Barrera <na...@apache.org>.
For the record, I'm using jclouds 1.9.1 and digitalocean, and running
the app on a:
   Java version: 1.8.0_45, vendor: Oracle Corporation

And have no issues. Could you also try that version of the JVM?

On 26 October 2015 at 14:58, Ignasi Barrera <na...@apache.org> wrote:
> Yes, it looks good.
>
> Can you try a build with Java 7? It is the official version supported
> to build jclouds, although we have some builds configured to use Java
> 8, but not in jclouds-labs. Just to isolate the issue, as in the past
> we found that the JVM influenced.
>
> Also you should revoke your DigitalOcean token and generate a new one,
> since the Authorization header is exposed in your gist :) Keep that in
> mind when sharing the wire logs!
>
>
> I.
>
> On 26 October 2015 at 13:57, Giovanni Toraldo
> <gi...@cloudesire.com> wrote:
>> On Sun, Oct 25, 2015 at 7:34 AM, Giovanni Toraldo <me...@gionn.net> wrote:
>>> I've added dependencies and mvn/java version to the previous gist, I should
>>> be able to provide wire logs tomorrow.
>>
>> https://gist.github.com/gionn/e2eb0bae94369ec8ca7c#file-wire-log
>>
>> Attached wire logs, JSON reply looks good for me.
>>
>> Thanks.
>>
>> --
>> Giovanni Toraldo
>> Lead Developer
>> https://cloudesire.com

Re: Oops with DigitalOcean and jclouds 1.9.1

Posted by Ignasi Barrera <na...@apache.org>.
Yes, it looks good.

Can you try a build with Java 7? It is the official version supported
to build jclouds, although we have some builds configured to use Java
8, but not in jclouds-labs. Just to isolate the issue, as in the past
we found that the JVM influenced.

Also you should revoke your DigitalOcean token and generate a new one,
since the Authorization header is exposed in your gist :) Keep that in
mind when sharing the wire logs!


I.

On 26 October 2015 at 13:57, Giovanni Toraldo
<gi...@cloudesire.com> wrote:
> On Sun, Oct 25, 2015 at 7:34 AM, Giovanni Toraldo <me...@gionn.net> wrote:
>> I've added dependencies and mvn/java version to the previous gist, I should
>> be able to provide wire logs tomorrow.
>
> https://gist.github.com/gionn/e2eb0bae94369ec8ca7c#file-wire-log
>
> Attached wire logs, JSON reply looks good for me.
>
> Thanks.
>
> --
> Giovanni Toraldo
> Lead Developer
> https://cloudesire.com

Re: Oops with DigitalOcean and jclouds 1.9.1

Posted by Giovanni Toraldo <gi...@cloudesire.com>.
On Sun, Oct 25, 2015 at 7:34 AM, Giovanni Toraldo <me...@gionn.net> wrote:
> I've added dependencies and mvn/java version to the previous gist, I should
> be able to provide wire logs tomorrow.

https://gist.github.com/gionn/e2eb0bae94369ec8ca7c#file-wire-log

Attached wire logs, JSON reply looks good for me.

Thanks.

-- 
Giovanni Toraldo
Lead Developer
https://cloudesire.com

Re: Oops with DigitalOcean and jclouds 1.9.1

Posted by Giovanni Toraldo <me...@gionn.net>.
Hi Ignasi,

thanks for the fast response.

I've added dependencies and mvn/java version to the previous gist, I should
be able to provide wire logs tomorrow.

Thanks!

Il giorno ven 23 ott 2015, 12:47 Ignasi Barrera <na...@apache.org> ha
scritto:

> Hi Giovanni,
>
> We already saw that issue in earlier versions [1] but it turned to be
> an issue with the domain classes having more than one constructor.
> Looking at your stacktrace I can see the issue is raised here [2],
> when jclouds tries to deserialize the list of regions and determine
> which json field maps to each Java object field by checking the
> SerializedNames annotation [3].
>
> I can't figure out why that is happening and is not reproducible, so
> it would be very helpful if you can provide:
>
> * The exact Maven and Java version that is being used to run the build.
> * The output of the "mvn dependency:tree" executed in the machine
> where you run the builds. Just to have the exact pictures of which
> dependencies and versions are being used in the build that fails.
> * The jclouds.wire logs [4] corresponding to the response returned in
> that call that fails
>
>
>
> I.
>
> [1] https://issues.apache.org/jira/browse/JCLOUDS-857
> [2]
> https://github.com/jclouds/jclouds/blob/master/core/src/main/java/org/jclouds/json/internal/NamingStrategies.java#L183
> [3]
> https://github.com/jclouds/jclouds-labs/blob/jclouds-labs-1.9.1/digitalocean2/src/main/java/org/jclouds/digitalocean2/domain/Region.java#L33
> [4] http://jclouds.apache.org/reference/logging/
>
> On 23 October 2015 at 11:06, Giovanni Toraldo
> <gi...@cloudesire.com> wrote:
> > Hi,
> >
> > we are repeatedly getting a JsonSyntaxException during nightly builds,
> > but we are not able to reproduce this one locally, everything works
> > fine.
> >
> > https://gist.github.com/gionn/e2eb0bae94369ec8ca7c
> >
> > Suggestions?
> >
> > --
> > Giovanni Toraldo
> > Lead Developer
> > https://cloudesire.com
>
-- 
Giovanni Toraldo
https://gionn.net

Re: Oops with DigitalOcean and jclouds 1.9.1

Posted by Ignasi Barrera <na...@apache.org>.
Hi Giovanni,

We already saw that issue in earlier versions [1] but it turned to be
an issue with the domain classes having more than one constructor.
Looking at your stacktrace I can see the issue is raised here [2],
when jclouds tries to deserialize the list of regions and determine
which json field maps to each Java object field by checking the
SerializedNames annotation [3].

I can't figure out why that is happening and is not reproducible, so
it would be very helpful if you can provide:

* The exact Maven and Java version that is being used to run the build.
* The output of the "mvn dependency:tree" executed in the machine
where you run the builds. Just to have the exact pictures of which
dependencies and versions are being used in the build that fails.
* The jclouds.wire logs [4] corresponding to the response returned in
that call that fails



I.

[1] https://issues.apache.org/jira/browse/JCLOUDS-857
[2] https://github.com/jclouds/jclouds/blob/master/core/src/main/java/org/jclouds/json/internal/NamingStrategies.java#L183
[3] https://github.com/jclouds/jclouds-labs/blob/jclouds-labs-1.9.1/digitalocean2/src/main/java/org/jclouds/digitalocean2/domain/Region.java#L33
[4] http://jclouds.apache.org/reference/logging/

On 23 October 2015 at 11:06, Giovanni Toraldo
<gi...@cloudesire.com> wrote:
> Hi,
>
> we are repeatedly getting a JsonSyntaxException during nightly builds,
> but we are not able to reproduce this one locally, everything works
> fine.
>
> https://gist.github.com/gionn/e2eb0bae94369ec8ca7c
>
> Suggestions?
>
> --
> Giovanni Toraldo
> Lead Developer
> https://cloudesire.com