You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@guacamole.apache.org by Niubbo75 <a....@me.com> on 2019/07/05 12:57:21 UTC

Error when I try to compile TOTP

Hello all, I am trying to create a .jar from source of TOTP but I get this
error:

[ERROR] Failed to execute goal on project guacamole-auth-totp: Could not
resolve dependencies for project
org.apache.guacamole:guacamole-auth-totp:jar:1.1.0: Failure to find
org.apache.guacamole:guacamole-ext:jar:1.1.0 in
https://repo.maven.apache.org/maven2 was cached in the local repository,
resolution will not be reattempted until the update interval of central has
elapsed or updates are forced -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute
goal on project guacamole-auth-totp: Could not resolve dependencies for
project org.apache.guacamole:guacamole-auth-totp:jar:1.1.0: Failure to find
org.apache.guacamole:guacamole-ext:jar:1.1.0 in
https://repo.maven.apache.org/maven2 was cached in the local repository,
resolution will not be reattempted until the update interval of central has
elapsed or updates are forced

Where I'm wrong? What did I miss? I'm totally newbe and I'm trying to learn,
thanks for your reply.
Alessandro



--
Sent from: http://apache-guacamole-general-user-mailing-list.2363388.n4.nabble.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@guacamole.apache.org
For additional commands, e-mail: user-help@guacamole.apache.org


Re: Error when I try to compile TOTP

Posted by Niubbo75 <a....@me.com>.
Hello Mike,
I've just rebuild guacamole from the same source code I've used before, on a
new (in real on a couple) Debian's VM and this time seems it work (I've not
try to login yet because I'm trying to setup guacamole client on a VM and
guacamole server on another and I'm not done yet), looking at catalina.out
after tomcat start I find totp loaded w/out errors.
I'll keep update on that, thanks.
Bests, Alessandro



--
Sent from: http://apache-guacamole-general-user-mailing-list.2363388.n4.nabble.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@guacamole.apache.org
For additional commands, e-mail: user-help@guacamole.apache.org


Re: Error when I try to compile TOTP

Posted by Mike Jumper <mj...@apache.org>.
On Sun, Jul 7, 2019 at 2:09 PM Nick Couchman <vn...@apache.org> wrote:

>
> Here the error from catalina.out:
>>
>> 10:00:25.850 [localhost-startStop-1] ERROR
>> o.a.h.extension.ExtensionModule -
>> Extension "guacamole-auth-totp-1.0.0.jar" could not be loaded:
>> Authentication provider class cannot be loaded (wrong version of API?).
>> 10:00:25.853 [localhost-startStop-1] INFO
>> o.a.h.environment.LocalEnvironment - GUACAMOLE_HOME is "/etc/guacamole".
>>
>> I use MySQL authenticator and it works great, I have put *.jar in
>> /etc/guacamole/extensions/ and from what I have found about TOTP, it don't
>> need any configuration file nor into guacamole.properties, am I right?
>>
>
> Yeah, it seems like there's some sort of mis-match between the TOTP jar
> you're installing and the version of Guacamole Client that you're running.
> Make sure it's all downloaded from the same place and the exact same
> build/version.  Just changing the version number somewhere in the code from
> 1.1.0 to 1.0.0 or changing the filename won't do - the builds need to match
> up.
>

BUT: If this is the TOTP extension from 1.0.0 and is occurring with a build
of the Guacamole webapp from git (either master or staging/1.1.0), it's
worth checking whether this is reproducible. The webapp from any 1.y
release is supposed to be compatible with extensions from 1.x so long as x
<= y, and there is specific ABI magic in 1.1.0 intended to allow
compatibility with extensions from 1.0.0.

If this is TOTP from 1.0.0 and webapp from git, my understanding is it
should work. If it doesn't ... we probably need to nail that down before
1.1.0.

- Mike

Re: Error when I try to compile TOTP

Posted by Nick Couchman <vn...@apache.org>.
> Here the error from catalina.out:
>
> 10:00:25.850 [localhost-startStop-1] ERROR o.a.h.extension.ExtensionModule
> -
> Extension "guacamole-auth-totp-1.0.0.jar" could not be loaded:
> Authentication provider class cannot be loaded (wrong version of API?).
> 10:00:25.853 [localhost-startStop-1] INFO
> o.a.h.environment.LocalEnvironment - GUACAMOLE_HOME is "/etc/guacamole".
>
> I use MySQL authenticator and it works great, I have put *.jar in
> /etc/guacamole/extensions/ and from what I have found about TOTP, it don't
> need any configuration file nor into guacamole.properties, am I right?
>

Yeah, it seems like there's some sort of mis-match between the TOTP jar
you're installing and the version of Guacamole Client that you're running.
Make sure it's all downloaded from the same place and the exact same
build/version.  Just changing the version number somewhere in the code from
1.1.0 to 1.0.0 or changing the filename won't do - the builds need to match
up.


