You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Jerry Malcolm <te...@malcolms.com> on 2016/12/28 00:06:02 UTC

Ramifications of Deleting 'var' in James 3?

I've been on James 3 for nearly 3 years.  It's a rare occurrence, but 
there have been a few times that the var 'store' has become corrupted.  
Basically, JAMES siezes up, and nothing will get it going again.  I have 
found in these situations (basically through trial and error) that 
deleting the var directory fixes it.  Since deleting var causes JAMES to 
start functioning again, I'm going to assume that there was something 
corrupted in that folder.

After deleting var, I'm not observing any apparent repercussions.  But I 
gotta believe that there cannot be "zero" damage to killing a folder.

Today, it happened again.   From the log, it appears that mail was still 
coming in.  But IMAP was dead.  I tried bouncing JAMES and MySQL.  No 
change.  Tried rebooting the entire box.  Also, no change.  The errors 
below were showing up in the log.   I removed the var folder (actually 
just renamed it), and everything is back to running fine.

My one question.... what damage did I do?  Did I lose mail that might 
have come in during the several hours it froze before I noticed the 
problem?  BTW... it's James 3.0b5 running on WinServer2008 r2.

Log entries:

WARN  16:44:07,985 | org.apache.activemq.store.amq.AMQPersistenceAdapter 
| The ReferenceStore is not valid - recovering ...

... with several of these entries:

Caused by: java.lang.OutOfMemoryError: Java heap space
         at java.util.Arrays.copyOf(Unknown Source)
         at java.io.ByteArrayOutputStream.grow(Unknown Source)
         at java.io.ByteArrayOutputStream.ensureCapacity(Unknown Source)
         at java.io.ByteArrayOutputStream.write(Unknown Source)
         at 
javax.mail.internet.MimeMultipart.readTillFirstBoundary(MimeMultipart.java:316)
......

ERROR 16:46:16,968 | james.mailspooler | Exception processing mail while 
spooling Unable to process mail 
Mail1482864159130-1b87a776-1f41-41d5-951b-ab7b2ed94d04 
(org.apache.camel.CamelExecutionException: Exception occurred during 
execution on the exchange: Exchange[Message: 
org.apache.james.core.MailImpl@c96e9e])
javax.mail.MessagingException: Unable to process mail 
Mail1482864159130-1b87a776-1f41-41d5-951b-ab7b2ed94d04 
(org.apache.camel.CamelExecutionException: Exception occurred during 
execution on the exchange: Exchange[Message: 
org.apache.james.core.MailImpl@c96e9e])
         at 
org.apache.james.mailetcontainer.impl.camel.CamelMailetProcessor.service(CamelMailetProcessor.java:65)
         at 
org.apache.james.mailetcontainer.lib.AbstractStateCompositeProcessor.service(AbstractStateCompositeProcessor.java:98)
         at 
org.apache.james.mailetcontainer.impl.JamesMailSpooler$1.run(JamesMailSpooler.java:166)
         at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown 
Source)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown 
Source)
         at java.lang.Thread.run(Unknown Source)


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


Re: Ramifications of Deleting 'var' in James 3?

Posted by Benoit Tellier <bt...@linagora.com>.
Hi,

First thanks for this report, it seems you have some experience running
James, and I would be interested to know what actually goes corrupted.

Could you please attach a full exception stack trace of what happens
when var is corrupted ?

Could you also provide your configuration ?

An other helpfull question : Which directory do you need to remove
inside your corrupted /var for james to start ? (easy way to see the
involved component)

Then to answer your question var is used :
 - To store Sieve scripts with beta5. I guess there is no harm for you.
 - The embedded store of activeMQ. You are wiping out your mail queue...
And the mail into them as well.
 - The mailstores storing relays errors. They might allow to keep track
of email, and revert later decisions made on it (although process is not
really documented). It might allow you to re-processed, for instance,
mails you flagged as SPAM. The default store being file, I guess you
also wiped this out.
 - At least you do not use Derby, then you did not destroyed your mailboxes.

It would be cool to have more detail to :
 - Know what's corrupted, and let you do more chirurgical reparations
 - See if we can recover from this corrupted state in the code
 - And identify why it got corrupted in the first place. Try not having
it corrupted.

What I will suggest :
 - SIEVE script will not be a problem
 - Try disable mailStore by removing ToRepository mailets in your conf
mailetcontainer.xml (if you are not using them of course). If it's the
source of your problem, it's an easy work around.


Cheers,

Benoit

Le 28/12/2016 � 07:06, Jerry Malcolm a �crit :
> I've been on James 3 for nearly 3 years.  It's a rare occurrence, but
> there have been a few times that the var 'store' has become corrupted. 
> Basically, JAMES siezes up, and nothing will get it going again.  I have
> found in these situations (basically through trial and error) that
> deleting the var directory fixes it.  Since deleting var causes JAMES to
> start functioning again, I'm going to assume that there was something
> corrupted in that folder.
> 
> After deleting var, I'm not observing any apparent repercussions.  But I
> gotta believe that there cannot be "zero" damage to killing a folder.
> 
> Today, it happened again.   From the log, it appears that mail was still
> coming in.  But IMAP was dead.  I tried bouncing JAMES and MySQL.  No
> change.  Tried rebooting the entire box.  Also, no change.  The errors
> below were showing up in the log.   I removed the var folder (actually
> just renamed it), and everything is back to running fine.
> 
> My one question.... what damage did I do?  Did I lose mail that might
> have come in during the several hours it froze before I noticed the
> problem?  BTW... it's James 3.0b5 running on WinServer2008 r2.
> 
> Log entries:
> 
> WARN  16:44:07,985 | org.apache.activemq.store.amq.AMQPersistenceAdapter
> | The ReferenceStore is not valid - recovering ...
> 
> ... with several of these entries:
> 
> Caused by: java.lang.OutOfMemoryError: Java heap space
>         at java.util.Arrays.copyOf(Unknown Source)
>         at java.io.ByteArrayOutputStream.grow(Unknown Source)
>         at java.io.ByteArrayOutputStream.ensureCapacity(Unknown Source)
>         at java.io.ByteArrayOutputStream.write(Unknown Source)
>         at
> javax.mail.internet.MimeMultipart.readTillFirstBoundary(MimeMultipart.java:316)
> 
> ......
> 
> ERROR 16:46:16,968 | james.mailspooler | Exception processing mail while
> spooling Unable to process mail
> Mail1482864159130-1b87a776-1f41-41d5-951b-ab7b2ed94d04
> (org.apache.camel.CamelExecutionException: Exception occurred during
> execution on the exchange: Exchange[Message:
> org.apache.james.core.MailImpl@c96e9e])
> javax.mail.MessagingException: Unable to process mail
> Mail1482864159130-1b87a776-1f41-41d5-951b-ab7b2ed94d04
> (org.apache.camel.CamelExecutionException: Exception occurred during
> execution on the exchange: Exchange[Message:
> org.apache.james.core.MailImpl@c96e9e])
>         at
> org.apache.james.mailetcontainer.impl.camel.CamelMailetProcessor.service(CamelMailetProcessor.java:65)
> 
>         at
> org.apache.james.mailetcontainer.lib.AbstractStateCompositeProcessor.service(AbstractStateCompositeProcessor.java:98)
> 
>         at
> org.apache.james.mailetcontainer.impl.JamesMailSpooler$1.run(JamesMailSpooler.java:166)
> 
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown
> Source)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
> Source)
>         at java.lang.Thread.run(Unknown Source)
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
> 

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