You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Joery Vreijsen <jh...@gmail.com> on 2018/01/25 11:02:33 UTC

4.2.0.M2 Dockerfile does not work

Hi,

Up on deploying my Karaf 4.2.0.M2 custom distribution in Docker I ran into the following error on startup:

ERROR [Karaf local console user karaf] Exception caught while executing command
java.lang.NullPointerException
at org.apache.karaf.shell.impl.console.ConsoleSessionImpl.readCommand(ConsoleSessionImpl.java:438)
at org.apache.karaf.shell.impl.console.ConsoleSessionImpl.run(ConsoleSessionImpl.java:391)
at java.lang.Thread.run(Thread.java:745)
Error executing command: java.lang.NullPointerException

First I thought it was something in my configuration but when i used the Dockerfile from mkroli (https://github.com/mkroli/karaf-docker/blob/master/Dockerfile) and only changed the version to 4.2.0.M2 i got the same result.
The Docker container crashes and stops immediately.

Am I doing anything wrong?

Cheers!

- Joery Vreijsen

https://www.theguild.nl/


Re: 4.2.0.M2 Dockerfile does not work

Posted by "Allan C." <al...@gmail.com>.
Could you share your post when it's up? Many thanks in advance.

Regards, Allan.

Sent from Gmail mobile.

On Jan 25, 2018 8:21 PM, "Joery Vreijsen" <jh...@gmail.com> wrote:

> Works like a charm! Thanks JB.
>
> I’ll take this up with my next upcoming “Dockerizing Karaf” blog post.
>
> Cheers,
>
> - Joery Vreijsen
>
> On 25 Jan 2018 12:37 +0100, Jean-Baptiste Onofré <jb...@nanthrax.net>, wrote:
>
> Hi,
>
> Did you try to start in server mode: bin/karaf server ?
>
> The reason is that bin/karaf by default tries to bind on the terminal: if
> you
> are not in interactive mode in Docker, it will fail.
>
> Regards
> JB
>
> On 01/25/2018 12:02 PM, Joery Vreijsen wrote:
>
> Hi,
>
> Up on deploying my Karaf 4.2.0.M2 custom distribution in Docker I ran into
> the
> following error on startup:
>
> ERROR [Karaf local console user karaf] Exception caught while executing
> command
> java.lang.NullPointerException
> at
> org.apache.karaf.shell.impl.console.ConsoleSessionImpl.readCommand(
> ConsoleSessionImpl.java:438)
> at
> org.apache.karaf.shell.impl.console.ConsoleSessionImpl.
> run(ConsoleSessionImpl.java:391)
> at java.lang.Thread.run(Thread.java:745)
> Error executing command: java.lang.NullPointerException
>
> First I thought it was something in my configuration but when i used the
> Dockerfile from mkroli
> (https://github.com/mkroli/karaf-docker/blob/master/Dockerfile) and only
> changed
> the version to 4.2.0.M2 i got the same result.
> The Docker container crashes and stops immediately.
>
> Am I doing anything wrong?
>
> Cheers!
>
> - Joery Vreijsen
>
> https://www.theguild.nl/
>
>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>
>

Re: 4.2.0.M2 Dockerfile does not work

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,

Cool.

By the way, I have a bunch of dockerfile and docker image reader, working fine
with karaf docker feature (coming soon).

I would like to publish official docker images soon. I will tackle that once
Decanter 2.0.0 is done with the PR about karaf docker.

Regards
JB

On 01/25/2018 01:20 PM, Joery Vreijsen wrote:
> Works like a charm! Thanks JB. 
> 
> I’ll take this up with my next upcoming “Dockerizing Karaf” blog post. 
> 
> Cheers,
> 
> - Joery Vreijsen 
> 
> On 25 Jan 2018 12:37 +0100, Jean-Baptiste Onofré <jb...@nanthrax.net>, wrote:
>> Hi,
>>
>> Did you try to start in server mode: bin/karaf server ?
>>
>> The reason is that bin/karaf by default tries to bind on the terminal: if you
>> are not in interactive mode in Docker, it will fail.
>>
>> Regards
>> JB
>>
>> On 01/25/2018 12:02 PM, Joery Vreijsen wrote:
>>> Hi,
>>>
>>> Up on deploying my Karaf 4.2.0.M2 custom distribution in Docker I ran into the
>>> following error on startup: 
>>>
>>> ERROR [Karaf local console user karaf] Exception caught while executing command
>>> java.lang.NullPointerException
>>> at
>>> org.apache.karaf.shell.impl.console.ConsoleSessionImpl.readCommand(ConsoleSessionImpl.java:438)
>>> at
>>> org.apache.karaf.shell.impl.console.ConsoleSessionImpl.run(ConsoleSessionImpl.java:391)
>>> at java.lang.Thread.run(Thread.java:745)
>>> Error executing command: java.lang.NullPointerException
>>>
>>> First I thought it was something in my configuration but when i used the
>>> Dockerfile from mkroli
>>> (https://github.com/mkroli/karaf-docker/blob/master/Dockerfile) and only changed
>>> the version to 4.2.0.M2 i got the same result. 
>>> The Docker container crashes and stops immediately.
>>>
>>> Am I doing anything wrong?
>>>
>>> Cheers!
>>>
>>> - Joery Vreijsen
>>>
>>> https://www.theguild.nl/
>>>
>>
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: 4.2.0.M2 Dockerfile does not work

Posted by Joery Vreijsen <jh...@gmail.com>.
Works like a charm! Thanks JB.

I’ll take this up with my next upcoming “Dockerizing Karaf” blog post.

Cheers,

- Joery Vreijsen

On 25 Jan 2018 12:37 +0100, Jean-Baptiste Onofré <jb...@nanthrax.net>, wrote:
> Hi,
>
> Did you try to start in server mode: bin/karaf server ?
>
> The reason is that bin/karaf by default tries to bind on the terminal: if you
> are not in interactive mode in Docker, it will fail.
>
> Regards
> JB
>
> On 01/25/2018 12:02 PM, Joery Vreijsen wrote:
> > Hi,
> >
> > Up on deploying my Karaf 4.2.0.M2 custom distribution in Docker I ran into the
> > following error on startup:
> >
> > ERROR [Karaf local console user karaf] Exception caught while executing command
> > java.lang.NullPointerException
> > at
> > org.apache.karaf.shell.impl.console.ConsoleSessionImpl.readCommand(ConsoleSessionImpl.java:438)
> > at
> > org.apache.karaf.shell.impl.console.ConsoleSessionImpl.run(ConsoleSessionImpl.java:391)
> > at java.lang.Thread.run(Thread.java:745)
> > Error executing command: java.lang.NullPointerException
> >
> > First I thought it was something in my configuration but when i used the
> > Dockerfile from mkroli
> > (https://github.com/mkroli/karaf-docker/blob/master/Dockerfile) and only changed
> > the version to 4.2.0.M2 i got the same result.
> > The Docker container crashes and stops immediately.
> >
> > Am I doing anything wrong?
> >
> > Cheers!
> >
> > - Joery Vreijsen
> >
> > https://www.theguild.nl/
> >
>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com

Re: 4.2.0.M2 Dockerfile does not work

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,

Did you try to start in server mode: bin/karaf server ?

The reason is that bin/karaf by default tries to bind on the terminal: if you
are not in interactive mode in Docker, it will fail.

Regards
JB

On 01/25/2018 12:02 PM, Joery Vreijsen wrote:
> Hi,
> 
> Up on deploying my Karaf 4.2.0.M2 custom distribution in Docker I ran into the
> following error on startup: 
> 
> ERROR [Karaf local console user karaf] Exception caught while executing command
> java.lang.NullPointerException
> at
> org.apache.karaf.shell.impl.console.ConsoleSessionImpl.readCommand(ConsoleSessionImpl.java:438)
> at
> org.apache.karaf.shell.impl.console.ConsoleSessionImpl.run(ConsoleSessionImpl.java:391)
> at java.lang.Thread.run(Thread.java:745)
> Error executing command: java.lang.NullPointerException
> 
> First I thought it was something in my configuration but when i used the
> Dockerfile from mkroli
> (https://github.com/mkroli/karaf-docker/blob/master/Dockerfile) and only changed
> the version to 4.2.0.M2 i got the same result. 
> The Docker container crashes and stops immediately.
> 
> Am I doing anything wrong?
> 
> Cheers!
> 
> - Joery Vreijsen
> 
> https://www.theguild.nl/
> 

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: 4.2.0.M2 Dockerfile does not work

Posted by Joery Vreijsen <jh...@gmail.com>.
Thanks for your response!

I highly doubt it is a memory issue as i have tested this on my local mac environment and on a AWS EC2 instance we run for our distribution.
Our previous Karaf 4.0.4 distribution runs without any trouble on both environments.

All help is appreciated!

Greetings,

- Joery Vreijsen

On 25 Jan 2018 12:12 +0100, wrote:
>
> Thanks for your response!
>
> I highly doubt it is a memory issue as i have tested this on my local mac environment and on a AWS EC2 instance we run for our distribution.
> Our previous Karaf 4.0.4 distribution runs without any trouble on both environments.
>
> All help is appreciated!
>
> Greetings,
>
> - Joery Vreijsen

Re: 4.2.0.M2 Dockerfile does not work

Posted by "Allan C." <al...@gmail.com>.
I can only guess it's out of memory. Running a java docker is not as
straightforward maybe you can try fiddle with the memory parameters?

Regards, Allan.

Sent from Gmail mobile.

On Jan 25, 2018 7:03 PM, "Joery Vreijsen" <jh...@gmail.com> wrote:

> Hi,
>
> Up on deploying my Karaf 4.2.0.M2 custom distribution in Docker I ran into
> the following error on startup:
>
> ERROR [Karaf local console user karaf] Exception caught while executing
> command
> java.lang.NullPointerException
> at org.apache.karaf.shell.impl.console.ConsoleSessionImpl.readCommand(
> ConsoleSessionImpl.java:438)
> at org.apache.karaf.shell.impl.console.ConsoleSessionImpl.
> run(ConsoleSessionImpl.java:391)
> at java.lang.Thread.run(Thread.java:745)
> Error executing command: java.lang.NullPointerException
>
> First I thought it was something in my configuration but when i used the
> Dockerfile from mkroli (https://github.com/mkroli/
> karaf-docker/blob/master/Dockerfile) and only changed the version to
> 4.2.0.M2 i got the same result.
> The Docker container crashes and stops immediately.
>
> Am I doing anything wrong?
>
> Cheers!
>
> - Joery Vreijsen
>
> https://www.theguild.nl/
>
>