>
> >
> > You can do this by cloning the git repository - either your fork or the
> > original one - and then checking out the 1.0.0 tag.  This is the place in
> > git where 1.0.0 was released, so it should match your running 1.0.0
> > version.  You can then modify and build the code from there, and should
> be
> > able to build just the TOTP module and add that to your existing
> > installation.
> >
> > -Nick
>
> This point isn't clear to me, can you please explain it in deep? Thanks!
>

The git repository has branches and tags.  Branches are the active working
places where code is being updated - so, currently we have the master
branch, which contains all changes, and the staging/1.1.0 branch, which
contains changes that will go into the 1.1.0 release.  For historical
reasons, we also have tags - so, within the git repo, each version we've
released is tagged such that you can check out the code at a particular
release.  When you clone the repo you can then do a "git checkout <tag>"
and you'll be taken to the commit that represents that version of code -
e.g. "git checkout 1.0.0" will take you to the commit where 1.0.0 was
released.

This puts you in a "detached head" state, where your working repository
doesn't match up with any branch, so you won't be able to commit anything
from there, but you can build the code and effectively build from a
particular release.  You can also then checkout a tag into a new branch so
that you can make changes and commit the code.

-Nick

Re: Error when I try to compile TOTP

Posted by Niubbo75 <a....@me.com>.
vnick wrote
> On Fri, Jul 5, 2019 at 9:57 AM Niubbo75 &lt;

> a.sironi@

> &gt; wrote:
> 
>> Hello Nick and thankyou for your reply!
>>
>>
>> vnick wrote
>> > A couple of things, here:
>> > - It looks like maybe you're trying to build the TOTP module by itself,
>> > without building the entire code base?  You probably should do this -
>> > maybe
>> > make sure you're executing the "mvn package" command at the top-level
>> > guacamole-client directory so that everything gets built?
>>
>> Exactly! I'm trying to compile only TOTP, not the entire code base (FYI I
>> still have 1.0.0 working & running but I can't use TOTP.jar I have into
>> extensions from compiled code, it don't work, catalina.out tell it can't
>> load it saying "maybe wrong API?").
>>
> 
> If you post the errors you're getting, we might be able to help clear that
> up.

Here the error from catalina.out:

10:00:25.850 [localhost-startStop-1] ERROR o.a.h.extension.ExtensionModule -
Extension "guacamole-auth-totp-1.0.0.jar" could not be loaded:
Authentication provider class cannot be loaded (wrong version of API?).
10:00:25.853 [localhost-startStop-1] INFO 
o.a.h.environment.LocalEnvironment - GUACAMOLE_HOME is "/etc/guacamole".

I use MySQL authenticator and it works great, I have put *.jar in
/etc/guacamole/extensions/ and from what I have found about TOTP, it don't
need any configuration file nor into guacamole.properties, am I right?


vnick wrote
>> I'll also would like to learn something new from this (never have had
>> experience with maven before).
>> Plus. I would like to learn how to "fork" a project like guacamole into
>> something customized by me (this for learning purpouse), so I would like
>> to
>> try to customize TOTP with, i.e., another language or something else
>> different from the original one, another plus for me will be try to build
>> my
>> own maven's repository for my personal projects, but this seems to be OT
>>
>>
> Cool - maybe soon you'll be contributing to the project!! :-D

I hope so! ATM I'm really really newbe.


vnick wrote
> To fork the
> code the easiest way is to make sure you have a Github account, then go to
> the Apache Guacamole Client repository, and click the Fork button.  You'll
> be guided through the process of forking to a new repo/location.

Done yet, I know how to fork a github project, I was ment by "fork" how to
create custom code 


vnick wrote
>> So, what can I do to build my "own" TOTP to have it working on my
>> guacamole
>> 1.0.0?
> 
> 
> You can do this by cloning the git repository - either your fork or the
> original one - and then checking out the 1.0.0 tag.  This is the place in
> git where 1.0.0 was released, so it should match your running 1.0.0
> version.  You can then modify and build the code from there, and should be
> able to build just the TOTP module and add that to your existing
> installation.
> 
> -Nick

This point isn't clear to me, can you please explain it in deep? Thanks!

Bests,
Alessandro




--
Sent from: http://apache-guacamole-general-user-mailing-list.2363388.n4.nabble.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@guacamole.apache.org
For additional commands, e-mail: user-help@guacamole.apache.org


Re: Error when I try to compile TOTP

Posted by Nick Couchman <vn...@apache.org>.
On Fri, Jul 5, 2019 at 9:57 AM Niubbo75 <a....@me.com> wrote:

