You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Charles Moulliard <ch...@gmail.com> on 2016/02/04 21:00:38 UTC
Karaf stays blocked when it shutdowns
Hi,
My Karaf 2.4.4 container stays blocked when it shutdowns and reports this
error
Exception in thread "Karaf Shell Console Thread"
java.lang.NullPointerException
at java.io.Writer.write(Writer.java:157)
at java.io.BufferedWriter.newLine(BufferedWriter.java:243)
at java.io.PrintStream.newLine(PrintStream.java:544)
at java.io.PrintStream.println(PrintStream.java:824)
at jline.console.history.FileHistory.flush(FileHistory.java:90)
at
org.apache.karaf.shell.console.jline.KarafFileHistory.flush(KarafFileHistory.java:65)
at org.apache.karaf.shell.console.jline.Console.close(Console.java:163)
at org.apache.karaf.shell.console.jline.Console.run(Console.java:216)
at
org.apache.karaf.shell.console.jline.DelayedStarted.run(DelayedStarted.java:79)
How can I investigate why the thread is blocked and that I must kill the
process to restart it
Regards,
--
Charles Moulliard
Apache Committer & PMC / Architect @RedHat
Twitter : @cmoulliard | Blog : http://cmoulliard.github.io
Re: Karaf stays blocked when it shutdowns
Posted by Charles Moulliard <ch...@gmail.com>.
Code has been changed to use OSGI Config Admin and the problem is gone.
I'm very curious to know why such code (System.setProperties) can result in
a so huge issue
On Fri, Feb 5, 2016 at 11:46 AM, Jean-Baptiste Onofré <jb...@nanthrax.net>
wrote:
> Weird as it's what we do in Karaf ;)
>
> On 02/05/2016 11:41 AM, Charles Moulliard wrote:
>
>> The root cause has been identified. Felix doesn't like very well that we
>> set System Properties within Activator
>>
>> public void init() {
>> Properties props = new Properties();
>> props.setProperty("apiman.es.protocol", "http");
>> ...
>> System.setProperties(props);
>>
>> On Fri, Feb 5, 2016 at 10:23 AM, Jean-Baptiste Onofré <jb@nanthrax.net
>> <ma...@nanthrax.net>> wrote:
>>
>> The screenshot contains a heapdump, not a thread dump.
>>
>> I think the NPE is a consequence, so we have to find the cause.
>>
>> A thread dump should help to see locked or parked threads.
>>
>> Regards
>> JB
>>
>> On 02/04/2016 10:49 PM, Charles Moulliard wrote:
>>
>> Yes I can do that with jmap. Here is a screenshot -
>>
>> https://www.dropbox.com/s/9nns0coyue9j6zt/Screenshot%202016-02-04%2022.48.56.png?dl=0
>>
>> On Thu, Feb 4, 2016 at 9:31 PM, Jean-Baptiste Onofré
>> <jb@nanthrax.net <ma...@nanthrax.net>
>> <mailto:jb@nanthrax.net <ma...@nanthrax.net>>> wrote:
>>
>> Can you take a thread dump ?
>>
>> Regards
>> JB
>>
>>
>> On 02/04/2016 09:00 PM, Charles Moulliard wrote:
>>
>> Hi,
>>
>> My Karaf 2.4.4 container stays blocked when it
>> shutdowns and reports
>> this error
>>
>> Exception in thread "Karaf Shell Console Thread"
>> java.lang.NullPointerException
>> at java.io.Writer.write(Writer.java:157)
>> at
>> java.io.BufferedWriter.newLine(BufferedWriter.java:243)
>> at java.io.PrintStream.newLine(PrintStream.java:544)
>> at java.io.PrintStream.println(PrintStream.java:824)
>> at
>> jline.console.history.FileHistory.flush(FileHistory.java:90)
>> at
>>
>>
>> org.apache.karaf.shell.console.jline.KarafFileHistory.flush(KarafFileHistory.java:65)
>> at
>>
>>
>> org.apache.karaf.shell.console.jline.Console.close(Console.java:163)
>> at
>>
>> org.apache.karaf.shell.console.jline.Console.run(Console.java:216)
>> at
>>
>>
>> org.apache.karaf.shell.console.jline.DelayedStarted.run(DelayedStarted.java:79)
>>
>> How can I investigate why the thread is blocked and
>> that I must
>> kill the
>> process to restart it
>>
>> Regards,
>>
>> --
>> Charles Moulliard
>> Apache Committer & PMC / Architect @RedHat
>> Twitter : @cmoulliard | Blog :
>> http://cmoulliard.github.io
>> <http://cmoulliard.github.io>
>>
>>
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org <ma...@apache.org>
>> <mailto:jbonofre@apache.org <ma...@apache.org>>
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>>
>>
>>
>>
>> --
>> Charles Moulliard
>> Apache Committer & PMC / Architect @RedHat
>> Twitter : @cmoulliard | Blog : http://cmoulliard.github.io
>> <http://cmoulliard.github.io>
>>
>>
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org <ma...@apache.org>
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>>
>>
>>
>>
>> --
>> Charles Moulliard
>> Apache Committer & PMC / Architect @RedHat
>> Twitter : @cmoulliard | Blog : http://cmoulliard.github.io
>> <http://cmoulliard.github.io>
>>
>>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>
--
Charles Moulliard
Apache Committer & PMC / Architect @RedHat
Twitter : @cmoulliard | Blog : http://cmoulliard.github.io
Re: Karaf stays blocked when it shutdowns
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Weird as it's what we do in Karaf ;)
On 02/05/2016 11:41 AM, Charles Moulliard wrote:
> The root cause has been identified. Felix doesn't like very well that we
> set System Properties within Activator
>
> public void init() {
> Properties props = new Properties();
> props.setProperty("apiman.es.protocol", "http");
> ...
> System.setProperties(props);
>
> On Fri, Feb 5, 2016 at 10:23 AM, Jean-Baptiste Onofré <jb@nanthrax.net
> <ma...@nanthrax.net>> wrote:
>
> The screenshot contains a heapdump, not a thread dump.
>
> I think the NPE is a consequence, so we have to find the cause.
>
> A thread dump should help to see locked or parked threads.
>
> Regards
> JB
>
> On 02/04/2016 10:49 PM, Charles Moulliard wrote:
>
> Yes I can do that with jmap. Here is a screenshot -
> https://www.dropbox.com/s/9nns0coyue9j6zt/Screenshot%202016-02-04%2022.48.56.png?dl=0
>
> On Thu, Feb 4, 2016 at 9:31 PM, Jean-Baptiste Onofré
> <jb@nanthrax.net <ma...@nanthrax.net>
> <mailto:jb@nanthrax.net <ma...@nanthrax.net>>> wrote:
>
> Can you take a thread dump ?
>
> Regards
> JB
>
>
> On 02/04/2016 09:00 PM, Charles Moulliard wrote:
>
> Hi,
>
> My Karaf 2.4.4 container stays blocked when it
> shutdowns and reports
> this error
>
> Exception in thread "Karaf Shell Console Thread"
> java.lang.NullPointerException
> at java.io.Writer.write(Writer.java:157)
> at java.io.BufferedWriter.newLine(BufferedWriter.java:243)
> at java.io.PrintStream.newLine(PrintStream.java:544)
> at java.io.PrintStream.println(PrintStream.java:824)
> at
> jline.console.history.FileHistory.flush(FileHistory.java:90)
> at
>
> org.apache.karaf.shell.console.jline.KarafFileHistory.flush(KarafFileHistory.java:65)
> at
>
> org.apache.karaf.shell.console.jline.Console.close(Console.java:163)
> at
>
> org.apache.karaf.shell.console.jline.Console.run(Console.java:216)
> at
>
> org.apache.karaf.shell.console.jline.DelayedStarted.run(DelayedStarted.java:79)
>
> How can I investigate why the thread is blocked and
> that I must
> kill the
> process to restart it
>
> Regards,
>
> --
> Charles Moulliard
> Apache Committer & PMC / Architect @RedHat
> Twitter : @cmoulliard | Blog : http://cmoulliard.github.io
> <http://cmoulliard.github.io>
>
>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org <ma...@apache.org>
> <mailto:jbonofre@apache.org <ma...@apache.org>>
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>
>
>
>
> --
> Charles Moulliard
> Apache Committer & PMC / Architect @RedHat
> Twitter : @cmoulliard | Blog : http://cmoulliard.github.io
> <http://cmoulliard.github.io>
>
>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org <ma...@apache.org>
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>
>
>
>
> --
> Charles Moulliard
> Apache Committer & PMC / Architect @RedHat
> Twitter : @cmoulliard | Blog : http://cmoulliard.github.io
> <http://cmoulliard.github.io>
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
Re: Karaf stays blocked when it shutdowns
Posted by Charles Moulliard <ch...@gmail.com>.
The root cause has been identified. Felix doesn't like very well that we
set System Properties within Activator
public void init() {
Properties props = new Properties();
props.setProperty("apiman.es.protocol", "http");
...
System.setProperties(props);
On Fri, Feb 5, 2016 at 10:23 AM, Jean-Baptiste Onofré <jb...@nanthrax.net>
wrote:
> The screenshot contains a heapdump, not a thread dump.
>
> I think the NPE is a consequence, so we have to find the cause.
>
> A thread dump should help to see locked or parked threads.
>
> Regards
> JB
>
> On 02/04/2016 10:49 PM, Charles Moulliard wrote:
>
>> Yes I can do that with jmap. Here is a screenshot -
>>
>> https://www.dropbox.com/s/9nns0coyue9j6zt/Screenshot%202016-02-04%2022.48.56.png?dl=0
>>
>> On Thu, Feb 4, 2016 at 9:31 PM, Jean-Baptiste Onofré <jb@nanthrax.net
>> <ma...@nanthrax.net>> wrote:
>>
>> Can you take a thread dump ?
>>
>> Regards
>> JB
>>
>>
>> On 02/04/2016 09:00 PM, Charles Moulliard wrote:
>>
>> Hi,
>>
>> My Karaf 2.4.4 container stays blocked when it shutdowns and
>> reports
>> this error
>>
>> Exception in thread "Karaf Shell Console Thread"
>> java.lang.NullPointerException
>> at java.io.Writer.write(Writer.java:157)
>> at java.io.BufferedWriter.newLine(BufferedWriter.java:243)
>> at java.io.PrintStream.newLine(PrintStream.java:544)
>> at java.io.PrintStream.println(PrintStream.java:824)
>> at jline.console.history.FileHistory.flush(FileHistory.java:90)
>> at
>>
>> org.apache.karaf.shell.console.jline.KarafFileHistory.flush(KarafFileHistory.java:65)
>> at
>>
>> org.apache.karaf.shell.console.jline.Console.close(Console.java:163)
>> at
>> org.apache.karaf.shell.console.jline.Console.run(Console.java:216)
>> at
>>
>> org.apache.karaf.shell.console.jline.DelayedStarted.run(DelayedStarted.java:79)
>>
>> How can I investigate why the thread is blocked and that I must
>> kill the
>> process to restart it
>>
>> Regards,
>>
>> --
>> Charles Moulliard
>> Apache Committer & PMC / Architect @RedHat
>> Twitter : @cmoulliard | Blog : http://cmoulliard.github.io
>> <http://cmoulliard.github.io>
>>
>>
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org <ma...@apache.org>
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>>
>>
>>
>>
>> --
>> Charles Moulliard
>> Apache Committer & PMC / Architect @RedHat
>> Twitter : @cmoulliard | Blog : http://cmoulliard.github.io
>> <http://cmoulliard.github.io>
>>
>>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>
--
Charles Moulliard
Apache Committer & PMC / Architect @RedHat
Twitter : @cmoulliard | Blog : http://cmoulliard.github.io
Re: Karaf stays blocked when it shutdowns
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
The screenshot contains a heapdump, not a thread dump.
I think the NPE is a consequence, so we have to find the cause.
A thread dump should help to see locked or parked threads.
Regards
JB
On 02/04/2016 10:49 PM, Charles Moulliard wrote:
> Yes I can do that with jmap. Here is a screenshot -
> https://www.dropbox.com/s/9nns0coyue9j6zt/Screenshot%202016-02-04%2022.48.56.png?dl=0
>
> On Thu, Feb 4, 2016 at 9:31 PM, Jean-Baptiste Onofré <jb@nanthrax.net
> <ma...@nanthrax.net>> wrote:
>
> Can you take a thread dump ?
>
> Regards
> JB
>
>
> On 02/04/2016 09:00 PM, Charles Moulliard wrote:
>
> Hi,
>
> My Karaf 2.4.4 container stays blocked when it shutdowns and reports
> this error
>
> Exception in thread "Karaf Shell Console Thread"
> java.lang.NullPointerException
> at java.io.Writer.write(Writer.java:157)
> at java.io.BufferedWriter.newLine(BufferedWriter.java:243)
> at java.io.PrintStream.newLine(PrintStream.java:544)
> at java.io.PrintStream.println(PrintStream.java:824)
> at jline.console.history.FileHistory.flush(FileHistory.java:90)
> at
> org.apache.karaf.shell.console.jline.KarafFileHistory.flush(KarafFileHistory.java:65)
> at
> org.apache.karaf.shell.console.jline.Console.close(Console.java:163)
> at
> org.apache.karaf.shell.console.jline.Console.run(Console.java:216)
> at
> org.apache.karaf.shell.console.jline.DelayedStarted.run(DelayedStarted.java:79)
>
> How can I investigate why the thread is blocked and that I must
> kill the
> process to restart it
>
> Regards,
>
> --
> Charles Moulliard
> Apache Committer & PMC / Architect @RedHat
> Twitter : @cmoulliard | Blog : http://cmoulliard.github.io
> <http://cmoulliard.github.io>
>
>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org <ma...@apache.org>
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>
>
>
>
> --
> Charles Moulliard
> Apache Committer & PMC / Architect @RedHat
> Twitter : @cmoulliard | Blog : http://cmoulliard.github.io
> <http://cmoulliard.github.io>
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
Re: Karaf stays blocked when it shutdowns
Posted by Charles Moulliard <ch...@gmail.com>.
And history content is empty
Exception in thread "Karaf Shell Console Thread"
java.lang.NullPointerException
at java.io.Writer.write(Writer.java:157)
at java.io.BufferedWriter.newLine(BufferedWriter.java:243)
at java.io.PrintStream.newLine(PrintStream.java:544)
at java.io.PrintStream.println(PrintStream.java:824)
at jline.console.history.FileHistory.flush(FileHistory.java:90)
at
org.apache.karaf.shell.console.jline.KarafFileHistory.flush(KarafFileHistory.java:65)
at org.apache.karaf.shell.console.jline.Console.close(Console.java:163)
at org.apache.karaf.shell.console.jline.Console.run(Console.java:216)
at java.lang.Thread.run(Thread.java:745)
On Fri, Feb 5, 2016 at 9:55 AM, Charles Moulliard <ch...@gmail.com> wrote:
> The bundle.info file only contains the id of the bundle (=161) but not
> all the these fields
>
> 160
> mvn:org.apache.aries.jpa/org.apache.aries.jpa.blueprint.aries/1.0.4
> 32
> 30
> 1454661936527
> 0
>
>
>
> On Fri, Feb 5, 2016 at 8:39 AM, Charles Moulliard <ch...@gmail.com>
> wrote:
>
>> I just remove the ServiceReference of the
>> org.ops4j.pax.web.service.WebContainer
>>
>> public void stop(BundleContext bc) throws Exception {
>> if (webContainerRef != null) {
>> bc.ungetService(webContainerRef);
>> webContainerRef = null;
>> }
>> }
>>
>> On Fri, Feb 5, 2016 at 8:37 AM, Jean-Baptiste Onofré <jb...@nanthrax.net>
>> wrote:
>>
>>> Hi Charles,
>>>
>>> What's this bundle ? Do you do something special in the stop() method of
>>> the activator ?
>>>
>>> Regards
>>> JB
>>>
>>>
>>> On 02/05/2016 08:02 AM, Charles Moulliard wrote:
>>>
>>>> When I reboot Karaf, here is the info that I get also
>>>>
>>>> dabou:~/Fuse/servers/karaf-2.4.4.$ ll data/cache/bundle324/version0.0/
>>>> total 51680
>>>> drwxr-xr-x 5 chmoulli staff 170 Feb 4 22:53 .
>>>> drwxr-xr-x 4 chmoulli staff 136 Feb 4 22:53 ..
>>>> -rw-r--r-- 1 chmoulli staff 26453746 Feb 4 22:53 bundle.jar
>>>> drwxr-xr-x 42 chmoulli staff 1428 Feb 4 22:53
>>>> bundle.jar-embedded
>>>> -rw-r--r-- 1 chmoulli staff 41 Feb 4 22:53 revision.location
>>>>
>>>> dabou:~/Fuse/servers/karaf-2.4.4.$ ./bin/karaf
>>>>
>>>> ERROR: Error reloading cached bundle, removing it:
>>>>
>>>> /Users/chmoulli/Fuse/Fuse-servers/jboss-fuse-6.2.1.redhat-084/data/cache/bundle324
>>>> (java.lang.NumberFormatException: null)
>>>> java.lang.NumberFormatException: null
>>>> at java.lang.Integer.parseInt(Integer.java:542)
>>>> at java.lang.Integer.parseInt(Integer.java:615)
>>>> at
>>>>
>>>> org.apache.felix.framework.cache.BundleArchive.readBundleInfo(BundleArchive.java:959)
>>>> at
>>>>
>>>> org.apache.felix.framework.cache.BundleArchive.<init>(BundleArchive.java:182)
>>>> at
>>>>
>>>> org.apache.felix.framework.cache.BundleCache.getArchives(BundleCache.java:247)
>>>> at org.apache.felix.framework.Felix.init(Felix.java:713)
>>>> at org.apache.karaf.main.Main.launch(Main.java:344)
>>>> at org.apache.karaf.main.Main.main(Main.java:561)
>>>>
>>>> On Thu, Feb 4, 2016 at 10:49 PM, Charles Moulliard <ch007m@gmail.com
>>>> <ma...@gmail.com>> wrote:
>>>>
>>>> Yes I can do that with jmap. Here is a screenshot -
>>>>
>>>> https://www.dropbox.com/s/9nns0coyue9j6zt/Screenshot%202016-02-04%2022.48.56.png?dl=0
>>>>
>>>> On Thu, Feb 4, 2016 at 9:31 PM, Jean-Baptiste Onofré
>>>> <jb@nanthrax.net <ma...@nanthrax.net>> wrote:
>>>>
>>>> Can you take a thread dump ?
>>>>
>>>> Regards
>>>> JB
>>>>
>>>>
>>>> On 02/04/2016 09:00 PM, Charles Moulliard wrote:
>>>>
>>>> Hi,
>>>>
>>>> My Karaf 2.4.4 container stays blocked when it shutdowns and
>>>> reports
>>>> this error
>>>>
>>>> Exception in thread "Karaf Shell Console Thread"
>>>> java.lang.NullPointerException
>>>> at java.io.Writer.write(Writer.java:157)
>>>> at java.io.BufferedWriter.newLine(BufferedWriter.java:243)
>>>> at java.io.PrintStream.newLine(PrintStream.java:544)
>>>> at java.io.PrintStream.println(PrintStream.java:824)
>>>> at
>>>> jline.console.history.FileHistory.flush(FileHistory.java:90)
>>>> at
>>>>
>>>> org.apache.karaf.shell.console.jline.KarafFileHistory.flush(KarafFileHistory.java:65)
>>>> at
>>>>
>>>> org.apache.karaf.shell.console.jline.Console.close(Console.java:163)
>>>> at
>>>>
>>>> org.apache.karaf.shell.console.jline.Console.run(Console.java:216)
>>>> at
>>>>
>>>> org.apache.karaf.shell.console.jline.DelayedStarted.run(DelayedStarted.java:79)
>>>>
>>>> How can I investigate why the thread is blocked and that I
>>>> must kill the
>>>> process to restart it
>>>>
>>>> Regards,
>>>>
>>>> --
>>>> Charles Moulliard
>>>> Apache Committer & PMC / Architect @RedHat
>>>> Twitter : @cmoulliard | Blog : http://cmoulliard.github.io
>>>> <http://cmoulliard.github.io>
>>>>
>>>>
>>>> --
>>>> Jean-Baptiste Onofré
>>>> jbonofre@apache.org <ma...@apache.org>
>>>> http://blog.nanthrax.net
>>>> Talend - http://www.talend.com
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Charles Moulliard
>>>> Apache Committer & PMC / Architect @RedHat
>>>> Twitter : @cmoulliard | Blog : http://cmoulliard.github.io
>>>> <http://cmoulliard.github.io>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Charles Moulliard
>>>> Apache Committer & PMC / Architect @RedHat
>>>> Twitter : @cmoulliard | Blog : http://cmoulliard.github.io
>>>> <http://cmoulliard.github.io>
>>>>
>>>>
>>> --
>>> Jean-Baptiste Onofré
>>> jbonofre@apache.org
>>> http://blog.nanthrax.net
>>> Talend - http://www.talend.com
>>>
>>
>>
>>
>> --
>> Charles Moulliard
>> Apache Committer & PMC / Architect @RedHat
>> Twitter : @cmoulliard | Blog : http://cmoulliard.github.io
>>
>>
>
>
> --
> Charles Moulliard
> Apache Committer & PMC / Architect @RedHat
> Twitter : @cmoulliard | Blog : http://cmoulliard.github.io
>
>
--
Charles Moulliard
Apache Committer & PMC / Architect @RedHat
Twitter : @cmoulliard | Blog : http://cmoulliard.github.io
Re: Karaf stays blocked when it shutdowns
Posted by Charles Moulliard <ch...@gmail.com>.
The bundle.info file only contains the id of the bundle (=161) but not all
the these fields
160
mvn:org.apache.aries.jpa/org.apache.aries.jpa.blueprint.aries/1.0.4
32
30
1454661936527
0
On Fri, Feb 5, 2016 at 8:39 AM, Charles Moulliard <ch...@gmail.com> wrote:
> I just remove the ServiceReference of the
> org.ops4j.pax.web.service.WebContainer
>
> public void stop(BundleContext bc) throws Exception {
> if (webContainerRef != null) {
> bc.ungetService(webContainerRef);
> webContainerRef = null;
> }
> }
>
> On Fri, Feb 5, 2016 at 8:37 AM, Jean-Baptiste Onofré <jb...@nanthrax.net>
> wrote:
>
>> Hi Charles,
>>
>> What's this bundle ? Do you do something special in the stop() method of
>> the activator ?
>>
>> Regards
>> JB
>>
>>
>> On 02/05/2016 08:02 AM, Charles Moulliard wrote:
>>
>>> When I reboot Karaf, here is the info that I get also
>>>
>>> dabou:~/Fuse/servers/karaf-2.4.4.$ ll data/cache/bundle324/version0.0/
>>> total 51680
>>> drwxr-xr-x 5 chmoulli staff 170 Feb 4 22:53 .
>>> drwxr-xr-x 4 chmoulli staff 136 Feb 4 22:53 ..
>>> -rw-r--r-- 1 chmoulli staff 26453746 Feb 4 22:53 bundle.jar
>>> drwxr-xr-x 42 chmoulli staff 1428 Feb 4 22:53 bundle.jar-embedded
>>> -rw-r--r-- 1 chmoulli staff 41 Feb 4 22:53 revision.location
>>>
>>> dabou:~/Fuse/servers/karaf-2.4.4.$ ./bin/karaf
>>>
>>> ERROR: Error reloading cached bundle, removing it:
>>>
>>> /Users/chmoulli/Fuse/Fuse-servers/jboss-fuse-6.2.1.redhat-084/data/cache/bundle324
>>> (java.lang.NumberFormatException: null)
>>> java.lang.NumberFormatException: null
>>> at java.lang.Integer.parseInt(Integer.java:542)
>>> at java.lang.Integer.parseInt(Integer.java:615)
>>> at
>>>
>>> org.apache.felix.framework.cache.BundleArchive.readBundleInfo(BundleArchive.java:959)
>>> at
>>>
>>> org.apache.felix.framework.cache.BundleArchive.<init>(BundleArchive.java:182)
>>> at
>>>
>>> org.apache.felix.framework.cache.BundleCache.getArchives(BundleCache.java:247)
>>> at org.apache.felix.framework.Felix.init(Felix.java:713)
>>> at org.apache.karaf.main.Main.launch(Main.java:344)
>>> at org.apache.karaf.main.Main.main(Main.java:561)
>>>
>>> On Thu, Feb 4, 2016 at 10:49 PM, Charles Moulliard <ch007m@gmail.com
>>> <ma...@gmail.com>> wrote:
>>>
>>> Yes I can do that with jmap. Here is a screenshot -
>>>
>>> https://www.dropbox.com/s/9nns0coyue9j6zt/Screenshot%202016-02-04%2022.48.56.png?dl=0
>>>
>>> On Thu, Feb 4, 2016 at 9:31 PM, Jean-Baptiste Onofré
>>> <jb@nanthrax.net <ma...@nanthrax.net>> wrote:
>>>
>>> Can you take a thread dump ?
>>>
>>> Regards
>>> JB
>>>
>>>
>>> On 02/04/2016 09:00 PM, Charles Moulliard wrote:
>>>
>>> Hi,
>>>
>>> My Karaf 2.4.4 container stays blocked when it shutdowns and
>>> reports
>>> this error
>>>
>>> Exception in thread "Karaf Shell Console Thread"
>>> java.lang.NullPointerException
>>> at java.io.Writer.write(Writer.java:157)
>>> at java.io.BufferedWriter.newLine(BufferedWriter.java:243)
>>> at java.io.PrintStream.newLine(PrintStream.java:544)
>>> at java.io.PrintStream.println(PrintStream.java:824)
>>> at
>>> jline.console.history.FileHistory.flush(FileHistory.java:90)
>>> at
>>>
>>> org.apache.karaf.shell.console.jline.KarafFileHistory.flush(KarafFileHistory.java:65)
>>> at
>>>
>>> org.apache.karaf.shell.console.jline.Console.close(Console.java:163)
>>> at
>>>
>>> org.apache.karaf.shell.console.jline.Console.run(Console.java:216)
>>> at
>>>
>>> org.apache.karaf.shell.console.jline.DelayedStarted.run(DelayedStarted.java:79)
>>>
>>> How can I investigate why the thread is blocked and that I
>>> must kill the
>>> process to restart it
>>>
>>> Regards,
>>>
>>> --
>>> Charles Moulliard
>>> Apache Committer & PMC / Architect @RedHat
>>> Twitter : @cmoulliard | Blog : http://cmoulliard.github.io
>>> <http://cmoulliard.github.io>
>>>
>>>
>>> --
>>> Jean-Baptiste Onofré
>>> jbonofre@apache.org <ma...@apache.org>
>>> http://blog.nanthrax.net
>>> Talend - http://www.talend.com
>>>
>>>
>>>
>>>
>>> --
>>> Charles Moulliard
>>> Apache Committer & PMC / Architect @RedHat
>>> Twitter : @cmoulliard | Blog : http://cmoulliard.github.io
>>> <http://cmoulliard.github.io>
>>>
>>>
>>>
>>>
>>> --
>>> Charles Moulliard
>>> Apache Committer & PMC / Architect @RedHat
>>> Twitter : @cmoulliard | Blog : http://cmoulliard.github.io
>>> <http://cmoulliard.github.io>
>>>
>>>
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>>
>
>
>
> --
> Charles Moulliard
> Apache Committer & PMC / Architect @RedHat
> Twitter : @cmoulliard | Blog : http://cmoulliard.github.io
>
>
--
Charles Moulliard
Apache Committer & PMC / Architect @RedHat
Twitter : @cmoulliard | Blog : http://cmoulliard.github.io
Re: Karaf stays blocked when it shutdowns
Posted by Charles Moulliard <ch...@gmail.com>.
I just remove the ServiceReference of the
org.ops4j.pax.web.service.WebContainer
public void stop(BundleContext bc) throws Exception {
if (webContainerRef != null) {
bc.ungetService(webContainerRef);
webContainerRef = null;
}
}
On Fri, Feb 5, 2016 at 8:37 AM, Jean-Baptiste Onofré <jb...@nanthrax.net>
wrote:
> Hi Charles,
>
> What's this bundle ? Do you do something special in the stop() method of
> the activator ?
>
> Regards
> JB
>
>
> On 02/05/2016 08:02 AM, Charles Moulliard wrote:
>
>> When I reboot Karaf, here is the info that I get also
>>
>> dabou:~/Fuse/servers/karaf-2.4.4.$ ll data/cache/bundle324/version0.0/
>> total 51680
>> drwxr-xr-x 5 chmoulli staff 170 Feb 4 22:53 .
>> drwxr-xr-x 4 chmoulli staff 136 Feb 4 22:53 ..
>> -rw-r--r-- 1 chmoulli staff 26453746 Feb 4 22:53 bundle.jar
>> drwxr-xr-x 42 chmoulli staff 1428 Feb 4 22:53 bundle.jar-embedded
>> -rw-r--r-- 1 chmoulli staff 41 Feb 4 22:53 revision.location
>>
>> dabou:~/Fuse/servers/karaf-2.4.4.$ ./bin/karaf
>>
>> ERROR: Error reloading cached bundle, removing it:
>>
>> /Users/chmoulli/Fuse/Fuse-servers/jboss-fuse-6.2.1.redhat-084/data/cache/bundle324
>> (java.lang.NumberFormatException: null)
>> java.lang.NumberFormatException: null
>> at java.lang.Integer.parseInt(Integer.java:542)
>> at java.lang.Integer.parseInt(Integer.java:615)
>> at
>>
>> org.apache.felix.framework.cache.BundleArchive.readBundleInfo(BundleArchive.java:959)
>> at
>>
>> org.apache.felix.framework.cache.BundleArchive.<init>(BundleArchive.java:182)
>> at
>>
>> org.apache.felix.framework.cache.BundleCache.getArchives(BundleCache.java:247)
>> at org.apache.felix.framework.Felix.init(Felix.java:713)
>> at org.apache.karaf.main.Main.launch(Main.java:344)
>> at org.apache.karaf.main.Main.main(Main.java:561)
>>
>> On Thu, Feb 4, 2016 at 10:49 PM, Charles Moulliard <ch007m@gmail.com
>> <ma...@gmail.com>> wrote:
>>
>> Yes I can do that with jmap. Here is a screenshot -
>>
>> https://www.dropbox.com/s/9nns0coyue9j6zt/Screenshot%202016-02-04%2022.48.56.png?dl=0
>>
>> On Thu, Feb 4, 2016 at 9:31 PM, Jean-Baptiste Onofré
>> <jb@nanthrax.net <ma...@nanthrax.net>> wrote:
>>
>> Can you take a thread dump ?
>>
>> Regards
>> JB
>>
>>
>> On 02/04/2016 09:00 PM, Charles Moulliard wrote:
>>
>> Hi,
>>
>> My Karaf 2.4.4 container stays blocked when it shutdowns and
>> reports
>> this error
>>
>> Exception in thread "Karaf Shell Console Thread"
>> java.lang.NullPointerException
>> at java.io.Writer.write(Writer.java:157)
>> at java.io.BufferedWriter.newLine(BufferedWriter.java:243)
>> at java.io.PrintStream.newLine(PrintStream.java:544)
>> at java.io.PrintStream.println(PrintStream.java:824)
>> at
>> jline.console.history.FileHistory.flush(FileHistory.java:90)
>> at
>>
>> org.apache.karaf.shell.console.jline.KarafFileHistory.flush(KarafFileHistory.java:65)
>> at
>>
>> org.apache.karaf.shell.console.jline.Console.close(Console.java:163)
>> at
>>
>> org.apache.karaf.shell.console.jline.Console.run(Console.java:216)
>> at
>>
>> org.apache.karaf.shell.console.jline.DelayedStarted.run(DelayedStarted.java:79)
>>
>> How can I investigate why the thread is blocked and that I
>> must kill the
>> process to restart it
>>
>> Regards,
>>
>> --
>> Charles Moulliard
>> Apache Committer & PMC / Architect @RedHat
>> Twitter : @cmoulliard | Blog : http://cmoulliard.github.io
>> <http://cmoulliard.github.io>
>>
>>
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org <ma...@apache.org>
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>>
>>
>>
>>
>> --
>> Charles Moulliard
>> Apache Committer & PMC / Architect @RedHat
>> Twitter : @cmoulliard | Blog : http://cmoulliard.github.io
>> <http://cmoulliard.github.io>
>>
>>
>>
>>
>> --
>> Charles Moulliard
>> Apache Committer & PMC / Architect @RedHat
>> Twitter : @cmoulliard | Blog : http://cmoulliard.github.io
>> <http://cmoulliard.github.io>
>>
>>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>
--
Charles Moulliard
Apache Committer & PMC / Architect @RedHat
Twitter : @cmoulliard | Blog : http://cmoulliard.github.io
Re: Karaf stays blocked when it shutdowns
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Charles,
What's this bundle ? Do you do something special in the stop() method of
the activator ?
Regards
JB
On 02/05/2016 08:02 AM, Charles Moulliard wrote:
> When I reboot Karaf, here is the info that I get also
>
> dabou:~/Fuse/servers/karaf-2.4.4.$ ll data/cache/bundle324/version0.0/
> total 51680
> drwxr-xr-x 5 chmoulli staff 170 Feb 4 22:53 .
> drwxr-xr-x 4 chmoulli staff 136 Feb 4 22:53 ..
> -rw-r--r-- 1 chmoulli staff 26453746 Feb 4 22:53 bundle.jar
> drwxr-xr-x 42 chmoulli staff 1428 Feb 4 22:53 bundle.jar-embedded
> -rw-r--r-- 1 chmoulli staff 41 Feb 4 22:53 revision.location
>
> dabou:~/Fuse/servers/karaf-2.4.4.$ ./bin/karaf
>
> ERROR: Error reloading cached bundle, removing it:
> /Users/chmoulli/Fuse/Fuse-servers/jboss-fuse-6.2.1.redhat-084/data/cache/bundle324
> (java.lang.NumberFormatException: null)
> java.lang.NumberFormatException: null
> at java.lang.Integer.parseInt(Integer.java:542)
> at java.lang.Integer.parseInt(Integer.java:615)
> at
> org.apache.felix.framework.cache.BundleArchive.readBundleInfo(BundleArchive.java:959)
> at
> org.apache.felix.framework.cache.BundleArchive.<init>(BundleArchive.java:182)
> at
> org.apache.felix.framework.cache.BundleCache.getArchives(BundleCache.java:247)
> at org.apache.felix.framework.Felix.init(Felix.java:713)
> at org.apache.karaf.main.Main.launch(Main.java:344)
> at org.apache.karaf.main.Main.main(Main.java:561)
>
> On Thu, Feb 4, 2016 at 10:49 PM, Charles Moulliard <ch007m@gmail.com
> <ma...@gmail.com>> wrote:
>
> Yes I can do that with jmap. Here is a screenshot -
> https://www.dropbox.com/s/9nns0coyue9j6zt/Screenshot%202016-02-04%2022.48.56.png?dl=0
>
> On Thu, Feb 4, 2016 at 9:31 PM, Jean-Baptiste Onofré
> <jb@nanthrax.net <ma...@nanthrax.net>> wrote:
>
> Can you take a thread dump ?
>
> Regards
> JB
>
>
> On 02/04/2016 09:00 PM, Charles Moulliard wrote:
>
> Hi,
>
> My Karaf 2.4.4 container stays blocked when it shutdowns and
> reports
> this error
>
> Exception in thread "Karaf Shell Console Thread"
> java.lang.NullPointerException
> at java.io.Writer.write(Writer.java:157)
> at java.io.BufferedWriter.newLine(BufferedWriter.java:243)
> at java.io.PrintStream.newLine(PrintStream.java:544)
> at java.io.PrintStream.println(PrintStream.java:824)
> at jline.console.history.FileHistory.flush(FileHistory.java:90)
> at
> org.apache.karaf.shell.console.jline.KarafFileHistory.flush(KarafFileHistory.java:65)
> at
> org.apache.karaf.shell.console.jline.Console.close(Console.java:163)
> at
> org.apache.karaf.shell.console.jline.Console.run(Console.java:216)
> at
> org.apache.karaf.shell.console.jline.DelayedStarted.run(DelayedStarted.java:79)
>
> How can I investigate why the thread is blocked and that I
> must kill the
> process to restart it
>
> Regards,
>
> --
> Charles Moulliard
> Apache Committer & PMC / Architect @RedHat
> Twitter : @cmoulliard | Blog : http://cmoulliard.github.io
> <http://cmoulliard.github.io>
>
>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org <ma...@apache.org>
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>
>
>
>
> --
> Charles Moulliard
> Apache Committer & PMC / Architect @RedHat
> Twitter : @cmoulliard | Blog : http://cmoulliard.github.io
> <http://cmoulliard.github.io>
>
>
>
>
> --
> Charles Moulliard
> Apache Committer & PMC / Architect @RedHat
> Twitter : @cmoulliard | Blog : http://cmoulliard.github.io
> <http://cmoulliard.github.io>
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
Re: Karaf stays blocked when it shutdowns
Posted by Charles Moulliard <ch...@gmail.com>.
When I reboot Karaf, here is the info that I get also
dabou:~/Fuse/servers/karaf-2.4.4.$ ll data/cache/bundle324/version0.0/
total 51680
drwxr-xr-x 5 chmoulli staff 170 Feb 4 22:53 .
drwxr-xr-x 4 chmoulli staff 136 Feb 4 22:53 ..
-rw-r--r-- 1 chmoulli staff 26453746 Feb 4 22:53 bundle.jar
drwxr-xr-x 42 chmoulli staff 1428 Feb 4 22:53 bundle.jar-embedded
-rw-r--r-- 1 chmoulli staff 41 Feb 4 22:53 revision.location
dabou:~/Fuse/servers/karaf-2.4.4.$ ./bin/karaf
ERROR: Error reloading cached bundle, removing it:
/Users/chmoulli/Fuse/Fuse-servers/jboss-fuse-6.2.1.redhat-084/data/cache/bundle324
(java.lang.NumberFormatException: null)
java.lang.NumberFormatException: null
at java.lang.Integer.parseInt(Integer.java:542)
at java.lang.Integer.parseInt(Integer.java:615)
at
org.apache.felix.framework.cache.BundleArchive.readBundleInfo(BundleArchive.java:959)
at
org.apache.felix.framework.cache.BundleArchive.<init>(BundleArchive.java:182)
at
org.apache.felix.framework.cache.BundleCache.getArchives(BundleCache.java:247)
at org.apache.felix.framework.Felix.init(Felix.java:713)
at org.apache.karaf.main.Main.launch(Main.java:344)
at org.apache.karaf.main.Main.main(Main.java:561)
On Thu, Feb 4, 2016 at 10:49 PM, Charles Moulliard <ch...@gmail.com> wrote:
> Yes I can do that with jmap. Here is a screenshot -
> https://www.dropbox.com/s/9nns0coyue9j6zt/Screenshot%202016-02-04%2022.48.56.png?dl=0
>
> On Thu, Feb 4, 2016 at 9:31 PM, Jean-Baptiste Onofré <jb...@nanthrax.net>
> wrote:
>
>> Can you take a thread dump ?
>>
>> Regards
>> JB
>>
>>
>> On 02/04/2016 09:00 PM, Charles Moulliard wrote:
>>
>>> Hi,
>>>
>>> My Karaf 2.4.4 container stays blocked when it shutdowns and reports
>>> this error
>>>
>>> Exception in thread "Karaf Shell Console Thread"
>>> java.lang.NullPointerException
>>> at java.io.Writer.write(Writer.java:157)
>>> at java.io.BufferedWriter.newLine(BufferedWriter.java:243)
>>> at java.io.PrintStream.newLine(PrintStream.java:544)
>>> at java.io.PrintStream.println(PrintStream.java:824)
>>> at jline.console.history.FileHistory.flush(FileHistory.java:90)
>>> at
>>>
>>> org.apache.karaf.shell.console.jline.KarafFileHistory.flush(KarafFileHistory.java:65)
>>> at org.apache.karaf.shell.console.jline.Console.close(Console.java:163)
>>> at org.apache.karaf.shell.console.jline.Console.run(Console.java:216)
>>> at
>>>
>>> org.apache.karaf.shell.console.jline.DelayedStarted.run(DelayedStarted.java:79)
>>>
>>> How can I investigate why the thread is blocked and that I must kill the
>>> process to restart it
>>>
>>> Regards,
>>>
>>> --
>>> Charles Moulliard
>>> Apache Committer & PMC / Architect @RedHat
>>> Twitter : @cmoulliard | Blog : http://cmoulliard.github.io
>>> <http://cmoulliard.github.io>
>>>
>>>
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>>
>
>
>
> --
> Charles Moulliard
> Apache Committer & PMC / Architect @RedHat
> Twitter : @cmoulliard | Blog : http://cmoulliard.github.io
>
>
--
Charles Moulliard
Apache Committer & PMC / Architect @RedHat
Twitter : @cmoulliard | Blog : http://cmoulliard.github.io
Re: Karaf stays blocked when it shutdowns
Posted by Charles Moulliard <ch...@gmail.com>.
Yes I can do that with jmap. Here is a screenshot -
https://www.dropbox.com/s/9nns0coyue9j6zt/Screenshot%202016-02-04%2022.48.56.png?dl=0
On Thu, Feb 4, 2016 at 9:31 PM, Jean-Baptiste Onofré <jb...@nanthrax.net>
wrote:
> Can you take a thread dump ?
>
> Regards
> JB
>
>
> On 02/04/2016 09:00 PM, Charles Moulliard wrote:
>
>> Hi,
>>
>> My Karaf 2.4.4 container stays blocked when it shutdowns and reports
>> this error
>>
>> Exception in thread "Karaf Shell Console Thread"
>> java.lang.NullPointerException
>> at java.io.Writer.write(Writer.java:157)
>> at java.io.BufferedWriter.newLine(BufferedWriter.java:243)
>> at java.io.PrintStream.newLine(PrintStream.java:544)
>> at java.io.PrintStream.println(PrintStream.java:824)
>> at jline.console.history.FileHistory.flush(FileHistory.java:90)
>> at
>>
>> org.apache.karaf.shell.console.jline.KarafFileHistory.flush(KarafFileHistory.java:65)
>> at org.apache.karaf.shell.console.jline.Console.close(Console.java:163)
>> at org.apache.karaf.shell.console.jline.Console.run(Console.java:216)
>> at
>>
>> org.apache.karaf.shell.console.jline.DelayedStarted.run(DelayedStarted.java:79)
>>
>> How can I investigate why the thread is blocked and that I must kill the
>> process to restart it
>>
>> Regards,
>>
>> --
>> Charles Moulliard
>> Apache Committer & PMC / Architect @RedHat
>> Twitter : @cmoulliard | Blog : http://cmoulliard.github.io
>> <http://cmoulliard.github.io>
>>
>>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>
--
Charles Moulliard
Apache Committer & PMC / Architect @RedHat
Twitter : @cmoulliard | Blog : http://cmoulliard.github.io
Re: Karaf stays blocked when it shutdowns
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Can you take a thread dump ?
Regards
JB
On 02/04/2016 09:00 PM, Charles Moulliard wrote:
> Hi,
>
> My Karaf 2.4.4 container stays blocked when it shutdowns and reports
> this error
>
> Exception in thread "Karaf Shell Console Thread"
> java.lang.NullPointerException
> at java.io.Writer.write(Writer.java:157)
> at java.io.BufferedWriter.newLine(BufferedWriter.java:243)
> at java.io.PrintStream.newLine(PrintStream.java:544)
> at java.io.PrintStream.println(PrintStream.java:824)
> at jline.console.history.FileHistory.flush(FileHistory.java:90)
> at
> org.apache.karaf.shell.console.jline.KarafFileHistory.flush(KarafFileHistory.java:65)
> at org.apache.karaf.shell.console.jline.Console.close(Console.java:163)
> at org.apache.karaf.shell.console.jline.Console.run(Console.java:216)
> at
> org.apache.karaf.shell.console.jline.DelayedStarted.run(DelayedStarted.java:79)
>
> How can I investigate why the thread is blocked and that I must kill the
> process to restart it
>
> Regards,
>
> --
> Charles Moulliard
> Apache Committer & PMC / Architect @RedHat
> Twitter : @cmoulliard | Blog : http://cmoulliard.github.io
> <http://cmoulliard.github.io>
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com