You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by Stefano Bagnara <ap...@bago.org> on 2007/02/02 21:09:50 UTC

v2.3 backport for unbounded cache fix (Was: svn commit: r502713)

As we decided in "[VOTE RESULT] InetAddress unbounded cache patch 
backport" I will backport this fix on the v2.3 in 3 days.

While working on the fix I decided to publish the Security.setProperty 
configuration as a system property so that the default behaviour of the 
phoenix laucher jar is not changed but we can tune the default value via 
a system property with the same name ("networkaddress.cache.ttl").

As the new default for our run scripts I used 300 seconds. If you prefer 
"0" or another period feel free to suggest a new one.

Please review.

Stefano

bago@apache.org wrote:
> Author: bago
> Date: Fri Feb  2 12:04:26 2007
> New Revision: 502713
> 
> URL: http://svn.apache.org/viewvc?view=rev&rev=502713
> Log:
> Applied a default 300seconds ttl to InetAddress positive cache (JAMES-679 / JAMES-592)
> This can be tuned via the System property "networkaddress.cache.ttl". Setting it to 0 will disable caching at all. Setting it to -1 will avoid expiration.
> 
> Modified:
>     james/server/trunk/JAMES_PHOENIX.txt
>     james/server/trunk/phoenix-bin/bin/james-server.sh
>     james/server/trunk/phoenix-bin/bin/phoenix-loader.jar
>     james/server/trunk/phoenix-bin/bin/phoenix.sh
>     james/server/trunk/phoenix-bin/bin/run.bat
>     james/server/trunk/phoenix-bin/conf/wrapper.conf
> 
> Modified: james/server/trunk/JAMES_PHOENIX.txt
> URL: http://svn.apache.org/viewvc/james/server/trunk/JAMES_PHOENIX.txt?view=diff&rev=502713&r1=502712&r2=502713
> ==============================================================================
> --- james/server/trunk/JAMES_PHOENIX.txt (original)
> +++ james/server/trunk/JAMES_PHOENIX.txt Fri Feb  2 12:04:26 2007
> @@ -12,7 +12,19 @@
>  
>  - upgraded wrapper.* files to 3.2.0 release (http://wrapper.tanukisoftware.org/)
>  
> --add new jar for invoke phoenix via commonns daemon.
> +- add new jar for invoke phoenix via commonns daemon.
> +
> +- added this code to org.apache.avalon.phoenix.launcher.Main:121:
> +  ---------------------------------
> +    // Set the Security property to the same value of the system property.
> +    String ttlcache = System.getProperty("networkaddress.cache.ttl");
> +    if (ttlcache != null) {
> +        Security.setProperty("networkaddress.cache.ttl" , ttlcache);
> +    }
> +  ---------------------------------
> +
> +- added a "-Dnetworkaddress.cache.ttl=300" to all executing scripts:
> +  wrapper.conf, phoenix.sh, run.bat, james-server.sh
>  
>  Changed the build.xml to reflect the changes.
>  
> 
> Modified: james/server/trunk/phoenix-bin/bin/james-server.sh
> URL: http://svn.apache.org/viewvc/james/server/trunk/phoenix-bin/bin/james-server.sh?view=diff&rev=502713&r1=502712&r2=502713
> ==============================================================================
> --- james/server/trunk/phoenix-bin/bin/james-server.sh (original)
> +++ james/server/trunk/phoenix-bin/bin/james-server.sh Fri Feb  2 12:04:26 2007
> @@ -137,6 +137,10 @@
>    JVM_OPTS="$JVM_OPTS -Djava.security.manager"
>  fi
>  
> +# Make sure we don't run with a never expiring cache for InetAddress
> +# In Phoenix Main this is read and applied as Security.setProperty
> +PHOENIX_JVM_OPTS="$PHOENIX_JVM_OPTS -Dnetworkaddress.cache.ttl=300"
> +
>  # change to the bin directory
>  cd $PHOENIX_HOME/bin
>  
> 
> Modified: james/server/trunk/phoenix-bin/bin/phoenix-loader.jar
> URL: http://svn.apache.org/viewvc/james/server/trunk/phoenix-bin/bin/phoenix-loader.jar?view=diff&rev=502713&r1=502712&r2=502713
> ==============================================================================
> Binary files - no diff available.
> 
> Modified: james/server/trunk/phoenix-bin/bin/phoenix.sh
> URL: http://svn.apache.org/viewvc/james/server/trunk/phoenix-bin/bin/phoenix.sh?view=diff&rev=502713&r1=502712&r2=502713
> ==============================================================================
> --- james/server/trunk/phoenix-bin/bin/phoenix.sh (original)
> +++ james/server/trunk/phoenix-bin/bin/phoenix.sh Fri Feb  2 12:04:26 2007
> @@ -133,6 +133,10 @@
>    JVM_OPTS="$JVM_OPTS -Djava.security.manager"
>  fi
>  
> +# Make sure we don't run with a never expiring cache for InetAddress
> +# In Phoenix Main this is read and applied as Security.setProperty
> +PHOENIX_JVM_OPTS="$PHOENIX_JVM_OPTS -Dnetworkaddress.cache.ttl=300"
> +
>  # change to the bin directory
>  cd $PHOENIX_HOME/bin
>  
> 
> Modified: james/server/trunk/phoenix-bin/bin/run.bat
> URL: http://svn.apache.org/viewvc/james/server/trunk/phoenix-bin/bin/run.bat?view=diff&rev=502713&r1=502712&r2=502713
> ==============================================================================
> --- james/server/trunk/phoenix-bin/bin/run.bat (original)
> +++ james/server/trunk/phoenix-bin/bin/run.bat Fri Feb  2 12:04:26 2007
> @@ -76,6 +76,10 @@
>  
>  :postSecure
>  
> +rem Make sure we don't run with a never expiring cache for InetAddress
> +rem In Phoenix Main this is read and applied as Security.setProperty
> +set PHOENIX_JVM_OPTS=%PHOENIX_JVM_OPTS% -Dnetworkaddress.cache.ttl=300
> +
>  rem
>  rem -Djava.ext.dirs= is needed as some JVM vendors do foolish things
>  rem like placing jaxp/jaas/xml-parser jars in ext dir
> 
> Modified: james/server/trunk/phoenix-bin/conf/wrapper.conf
> URL: http://svn.apache.org/viewvc/james/server/trunk/phoenix-bin/conf/wrapper.conf?view=diff&rev=502713&r1=502712&r2=502713
> ==============================================================================
> --- james/server/trunk/phoenix-bin/conf/wrapper.conf (original)
> +++ james/server/trunk/phoenix-bin/conf/wrapper.conf Fri Feb  2 12:04:26 2007
> @@ -23,6 +23,8 @@
>  wrapper.java.additional.2=-Dphoenix.home=..
>  wrapper.java.additional.3=-Djava.security.policy=jar:file:phoenix-loader.jar!/META-INF/java.policy
>  wrapper.java.additional.4=-Djava.security.manager
> +# In Phoenix Main this is read and applied as Security.setProperty
> +wrapper.java.additional.5=-Dnetworkaddress.cache.ttl=300
>  
>  # Initial Java Heap Size (in MB)
>  wrapper.java.initmemory=16
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
> 
> 



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


Re: v2.3 backport for unbounded cache fix (Was: svn commit: r502713)

Posted by Danny Angus <da...@apache.org>.
On 2/3/07, Stefano Bagnara <ap...@bago.org> wrote:

> Where should we add documentation?

Good question,  some where in
here:http://james.apache.org/server/2.3.0/index.html and possibly as
an FAQ.


I'll do this, perhaps you could raise a jira issue and assign it to me
so I don't forget.

d.

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


Re: v2.3 backport for unbounded cache fix (Was: svn commit: r502713)

Posted by Danny Angus <da...@apache.org>.
On 2/3/07, Stefano Bagnara <ap...@bago.org> wrote:

> Where should we add documentation?

Good question,  some where in
here:http://james.apache.org/server/2.3.0/index.html and possibly as
an FAQ.


I'll do this, perhaps you could raise a jira issue and assign it to me
so I don't forget.

d.

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


Re: v2.3 backport for unbounded cache fix (Was: svn commit: r502713)

Posted by robert burrell donkin <ro...@gmail.com>.
On 2/4/07, Stefano Bagnara <ap...@bago.org> wrote:
> Norman Maurer wrote:
> > Danny Angus schrieb:

<snip>

> > Maybe we should also include a "NOTICE" file in the builds which
> > explains this issue ?
>
> NOTICE is already used for legal issues.
> Maybe the README is better, but I would prefer to use config.xml instead
> of README, because we know people will open the config.xml for sure..
> instead we are not sure they will open the README.

put the same content:
 * in the README
 * in the config.xml
 * in the RELEASE_NOTES
 * in the download advertising
 * in the announcement

- robert

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


Re: v2.3 backport for unbounded cache fix (Was: svn commit: r502713)

Posted by Danny Angus <da...@apache.org>.
I'll do it, when is the last date?

On 2/8/07, Stefano Bagnara <ap...@bago.org> wrote:
> Norman Maurer ha scritto:
> >> put the same content:
> >> * in the README
> >> * in the config.xml
> >> * in the RELEASE_NOTES
> >> * in the download advertising
> >> * in the announcement
> >>
> >> - robert
> >
> > It whould be nice if someone with better english "knowledge" could
> > propose the text.
>
> FYI I filed a JIRA issue and assigned it to Danny (he proposed to help).
>
> Stefano
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
>
>

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


Re: v2.3 backport for unbounded cache fix (Was: svn commit: r502713)

Posted by Norman Maurer <nm...@byteaction.de>.
Hi Danny,

just do it when you have a timeslot. I don't want to stress you ;-)

bye
Norman

Danny Angus schrieb:
> I'll do it, when is the last date?
>
> On 2/8/07, Stefano Bagnara <ap...@bago.org> wrote:
>> Norman Maurer ha scritto:
>> >> put the same content:
>> >> * in the README
>> >> * in the config.xml
>> >> * in the RELEASE_NOTES
>> >> * in the download advertising
>> >> * in the announcement
>> >>
>> >> - robert
>> >
>> > It whould be nice if someone with better english "knowledge" could
>> > propose the text.
>>
>> FYI I filed a JIRA issue and assigned it to Danny (he proposed to help).
>>
>> Stefano
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
>> For additional commands, e-mail: server-dev-help@james.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
>
> !EXCUBATOR:1,45cc18b439411114997028!


-- 
Mit freundlichen Grüßen 

i.A. Norman Maurer 
Systemadministrator

ByteAction GmbH
Auf der Beune 83-85
64839 Münster

Phone:   +49 (0) 60 71 92 16 - 21
Fax:       +49 (0) 60 71 92 16 - 20
E-mail:    nm@byteaction.de
Internet: www.byteaction.de
AG Darmstadt, HRB 33271
Ust-Id: DE206997247
GF: Thomas Volkert
------------------------------------------------------ 
Diese E-Mail enthält vertrauliche Informationen und ist nur für den in der E-Mail genannten Adressaten bestimmt. Für den Fall, dass der Empfänger dieser E-Mail nicht der in der E-Mail benannte Adressat ist, weisen wir darauf hin, dass das Lesen, Kopieren, die Wiedergabe, Verbreitung, Vervielfältigung, Bekanntmachung, Veränderung, Verteilung und/oder Veröffentlichung der E-Mail strengstens untersagt ist. Bitte verständigen Sie den Absender dieser E-Mail unter folgender Rufnummer +49 (0) 6071 / 9216-0, falls Sie irrtümlich diese E-Mail erhalten haben und löschen Sie diese E-Mail. Der Inhalt dieser E-Mail ist nur rechtsverbindlich, wenn er von unserer Seite schriftlich durch Brief oder Telefax bestätigt wird. Die Versendung von E-Mails an uns hat keine fristwahrende Wirkung. 

This e-mail contains information which is privileged and is intended only for the Addressee named in the e-mail. In case that the recipient of this e-mail is not the named addressee, we would like to inform you that it is strictly prohibited to read, to reproduce, to disseminate, to copy, to disclose, to modify, to distribute and/or to publish this e-mail. If you have received this e-mail in error, please call the sender under following telephone number +49 (0) 6071 / 9216-0 and delete this e-mail. The content of this e-mail is not legally binding unless confirmed by letter or telefax. E-mails which are sent to us do not constitute compliance with any time limits or deadlines.
------------------------------------------------------ 



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


Re: v2.3 backport for unbounded cache fix (Was: svn commit: r502713)

Posted by Stefano Bagnara <ap...@bago.org>.
Norman Maurer ha scritto:
>> put the same content:
>> * in the README
>> * in the config.xml
>> * in the RELEASE_NOTES
>> * in the download advertising
>> * in the announcement
>>
>> - robert 
> 
> It whould be nice if someone with better english "knowledge" could
> propose the text.

FYI I filed a JIRA issue and assigned it to Danny (he proposed to help).

Stefano


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


Re: v2.3 backport for unbounded cache fix (Was: svn commit: r502713)

Posted by Norman Maurer <nm...@byteaction.de>.
robert burrell donkin schrieb:
> On 2/4/07, Stefano Bagnara <ap...@bago.org> wrote:
>> Norman Maurer wrote:
>> > Danny Angus schrieb:
>
> <snip>
>
>> > Maybe we should also include a "NOTICE" file in the builds which
>> > explains this issue ?
>>
>> NOTICE is already used for legal issues.
>> Maybe the README is better, but I would prefer to use config.xml instead
>> of README, because we know people will open the config.xml for sure..
>> instead we are not sure they will open the README.
>
> put the same content:
> * in the README
> * in the config.xml
> * in the RELEASE_NOTES
> * in the download advertising
> * in the announcement
>
> - robert 

It whould be nice if someone with better english "knowledge" could
propose the text.

bye
Norman


-- 
Mit freundlichen Grüßen 

i.A. Norman Maurer 
Systemadministrator

ByteAction GmbH
Auf der Beune 83-85
64839 Münster

Phone:   +49 (0) 60 71 92 16 - 21
Fax:       +49 (0) 60 71 92 16 - 20
E-mail:    nm@byteaction.de
Internet: www.byteaction.de
AG Darmstadt, HRB 33271
Ust-Id: DE206997247
GF: Thomas Volkert
------------------------------------------------------ 
Diese E-Mail enthält vertrauliche Informationen und ist nur für den in der E-Mail genannten Adressaten bestimmt. Für den Fall, dass der Empfänger dieser E-Mail nicht der in der E-Mail benannte Adressat ist, weisen wir darauf hin, dass das Lesen, Kopieren, die Wiedergabe, Verbreitung, Vervielfältigung, Bekanntmachung, Veränderung, Verteilung und/oder Veröffentlichung der E-Mail strengstens untersagt ist. Bitte verständigen Sie den Absender dieser E-Mail unter folgender Rufnummer +49 (0) 6071 / 9216-0, falls Sie irrtümlich diese E-Mail erhalten haben und löschen Sie diese E-Mail. Der Inhalt dieser E-Mail ist nur rechtsverbindlich, wenn er von unserer Seite schriftlich durch Brief oder Telefax bestätigt wird. Die Versendung von E-Mails an uns hat keine fristwahrende Wirkung. 

This e-mail contains information which is privileged and is intended only for the Addressee named in the e-mail. In case that the recipient of this e-mail is not the named addressee, we would like to inform you that it is strictly prohibited to read, to reproduce, to disseminate, to copy, to disclose, to modify, to distribute and/or to publish this e-mail. If you have received this e-mail in error, please call the sender under following telephone number +49 (0) 6071 / 9216-0 and delete this e-mail. The content of this e-mail is not legally binding unless confirmed by letter or telefax. E-mails which are sent to us do not constitute compliance with any time limits or deadlines.
------------------------------------------------------ 



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


Re: v2.3 backport for unbounded cache fix (Was: svn commit: r502713)

Posted by Stefano Bagnara <ap...@bago.org>.
Norman Maurer wrote:
> Danny Angus schrieb:
>> On 2/3/07, Stefano Bagnara <ap...@bago.org> wrote:
>>
>>> Where should we add documentation?
>> Good question,  some where in
>> here:http://james.apache.org/server/2.3.0/index.html and possibly as
>> an FAQ.
>>
>>
>> I'll do this, perhaps you could raise a jira issue and assign it to me
>> so I don't forget.
>>
>> d.
> 
> +1
> 
> Maybe we should also include a "NOTICE" file in the builds which
> explains this issue ?

NOTICE is already used for legal issues.
Maybe the README is better, but I would prefer to use config.xml instead 
of README, because we know people will open the config.xml for sure.. 
instead we are not sure they will open the README.

Stefano


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


Re: v2.3 backport for unbounded cache fix (Was: svn commit: r502713)

Posted by Norman Maurer <nm...@byteaction.de>.
Danny Angus schrieb:
> On 2/3/07, Stefano Bagnara <ap...@bago.org> wrote:
>
>> Where should we add documentation?
>
> Good question,  some where in
> here:http://james.apache.org/server/2.3.0/index.html and possibly as
> an FAQ.
>
>
> I'll do this, perhaps you could raise a jira issue and assign it to me
> so I don't forget.
>
> d.

+1

Maybe we should also include a "NOTICE" file in the builds which
explains this issue ?

bye
Norman



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


Re: v2.3 backport for unbounded cache fix (Was: svn commit: r502713)

Posted by Stefano Bagnara <ap...@bago.org>.
Danny Angus wrote:
>> As the new default for our run scripts I used 300 seconds. If you prefer
>> "0" or another period feel free to suggest a new one.
> 
> sounds reasonable if it is *clearly* documented so that people who
> experience issues can RTM to resolve them.


Where should we add documentation?

A paragraph at the start of james config.xml (or near the dnsserver 
block) that explain the problem (even if you can't change it in 
config.xml) and point you to the wrapper.conf / phoenix.sh / run.bat if 
you need to change?

Or a FAQ ? Or a wiki page?

Any help and contribution is welcome, expecially when a good english is 
better to explain a tricky problem.

Stefano


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


Re: v2.3 backport for unbounded cache fix (Was: svn commit: r502713)

Posted by Danny Angus <da...@apache.org>.
On 2/2/07, Stefano Bagnara <ap...@bago.org> wrote:

> While working on the fix I decided to publish the Security.setProperty
> configuration as a system property so that the default behaviour of the
> phoenix laucher jar is not changed

sounds sensible.

> but we can tune the default value via
> a system property with the same name ("networkaddress.cache.ttl").

equally sensible.

>
> As the new default for our run scripts I used 300 seconds. If you prefer
> "0" or another period feel free to suggest a new one.

sounds reasonable if it is *clearly* documented so that people who
experience issues can RTM to resolve them.

>
> Please review.

I didn't review it, but I trust you.

d.

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