Hi
I have implemented cash system in ofbiz application where he OFBIZ server is accessed through apache server Thus certain port are changed as per the requirement to make it run on web server is done there. But problem is for each and every click inside the application the session was getting cleared and webservices and taking time 5 to 10 mins for every click Please let me know what is the problem Regards Prasanthi |
can you clarify what you mean by cash system.
are you speaking of the pos system. I have many ofbiz running on the same server. and I use Apache front end and AJP connectors. I have no problems. so could you give more detail. ========================= BJ Freeman http://bjfreeman.elance.com Strategic Power Office with Supplier Automation <http://www.businessesnetwork.com/automation/viewforum.php?f=93> Specialtymarket.com <http://www.specialtymarket.com/> Systems Integrator-- Glad to Assist Chat Y! messenger: bjfr33man <http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro> prasanthi_ofbiz sent the following on 5/31/2010 4:35 AM: > Hi > I have implemented cash system in ofbiz application where he OFBIZ server is > accessed through apache server Thus certain port are changed as per the > requirement to make it run on web server is done there. > But problem is for each and every click inside the application the session > was getting cleared and webservices and taking time 5 to 10 mins for every > click > > Please let me know what is the problem > > Regards > Prasanthi |
Dear BJ,
Cash setup is nothing but LDAP authentication. Once the user is logged in we are authenticating the user through LDAP. In my environment apache server is in another location and application is in another System. I am also running the same application with out routing apache server then its working fine. where as if i route the each and every request through apache this issue is coming. I have done the operations like,Logged in to the Accounting module, then clicked on Financial Account tab, then Create New Financial Account button. The logger for the same is attached,please verify the it and tell me the problem Regards Prasanthi ofbiz_log.odt |
In reply to this post by BJ Freeman
Hi BJ,
Attaching the same logger file in different format because i don't think it will open Regards Prasanthi ofbiz_log.doc |
In reply to this post by BJ Freeman
Dear BJ,
I found where the problem is but I don't know why its happend. In the common-contoller.xml file located at ofbiz/framework/common/webcommon/WEB-INF/ there is a section written below <preprocessor> <event name="check509CertLogin" type="java" path="org.ofbiz.webapp.control.LoginWorker" invoke="check509CertLogin"/> <event name="checkRequestHeaderLogin" type="java" path="org.ofbiz.webapp.control.LoginWorker" invoke="checkRequestHeaderLogin"/> <event name="checkServletRequestRemoteUserLogin" type="java" path="org.ofbiz.webapp.control.LoginWorker" invoke="checkServletRequestRemoteUserLogin"/> <event name="checkExternalLoginKey" type="java" path="org.ofbiz.webapp.control.LoginWorker" invoke="checkExternalLoginKey"/> <event name="checkProtectedView" type="java" path="org.ofbiz.webapp.control.ProtectViewWorker" invoke="checkProtectedView"/> </preprocessor> Because of this each and every click visiting the function checkServletRequestRemoteUserLogin of LoginWorker.java. Inside this I have written code for calling webservices for getting remote user details and verifying the same user. This is normally taking approx 1 min. So that system is looking slow. I have two environments like Ofbiz1 and Ofbiz2 In Ofbiz1 environment server is accessed through Apache server which is in different location In Ofbiz2 environment we are accessing directly the application server of ofbiz. Ofbiz1 runs on 443/80 ports and Ofbiz2 runs on 7443/7080 ports I don't know why the same thing is not happening in Ofbiz2 environment and happening in Ofbiz1 environment. Please help me... Regards Prasanthi |
not sure if it is related, but I just installed an new ofbiz through AJP
apache 2.2.3 I have ofbiz under a virtual server pasted setup from another server that works. I am having issues with https. I can go to the actual server and use the <a href="https://localhost:port">https://localhost:port OK but https://domainname.com/ from a remote location gives me a broken connection error. based on this I am focusing on apache and AJP to see what is changed. It may be that ofbiz needs an AJP container for https should have it debugged soon ========================= BJ Freeman http://bjfreeman.elance.com Strategic Power Office with Supplier Automation <http://www.businessesnetwork.com/automation/viewforum.php?f=93> Specialtymarket.com <http://www.specialtymarket.com/> Systems Integrator-- Glad to Assist Chat Y! messenger: bjfr33man <http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro> prasanthi_ofbiz sent the following on 6/1/2010 5:54 AM: > Dear BJ, > I found where the problem is but I don't know why its happend. In the > common-contoller.xml file located at > ofbiz/framework/common/webcommon/WEB-INF/ there is a section written below > > <preprocessor> > <!-- Events to run on every request before security (chains exempt) > --> > <event name="check509CertLogin" type="java" > path="org.ofbiz.webapp.control.LoginWorker" invoke="check509CertLogin"/> > <event name="checkRequestHeaderLogin" type="java" > path="org.ofbiz.webapp.control.LoginWorker" > invoke="checkRequestHeaderLogin"/> > <event name="checkServletRequestRemoteUserLogin" type="java" > path="org.ofbiz.webapp.control.LoginWorker" > invoke="checkServletRequestRemoteUserLogin"/> > <event name="checkExternalLoginKey" type="java" > path="org.ofbiz.webapp.control.LoginWorker" invoke="checkExternalLoginKey"/> > <event name="checkProtectedView" type="java" > path="org.ofbiz.webapp.control.ProtectViewWorker" > invoke="checkProtectedView"/> > </preprocessor> > > > Because of this each and every click visiting the function > checkServletRequestRemoteUserLogin of LoginWorker.java. Inside this I have > written code for calling webservices for getting remote user details and > verifying the same user. This is normally taking approx 1 min. So that > system is looking slow. > > I have two environments like > Ofbiz1 and Ofbiz2 > In Ofbiz1 environment server is accessed through Apache server which is in > different location > In Ofbiz2 environment we are accessing directly the application server of > ofbiz. > Ofbiz1 runs on 443/80 ports and Ofbiz2 runs on 7443/7080 ports > I don't know why the same thing is not happening in Ofbiz2 environment and > happening in Ofbiz1 environment. > > Please help me... > Regards > Prasanthi > > > > |
Dear BJ,
We have an set up where ofbiz is accessed through Apache web server. Ofbiz is also integrated with CAS server for single sign on. When we are accessing ofbiz, the session created for path /accounting is not getting saved in the cookie. Due to which whenever we are click on any tab, it is creating a new session for /accounting again for every event. This leads to performance issues in application. Does it requires any special configuration for ofbiz in ofbiz application or Apache web server for restricting the multiple session creation for every single event. We have used mod_jk configuration for apahce configuration.And version of apache is v2.2.14 Regards Prasanthi |
You will need to configure the Apache web server to map the cookies
properly. I had this problem but I was using ajp_proxy and I have no idea how it is going to work with mod_jk. Thanks, Raj On 08/06/10 12:18, prasanthi_ofbiz wrote: > Dear BJ, > > > We have an set up where ofbiz is accessed through Apache web server. > Ofbiz is also integrated with CAS server for single sign on. > When we are accessing ofbiz, the session created for path /accounting is not > getting saved in the cookie. > Due to which whenever we are click on any tab, it is creating a new session > for /accounting again for every event. > This leads to performance issues in application. > > Does it requires any special configuration for ofbiz in ofbiz application or > Apache web server for restricting the multiple session creation for every > single event. > We have used mod_jk configuration for apahce configuration.And version of > apache is v2.2.14 > > Regards > Prasanthi > > > |
Dear Raj,
Thanks for your post.Can you please tell me how you configured in ajp_proxy. Regards, Prasanthi |
Below are the directives you must have in your Apache configuration
file. Third line is the most important and the path would depend on your application context root. Last line is needed if your Apache host and OFbiz hosts are different. ProxyPassReverse / http://www.xxxxxx.com/shop/control/ ProxyPassReverse / https://www.xxxxx.com/vshop/control/ ProxyPassReverseCookiePath /shop / ProxyPassReverseCookieDomain www.xxxxx.com www.yyyyy.com Thanks, Raj On 08/06/10 13:06, prasanthi_ofbiz wrote: > Dear Raj, > Thanks for your post.Can you please tell me how you configured in ajp_proxy. > > Regards, > Prasanthi > |
In reply to this post by prasanthi_ofbiz
I just had the experience of bringing up a new server under apache 2.2.3
I added my comments https://cwiki.apache.org/confluence/display/OFBIZ/FAQ+-+Tips+-+Tricks+-+Cookbook+-+HowTo#FAQ-Tips-Tricks-Cookbook-HowTo-HTTPD prasanthi_ofbiz sent the following on 6/7/2010 11:48 PM: ========================= BJ Freeman http://bjfreeman.elance.com Strategic Power Office with Supplier Automation <http://www.businessesnetwork.com/automation/viewforum.php?f=52> Specialtymarket.com <http://www.specialtymarket.com/> Systems Integrator-- Glad to Assist Chat Y! messenger: bjfr33man <http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro> > > Dear BJ, > > > We have an set up where ofbiz is accessed through Apache web server. > Ofbiz is also integrated with CAS server for single sign on. > When we are accessing ofbiz, the session created for path /accounting is not > getting saved in the cookie. > Due to which whenever we are click on any tab, it is creating a new session > for /accounting again for every event. > This leads to performance issues in application. > > Does it requires any special configuration for ofbiz in ofbiz application or > Apache web server for restricting the multiple session creation for every > single event. > We have used mod_jk configuration for apahce configuration.And version of > apache is v2.2.14 > > Regards > Prasanthi > > |
In reply to this post by rajsaini
could you add that to the
https://cwiki.apache.org/confluence/display/OFBIZ/FAQ+-+Tips+-+Tricks+-+Cookbook+-+HowTo#FAQ-Tips-Tricks-Cookbook-HowTo-HTTPD ========================= BJ Freeman http://bjfreeman.elance.com Strategic Power Office with Supplier Automation <http://www.businessesnetwork.com/automation/viewforum.php?f=52> Specialtymarket.com <http://www.specialtymarket.com/> Systems Integrator-- Glad to Assist Chat Y! messenger: bjfr33man <http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro> Raj Saini sent the following on 6/8/2010 12:46 AM: > Below are the directives you must have in your Apache configuration > file. Third line is the most important and the path would depend on your > application context root. Last line is needed if your Apache host and > OFbiz hosts are different. > > ProxyPassReverse / http://www.xxxxxx.com/shop/control/ > ProxyPassReverse / https://www.xxxxx.com/vshop/control/ > ProxyPassReverseCookiePath /shop / > > ProxyPassReverseCookieDomain www.xxxxx.com www.yyyyy.com > > Thanks, > > Raj > > > On 08/06/10 13:06, prasanthi_ofbiz wrote: >> Dear Raj, >> Thanks for your post.Can you please tell me how you configured in >> ajp_proxy. >> >> Regards, >> Prasanthi > > |
Administrator
|
Done
Jacques From: "BJ Freeman" <[hidden email]> > could you add that to the > https://cwiki.apache.org/confluence/display/OFBIZ/FAQ+-+Tips+-+Tricks+-+Cookbook+-+HowTo#FAQ-Tips-Tricks-Cookbook-HowTo-HTTPD > > ========================= > BJ Freeman > http://bjfreeman.elance.com > Strategic Power Office with Supplier Automation <http://www.businessesnetwork.com/automation/viewforum.php?f=52> > Specialtymarket.com <http://www.specialtymarket.com/> > > Systems Integrator-- Glad to Assist > > Chat Y! messenger: bjfr33man > <http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro> > > > Raj Saini sent the following on 6/8/2010 12:46 AM: >> Below are the directives you must have in your Apache configuration >> file. Third line is the most important and the path would depend on your >> application context root. Last line is needed if your Apache host and >> OFbiz hosts are different. >> >> ProxyPassReverse / http://www.xxxxxx.com/shop/control/ >> ProxyPassReverse / https://www.xxxxx.com/vshop/control/ >> ProxyPassReverseCookiePath /shop / >> >> ProxyPassReverseCookieDomain www.xxxxx.com www.yyyyy.com >> >> Thanks, >> >> Raj >> >> >> On 08/06/10 13:06, prasanthi_ofbiz wrote: >>> Dear Raj, >>> Thanks for your post.Can you please tell me how you configured in >>> ajp_proxy. >>> >>> Regards, >>> Prasanthi >> >> > |
In reply to this post by rajsaini
Dear Raj,
I resolved the problem. Problem is not in apache configuration.Its in ofbiz application. For this I did changes as 1. Go to ofbiz/framework/catalina/src/org/ofbiz/catalina/container/CrossSubdomainSessionValve.java. 2. Search for invoke() function. Inside that function change code from request.getSession(true); to request.getSession(false); Also comment the following section: // replace any Tomcat-generated session cookies with our own /*Cookie[] cookies = response.getCookies(); Debug.log("response.getCookies() value.............."+response.getCookies()); if (cookies != null) { for (int i = 0; i < cookies.length; i++) { Cookie cookie = cookies[i]; if (Globals.SESSION_COOKIE_NAME.equals(cookie.getName())) { Debug.log("cookie.getName() ........."+cookie.getName()); Debug.log("cookie.getDomain() ........."+cookie.getDomain()); replaceCookie(request, response, cookie); } } }*/ 3. Build the application Now its working fine. Regards Prasanthi |
There's a property in ofbiz-containers.xml to turn that off:
<property name="enable-cross-subdomain-sessions" value="false"/> false has been the default for a while now though. Regards Scott HotWax Media http://www.hotwaxmedia.com On 16/06/2010, at 7:29 PM, prasanthi_ofbiz wrote: > > Dear Raj, > I resolved the problem. Problem is not in apache configuration.Its in ofbiz > application. > For this I did changes as > > 1. Go to > ofbiz/framework/catalina/src/org/ofbiz/catalina/container/CrossSubdomainSessionValve.java. > 2. Search for invoke() function. Inside that function change code from > request.getSession(true); to request.getSession(false); > Also comment the following section: > // replace any Tomcat-generated session cookies with our own > /*Cookie[] cookies = response.getCookies(); > Debug.log("response.getCookies() > value.............."+response.getCookies()); > if (cookies != null) { > for (int i = 0; i < cookies.length; i++) { > Cookie cookie = cookies[i]; > if (Globals.SESSION_COOKIE_NAME.equals(cookie.getName())) { > Debug.log("cookie.getName() > ........."+cookie.getName()); > Debug.log("cookie.getDomain() > ........."+cookie.getDomain()); > replaceCookie(request, response, cookie); > } > } > }*/ > > 3. Build the application > > > Now its working fine. > > Regards > Prasanthi > > -- > View this message in context: http://ofbiz.135035.n4.nabble.com/session-clearing-on-each-click-of-ofbiz-application-tp2237194p2257002.html > Sent from the OFBiz - User mailing list archive at Nabble.com. smime.p7s (3K) Download Attachment |
Administrator
|
Thanks Scott,
I clarified the situation in wiki FAQ Jacques Scott Gray wrote: > There's a property in ofbiz-containers.xml to turn that off: > <property name="enable-cross-subdomain-sessions" value="false"/> > > false has been the default for a while now though. > > Regards > Scott > > HotWax Media > http://www.hotwaxmedia.com > > On 16/06/2010, at 7:29 PM, prasanthi_ofbiz wrote: > >> >> Dear Raj, >> I resolved the problem. Problem is not in apache configuration.Its in ofbiz >> application. >> For this I did changes as >> >> 1. Go to >> ofbiz/framework/catalina/src/org/ofbiz/catalina/container/CrossSubdomainSessionValve.java. >> 2. Search for invoke() function. Inside that function change code from >> request.getSession(true); to request.getSession(false); >> Also comment the following section: >> // replace any Tomcat-generated session cookies with our own >> /*Cookie[] cookies = response.getCookies(); >> Debug.log("response.getCookies() >> value.............."+response.getCookies()); >> if (cookies != null) { >> for (int i = 0; i < cookies.length; i++) { >> Cookie cookie = cookies[i]; >> if (Globals.SESSION_COOKIE_NAME.equals(cookie.getName())) { >> Debug.log("cookie.getName() >> ........."+cookie.getName()); >> Debug.log("cookie.getDomain() >> ........."+cookie.getDomain()); >> replaceCookie(request, response, cookie); >> } >> } >> }*/ >> >> 3. Build the application >> >> >> Now its working fine. >> >> Regards >> Prasanthi >> >> -- >> View this message in context: >> http://ofbiz.135035.n4.nabble.com/session-clearing-on-each-click-of-ofbiz-application-tp2237194p2257002.html Sent from the OFBiz >> - User mailing list archive at Nabble.com. |
Free forum by Nabble | Edit this page |