[Hippo-cms7-user] Re: 7.6 from archetype cms login page error

MN mnsweeps at yahoo.com
Thu Jun 2 14:27:24 CEST 2011


Thanks  Bart.

Should I run patch in Tomcat base directory on Linux?

Ps: sorry couldn't open patch file on my iPhone so don't know what's inside. Also did you run patch on my tar install and see it working?

--------------------------------------
This email was sent using 100% recycled electrons.

On Jun 2, 2011, at 4:23 AM, Bart van der Schans <b.vanderschans at onehippo.com> wrote:

> Hi M,
> 
> I've created a patch file that you can apply. It fixes some issues in
> your Tomcat config:
> 
> - add log4j.xml and log4j.dtd to conf/
> - set CATALINA_OPTS instead of JAVA_OPTS in catalina.sh (or the
> shutdown.sh won't work)
> - add CATALINA_PID so shutdown works correctly
> - set max perm size to 128m (is this missing in our documentation??)
> - remove strange "cd .."  from startup.sh
> 
> Just apply the patch and everything should be working just fine. I've
> still puzzled why it doesn't work when log4j isn't configured
> correctly. I've to look into that.
> 
> Some notes/tips about your tomcatconfig:
> - the catalina.sh seem a bit too complicated to me. Usually the trick
> is to just use the stock catalina.sh from Tomcat and use setenv.sh to
> set your properties. The setenv.sh will automatically be included
> before startup
> - the stock Tomcat webapps are still installed. I would advise to just
> remove them (locally you might want to keep the manager if you use it)
> - you should uncomment the following line in conf/context.xml as
> session saving across restarts doesn't work:
>        <Manager pathname="" />
> - you are using derby and not the configure mysql from the context.xml
> (could be on purpose)
> - we usually place the repository.xml outside the war in conf/ and
> point to it with
> "-Drepo.config=file:${CATALINA_BASE}/conf/repository.xml" as
> CATALINA_OPT
> 
> HTH.
> 
> Regards,
> Bart
> 
> 
> On Thu, Jun 2, 2011 at 2:07 AM, Woonsan Ko <w.ko at onehippo.com> wrote:
>> Strange..
>> I just extracted your tar and ran it. At first, I met the problem: when I
>> entered a username in cms login page and enter tab button, the page was
>> refreshed with clearing the username field. So I couldn't log on.
>> However, after I set log4j configuration, the error does not happen any
>> more.
>> 
>> Did you change any log level in your log4j configuration to DEBUG level? If
>> so, please try with WARN level.
>> I reported the following issue before because it tries to access a variable
>> to leave debug logs while the variable can be null.
>> 
>> https://issues.onehippo.com/browse/CMS7-5264
>> 
>> 
>> Woonsan
>> 
>> 
>> On 06/01/2011 04:59 PM, M Nair wrote:
>>> 
>>> Woonsan
>>> 
>>> I made sure that its called by passing invalid value to the catalina_opts
>>> and
>>> found that its getting called..
>>> 
>>> anyway I followed your suggestion and moved the parameter setting to the
>>> top and
>>> I still get the login error..So that did not help either.... I am still
>>> wondering why should a log4j parameter cause a session login failure..
>>> 
>>> Thanks
>>> 
>>> 
>>> 
>>> ----- Original Message ----
>>> From: Woonsan Ko<w.ko at onehippo.com>
>>> To: Hippo CMS 7 development public mailinglist
>>> <hippo-cms7-user at lists.onehippo.com>
>>> Sent: Wed, June 1, 2011 4:36:09 PM
>>> Subject: Re: [Hippo-cms7-user] Re: 7.6 from archetype cms login page error
>>> 
>>> Hi M,
>>> 
>>> If you modified the following line in catalina.sh,
>>> 
>>>    CATALINA_OPTS="$CATALINA_OPTS $JPDA_OPTS
>>> -Djava.net.preferIPv4Stack=true"
>>> 
>>> it's a wrong location. The script line will be executed only when jpda
>>> option is used.
>>> 
>>> Try to add the CATALINA_OPTS line at the top just after the script
>>> comment block, for example,
>>> 
>>> -->8-->8--
>>> #   LOGGING_MANAGER (Optional) Override Tomcat's logging manager
>>> #                   Example (all one line)
>>> #
>>> 
>>> LOGGING_CONFIG="-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"
>>> 
>>> #
>>> # $Id: catalina.sh 885002 2009-11-27 20:51:03Z markt $
>>> #
>>> 
>>> -----------------------------------------------------------------------------
>>> 
>>> CATALINA_OPTS="-Dlog4j.configuration=file:/tmp/app_server/conf/log4j.xml"
>>> 
>>> # OS specific support.  $var _must_ be set to either true or false.
>>> cygwin=false
>>> -->8-->8--
>>> 
>>> 
>>> HTH,
>>> 
>>> Woonsan
>>> 
>>> 
>>> On 06/01/2011 04:27 PM, M Nair wrote:
>>>> 
>>>> Woonsan
>>>> 
>>>> I tried that but did not work. You can try in my project from the TAR i
>>>> send..
>>>> 
>>>> 1) I updated CATALINA_OPTS in catalina.sh in the /bin directory as
>>>> follows.
>>>> 
>>>> 
>>>> CATALINA_OPTS="$CATALINA_OPTS $JPDA_OPTS -Djava.net.preferIPv4Stack=true
>>>> -Dlog4j.configuration=\"$CATALINA_BASE\"/conf/log4j.xml"
>>>> 
>>>> 2) I placed the 2 log4j files under /conf .
>>>> 
>>>> Restarted the service and got the same login error "Session expired,
>>>> please
>>>> login again.".  There is nothing in the log ...
>>>> 
>>>> Can you try these on my install where you could recreate it previously?
>>>> 
>>>> Thanks
>>>> M
>>>> 
>>>> 
>>>> 
>>>> 
>>>> ----- Original Message ----
>>>> From: M Nair<mnsweeps at yahoo.com>
>>>> To: Hippo CMS 7 development public mailinglist
>>>> <hippo-cms7-user at lists.onehippo.com>
>>>> Sent: Wed, June 1, 2011 3:50:16 PM
>>>> Subject: Re: [Hippo-cms7-user] Re: 7.6 from archetype cms login page
>>>> error
>>>> 
>>>> Thanks ..Trying it now..
>>>> 
>>>> 
>>>> 
>>>> 
>>>> ----- Original Message ----
>>>> From: Woonsan Ko<w.ko at onehippo.com>
>>>> To: Hippo CMS 7 development public mailinglist
>>>> <hippo-cms7-user at lists.onehippo.com>
>>>> Sent: Wed, June 1, 2011 3:33:53 PM
>>>> Subject: Re: [Hippo-cms7-user] Re: 7.6 from archetype cms login page
>>>> error
>>>> 
>>>> Hi,
>>>> 
>>>> I reproduced your problem locally.
>>>> I think you can have a workaround: You need to have a global log4j
>>>> configuration.
>>>> For example, with the current tar, you will not meet the login error in
>>>> CMS with the following commands:
>>>> 
>>>> $ export
>>>> 
>>>> CATALINA_OPTS="-Dlog4j.configuration=file:/your_catalina_base_path/conf/log4j.xml
>>>> l
>>>> 
>>>> 
>>>> -Xms256m -Xmx256m -XX:MaxPermSize=256m"
>>>> $ ./catalina.sh run (or start)
>>>> 
>>>> Note you should set "log4j.configuration" system property in either
>>>> command line or in catalina.sh file. (The remaining jvm options are not
>>>> related to this problem.)
>>>> You will need to copy the following files into $CATALINA_BASE/conf/:
>>>> -
>>>> 
>>>> http://svn.onehippo.org/repos/hippo/hippo-demos/hippo-go-green/trunk/conf/log4j.dtd
>>>> d
>>>> 
>>>> 
>>>> -
>>>> 
>>>> http://svn.onehippo.org/repos/hippo/hippo-demos/hippo-go-green/trunk/conf/log4j.xml
>>>> l
>>>> 
>>>> 
>>>> 
>>>> Also, maybe this problem seems related to
>>>> https://issues.onehippo.com/browse/CMS7-5264 because it's related to
>>>> logging configuration issue.
>>>> 
>>>> HTH,
>>>> 
>>>> Woonsan
>>>> 
>>>> On 06/01/2011 02:41 PM, M Nair wrote:
>>>>> 
>>>>> Folks
>>>>> 
>>>>> Here is my entire application in a TAR file includes the Tomcat
>>>>> container.
>>> 
>>> The
>>>>> 
>>>>> only thing you will need to change is the STORAGE path in the web.xml
>>>>> file
>>> 
>>> for
>>>>> 
>>>>> CMS. And once thats done you should be up and running to reproduce the
>>>>> admin
>>>>> login issue.
>>>>> 
>>>>> http://www.4shared.com/file/e1N9BoYD/hippocms76.html
>>>>> 
>>>>> Its a free site so please wait 90 second before the file
>>>>> "hippocms76.tar"
>>>>> download begins.
>>>>> 
>>>>> Thanks
>>>>> 
>>>>> 
>>>>> 
>>>>> ----- Original Message ----
>>>>> From: M Nair<mnsweeps at yahoo.com>
>>>>> To: Hippo CMS 7 development public mailinglist
>>>>> <hippo-cms7-user at lists.onehippo.com>
>>>>> Sent: Wed, June 1, 2011 1:02:26 PM
>>>>> Subject: Re: [Hippo-cms7-user] Re: 7.6 from archetype cms login page
>>>>> error
>>>>> 
>>>>> Denis
>>>>> 
>>>>> Sorry but I am still not sure what you mean here :-((
>>>>> 
>>>>> I tried installing the 1.03.03 project again with file repository
>>>>> instead of
>>>>> using my sql on Linux. I got the same session expired error. The only
>>>>> change
>>>>> after unzip would be to change the repository location from
>>> 
>>> /tmp/mnair/hippo76
>>>>> 
>>>>> to something of your choice.
>>>>> 
>>>>> 
>>>>> I will send a followup email on where you can download the file from ..
>>>>> 
>>>>> Thanks
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> ----- Original Message ----
>>>>> From: Denis Ryabkov<d.v.ryabkov at gmail.com>
>>>>> To: hippo-cms7-user at lists.onehippo.com
>>>>> Sent: Wed, June 1, 2011 10:38:04 AM
>>>>> Subject: [Hippo-cms7-user] Re: 7.6 from archetype cms login page error
>>>>> 
>>>>> With default artifactId order is not changed, all OK.
>>>>> 
>>>>> To reproduce:
>>>>> mvn archetype:generate \
>>>>> -DarchetypeRepository=http://maven.onehippo.com/maven2 \
>>>>> -DarchetypeGroupId=org.onehippo.cms7 \
>>>>> -DarchetypeArtifactId=hippo-archetype-website \
>>>>> -DarchetypeVersion=1.03.03 \
>>>>> -DartifactId=cms
>>>>> 
>>>>> Notice artifactId=cms!!!!!!!!!!!!!!
>>>>> 
>>>>> Frontend name can be changed in cms/src/main/webapp/WEB-INF/web.xml with
>>>>> <init-param>
>>>>>     <param-name>config</param-name>
>>>>>     <param-value>cms</param-value>
>>>>> </init-param>.
>>>>> Login fixed, but cms does not work as needed either. So artifact id
>>>>> can't be
>>>>> "cms".
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> --
>>>>> View this message in context:
>>>>> 
>>>>> http://hippo.2275632.n2.nabble.com/7-6-from-archetype-cms-login-page-error-tp6425881p6428034.html
>>>>> l
>>>>> 
>>>>> l
>>>>> 
>>>>> 
>>>>> Sent from the Hippo CMS 7 mailing list archive at Nabble.com.
>>>>> _______________________________________________
>>>>> Hippo-cms7-user mailing list and forums
>>>>> http://www.onehippo.org/cms7/support/forums.html
>>>>> 
>>>>> _______________________________________________
>>>>> Hippo-cms7-user mailing list and forums
>>>>> http://www.onehippo.org/cms7/support/forums.html
>>>>> 
>>>>> _______________________________________________
>>>>> Hippo-cms7-user mailing list and forums
>>>>> http://www.onehippo.org/cms7/support/forums.html
>>> 
>> 
>> 
>> --
>> w.ko at onehippo.com     www.onehippo.com
>> Boston - 1 Broadway, Cambridge, MA 02142
>> Amsterdam - Oosteinde 11, 1017 WT Amsterdam
>> US +1 877 414 4776 (toll free)
>> Europe +31(0)20 522 4466
>> 
>> _______________________________________________
>> Hippo-cms7-user mailing list and forums
>> http://www.onehippo.org/cms7/support/forums.html
>> 
> 
> 
> 
> -- 
> Amsterdam - Oosteinde 11, 1017 WT Amsterdam
> Boston - 1 Broadway, Cambridge, MA 02142
> 
> US +1 877 414 4776 (toll free)
> Europe +31(0)20 522 4466
> www.onehippo.com
> <hippocms76.patch>
> _______________________________________________
> Hippo-cms7-user mailing list and forums
> http://www.onehippo.org/cms7/support/forums.html



More information about the Hippo-cms7-user mailing list