There's two things:

If karaf status shows "/apache-karaf-4.2.6/data/port shutdown port file
doesn't exist. The container is not running.", it means that the
container is not running, else you would have the port.

Karaf status check if the port file is there, and use a socket on this
port. If the port file is not there, or it's not possible to plug a
socket on the port (without sending any shutdown command), then it's
mean the karaf container is not running. Else you will see "Running ...".

So, what's your point ? You mean that you would prefer just "Not running
..." or "Running ... " for status output ?
If so, I can change the message with the port file is not there.
Basically, currently we have three states:
- never run
- ran at least once, and not running currently
- running

Regards
JB

On 23/09/2019 18:37, Alex Soto wrote:
> Can you elaborate on that ?
> 
> Thanks, JB
> 
> 
> 
>> On Sep 23, 2019, at 12:29 PM, Jean-Baptiste Onofré <[email protected]
>> <mailto:[email protected]>> wrote:
>>
>> Correct, command and port are populated at first start.
>>
>> You can check the pid using bin/status as well.
>>
>> Regards
>> JB
>>
>> On 23/09/2019 18:27, Alex Soto wrote:
>>> Maybe this only  happens if “start” has never been called. Can you
>>> confirm?
>>>  
>>> I saw this while automating deployment.  First step is to check if
>>>  Karaf is running, but perhaps prior deployment failed before calling
>>> “start”.
>>> Basically I need a reliable way of testing whether Karaf is running;
>>> apparently, testing for status output to be "Running …” is not enough.
>>>
>>>
>>> Best regards,
>>> Alex soto
>>>
>>>
>>>
>>>
>>>> On Sep 21, 2019, at 1:18 AM, Jean-Baptiste Onofré <[email protected]
>>>> <mailto:[email protected]>
>>>> <mailto:[email protected]>> wrote:
>>>>
>>>> Hi,
>>>>
>>>> I don't have this behavior on my machine:
>>>>
>>>> after starting karaf with bin/karaf,
>>>> I do bin/status and I have:
>>>>
>>>> Running ...
>>>>
>>>> Can you check in etc/config.properties that the karaf.shutdown.port.file
>>>> property well located ?
>>>>
>>>> Do you have special user permission in term of filesystem on data
>>>> folder ?
>>>>
>>>> Regards
>>>> JB
>>>>
>>>> On 20/09/2019 21:48, Alex Soto wrote:
>>>>> When calling /status /command in Karaf 4.2.6 on a fresh install I
>>>>> get error:
>>>>>
>>>>> data/port shutdown port file doesn't exist. The container is not
>>>>> running.
>>>>>
>>>>> What causes this?
>>>>>
>>>>> Best regards,
>>>>> Alex soto
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>> -- 
>>>> Jean-Baptiste Onofré
>>>> [email protected]
>>>> <mailto:[email protected]> <mailto:[email protected]>
>>>> http://blog.nanthrax.net <http://blog.nanthrax.net/>
>>>> Talend - http://www.talend.com <http://www.talend.com/>
>>>
>>
>> -- 
>> Jean-Baptiste Onofré
>> [email protected] <mailto:[email protected]>
>> http://blog.nanthrax.net <http://blog.nanthrax.net/>
>> Talend - http://www.talend.com <http://www.talend.com/>
> 

-- 
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com

Reply via email to