You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Tamer Gür <tg...@ebi.ac.uk> on 2017/09/01 13:18:11 UTC

unexpected end of file

Hi,

i am using log4j2 2.8.2 with RollingFile and SizeBasedTriggeringPolicy 
(250MB).

My process is finishing normally with all Rolling files except the last 
one in last compressed file when i try to open i am getting "unexpected 
end of file" message. In the directory i also see the file which should 
be inside the last compressed file with same name.

I have several process like this one in some of them i don't have any 
issue but in some i have same issue.

What could be the issue? Can you help?

Thanks

Tamer


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


Re: unexpected end of file

Posted by Tamer Gür <tg...@ebi.ac.uk>.
Thanks Gary. For now i will put some sleep. Is there a ticket for this 
that i can follow?

Tamer


On 01/09/2017 16:25, Gary Gregory wrote:
> On Fri, Sep 1, 2017 at 9:17 AM, Tamer Gür <tg...@ebi.ac.uk> wrote:
>
>> thanks Ralph. My application is running from the main and also i am using
>> the Async logger.
>>
>> is it possible that although main thread finish async thread still needs
>> some time to complete compressing?
>
> That is definitively possible and an issue the unit tests also have to deal
> with when checking for results.
>
> Gary
>
>
>> Tamer
>>
>>
>> On 01/09/2017 15:56, Ralph Goers wrote:
>>
>>> It sounds like your application is finishing before compression of the
>>> file completes, although from the information given I cannot be sure.
>>>
>>> Ralph
>>>
>>> On Sep 1, 2017, at 6:18 AM, Tamer Gür <tg...@ebi.ac.uk> wrote:
>>>> Hi,
>>>>
>>>> i am using log4j2 2.8.2 with RollingFile and SizeBasedTriggeringPolicy
>>>> (250MB).
>>>>
>>>> My process is finishing normally with all Rolling files except the last
>>>> one in last compressed file when i try to open i am getting "unexpected end
>>>> of file" message. In the directory i also see the file which should be
>>>> inside the last compressed file with same name.
>>>>
>>>> I have several process like this one in some of them i don't have any
>>>> issue but in some i have same issue.
>>>>
>>>> What could be the issue? Can you help?
>>>>
>>>> Thanks
>>>>
>>>> Tamer
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>>>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>>>
>>>>
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>
>>


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


Re: unexpected end of file

Posted by Gary Gregory <ga...@gmail.com>.
On Fri, Sep 1, 2017 at 9:17 AM, Tamer Gür <tg...@ebi.ac.uk> wrote:

> thanks Ralph. My application is running from the main and also i am using
> the Async logger.
>
> is it possible that although main thread finish async thread still needs
> some time to complete compressing?


That is definitively possible and an issue the unit tests also have to deal
with when checking for results.

Gary


>
> Tamer
>
>
> On 01/09/2017 15:56, Ralph Goers wrote:
>
>> It sounds like your application is finishing before compression of the
>> file completes, although from the information given I cannot be sure.
>>
>> Ralph
>>
>> On Sep 1, 2017, at 6:18 AM, Tamer Gür <tg...@ebi.ac.uk> wrote:
>>>
>>> Hi,
>>>
>>> i am using log4j2 2.8.2 with RollingFile and SizeBasedTriggeringPolicy
>>> (250MB).
>>>
>>> My process is finishing normally with all Rolling files except the last
>>> one in last compressed file when i try to open i am getting "unexpected end
>>> of file" message. In the directory i also see the file which should be
>>> inside the last compressed file with same name.
>>>
>>> I have several process like this one in some of them i don't have any
>>> issue but in some i have same issue.
>>>
>>> What could be the issue? Can you help?
>>>
>>> Thanks
>>>
>>> Tamer
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>

Re: unexpected end of file

Posted by Tamer Gür <tg...@ebi.ac.uk>.
i realized that i am using System.exit(0); in my main method i guess i 
shouldn't use it.

Thanks

Tamer


On 01/09/2017 16:17, Tamer Gür wrote:
> thanks Ralph. My application is running from the main and also i am 
> using the Async logger.
>
> is it possible that although main thread finish async thread still 
> needs some time to complete compressing?
>
> Tamer
>
> On 01/09/2017 15:56, Ralph Goers wrote:
>> It sounds like your application is finishing before compression of 
>> the file completes, although from the information given I cannot be 
>> sure.
>>
>> Ralph
>>
>>> On Sep 1, 2017, at 6:18 AM, Tamer Gür <tg...@ebi.ac.uk> wrote:
>>>
>>> Hi,
>>>
>>> i am using log4j2 2.8.2 with RollingFile and 
>>> SizeBasedTriggeringPolicy (250MB).
>>>
>>> My process is finishing normally with all Rolling files except the 
>>> last one in last compressed file when i try to open i am getting 
>>> "unexpected end of file" message. In the directory i also see the 
>>> file which should be inside the last compressed file with same name.
>>>
>>> I have several process like this one in some of them i don't have 
>>> any issue but in some i have same issue.
>>>
>>> What could be the issue? Can you help?
>>>
>>> Thanks
>>>
>>> Tamer
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>


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


Re: unexpected end of file

Posted by Tamer Gür <tg...@ebi.ac.uk>.
thanks Ralph. My application is running from the main and also i am 
using the Async logger.

is it possible that although main thread finish async thread still needs 
some time to complete compressing?

Tamer

On 01/09/2017 15:56, Ralph Goers wrote:
> It sounds like your application is finishing before compression of the file completes, although from the information given I cannot be sure.
>
> Ralph
>
>> On Sep 1, 2017, at 6:18 AM, Tamer Gür <tg...@ebi.ac.uk> wrote:
>>
>> Hi,
>>
>> i am using log4j2 2.8.2 with RollingFile and SizeBasedTriggeringPolicy (250MB).
>>
>> My process is finishing normally with all Rolling files except the last one in last compressed file when i try to open i am getting "unexpected end of file" message. In the directory i also see the file which should be inside the last compressed file with same name.
>>
>> I have several process like this one in some of them i don't have any issue but in some i have same issue.
>>
>> What could be the issue? Can you help?
>>
>> Thanks
>>
>> Tamer
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>


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


Re: unexpected end of file

Posted by Ralph Goers <ra...@dslextreme.com>.
It sounds like your application is finishing before compression of the file completes, although from the information given I cannot be sure.

Ralph

> On Sep 1, 2017, at 6:18 AM, Tamer Gür <tg...@ebi.ac.uk> wrote:
> 
> Hi,
> 
> i am using log4j2 2.8.2 with RollingFile and SizeBasedTriggeringPolicy (250MB).
> 
> My process is finishing normally with all Rolling files except the last one in last compressed file when i try to open i am getting "unexpected end of file" message. In the directory i also see the file which should be inside the last compressed file with same name.
> 
> I have several process like this one in some of them i don't have any issue but in some i have same issue.
> 
> What could be the issue? Can you help?
> 
> Thanks
> 
> Tamer
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
> 
> 



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