> Hello Nick and thankyou for your reply!
>
>
> vnick wrote
> > A couple of things, here:
> > - It looks like maybe you're trying to build the TOTP module by itself,
> > without building the entire code base?  You probably should do this -
> > maybe
> > make sure you're executing the "mvn package" command at the top-level
> > guacamole-client directory so that everything gets built?
>
> Exactly! I'm trying to compile only TOTP, not the entire code base (FYI I
> still have 1.0.0 working & running but I can't use TOTP.jar I have into
> extensions from compiled code, it don't work, catalina.out tell it can't
> load it saying "maybe wrong API?").
>

If you post the errors you're getting, we might be able to help clear that
up.


> I'll also would like to learn something new from this (never have had
> experience with maven before).
> Plus. I would like to learn how to "fork" a project like guacamole into
> something customized by me (this for learning purpouse), so I would like to
> try to customize TOTP with, i.e., another language or something else
> different from the original one, another plus for me will be try to build
> my
> own maven's repository for my personal projects, but this seems to be OT
>
>
Cool - maybe soon you'll be contributing to the project!! :-D  To fork the
code the easiest way is to make sure you have a Github account, then go to
the Apache Guacamole Client repository, and click the Fork button.  You'll
be guided through the process of forking to a new repo/location.


> So, what can I do to build my "own" TOTP to have it working on my guacamole
> 1.0.0?


You can do this by cloning the git repository - either your fork or the
original one - and then checking out the 1.0.0 tag.  This is the place in
git where 1.0.0 was released, so it should match your running 1.0.0
version.  You can then modify and build the code from there, and should be
able to build just the TOTP module and add that to your existing
installation.

-Nick

Re: Error when I try to compile TOTP

Posted by Niubbo75 <a....@me.com>.
Hello Nick and thankyou for your reply!


vnick wrote
> A couple of things, here:
> - It looks like maybe you're trying to build the TOTP module by itself,
> without building the entire code base?  You probably should do this -
> maybe
> make sure you're executing the "mvn package" command at the top-level
> guacamole-client directory so that everything gets built?

Exactly! I'm trying to compile only TOTP, not the entire code base (FYI I
still have 1.0.0 working & running but I can't use TOTP.jar I have into
extensions from compiled code, it don't work, catalina.out tell it can't
load it saying "maybe wrong API?").
I'll also would like to learn something new from this (never have had
experience with maven before).
Plus. I would like to learn how to "fork" a project like guacamole into
something customized by me (this for learning purpouse), so I would like to
try to customize TOTP with, i.e., another language or something else
different from the original one, another plus for me will be try to build my
own maven's repository for my personal projects, but this seems to be OT 

So, what can I do to build my "own" TOTP to have it working on my guacamole
1.0.0?
Thanks for your reply,
bests, Alessandro



--
Sent from: http://apache-guacamole-general-user-mailing-list.2363388.n4.nabble.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@guacamole.apache.org
For additional commands, e-mail: user-help@guacamole.apache.org


Re: Error when I try to compile TOTP

Posted by Nick Couchman <vn...@apache.org>.
On Fri, Jul 5, 2019 at 8:57 AM Niubbo75 <a....@me.com> wrote:

> Hello all, I am trying to create a .jar from source of TOTP but I get this
> error:
>
> [ERROR] Failed to execute goal on project guacamole-auth-totp: Could not
> resolve dependencies for project
> org.apache.guacamole:guacamole-auth-totp:jar:1.1.0: Failure to find
> org.apache.guacamole:guacamole-ext:jar:1.1.0 in
> https://repo.maven.apache.org/maven2 was cached in the local repository,
> resolution will not be reattempted until the update interval of central has
> elapsed or updates are forced -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute
> goal on project guacamole-auth-totp: Could not resolve dependencies for
> project org.apache.guacamole:guacamole-auth-totp:jar:1.1.0: Failure to find
> org.apache.guacamole:guacamole-ext:jar:1.1.0 in
> https://repo.maven.apache.org/maven2 was cached in the local repository,
> resolution will not be reattempted until the update interval of central has
> elapsed or updates are forced
>
> Where I'm wrong? What did I miss? I'm totally newbe and I'm trying to
> learn,
> thanks for your reply.
> Alessandro
>
>
A couple of things, here:
- It looks like maybe you're trying to build the TOTP module by itself,
without building the entire code base?  You probably should do this - maybe
make sure you're executing the "mvn package" command at the top-level
guacamole-client directory so that everything gets built?
- You actually should be able to build individual components, normally;
however, you're building from the git repo, which means that the
dependencies (like guacamole-ext) for that version are not going to exist
in the upstream maven repositories.  That's one reason you need to build
the entire project and not just one component.  Once 1.1.0 is actually
released this would probably work, but, until then, you'll need to build
the whole package.
- Also, just a note, if you're trying to just build a single component,
make sure you're installing that into the same version of code that you're
running your Guacamole install on.  If you have version 1.0.0 running,
don't try to build TOTP from git (1.1.0) and install that - it likely won't
work.

-Nick