Forums

Home » Liferay Portal » English » Liferay Legacy »

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Perry Minchew
Multiple instances always redirecting to root context
January 2, 2007 12:04 PM
Answer

Perry Minchew

Rank: New Member

Posts: 8

Join Date: January 2, 2007

Recent Posts

Hi all,

I am responsible for upgrading several instances of liferay running on a single tomcat servcr to 4.2.0 from 4.0.0RC1. After 2 full days of working, I have all 5 of our instances set up. Also part of the upgrade was implementing CAS SSO. Alright, here's the problem.

I have a root.xml context that runs my default instance of liferay. I can go to root, it loads, I see all my portlets no problem, and I can manipulate them the way I would expect.

Alright, now comes my problem. Lets say we have instance 2 of liferay, which is basically a copy and paste of root, changing the following:

localhost/ROOT.xml
< Context path="" docBase="correct_path_to_root" debug="0" reloadable="true" crossContext="true" >
< Other options that work, (LiferayPool, MailSession, Realm) >
< /Context >

web.xml :
< context-param > < param-name > root_path < /pa.. > < param-value > / < /param.. > < /con... >
< context-param > < param-name > company_id < /pa.. > < param-value > base_comp < /param.. > < /con... >


portal-ext.properties:
portal.ctx=/


------------------------
localhost/jeod.xml:
< Context path="" docBase="correct_path_to_jeod" debug="0" reloadable="true" crossContext="true" >


web.xml :
< context-param > < param-name > root_path < /pa.. > < param-value > /jeod < /param.. > < /con... >
< context-param > < param-name > company_id < /pa.. > < param-value > jeod_comp < /param.. > < /con... >

portal-ext.properties:
portal.ctx=/jeod

Those are my main differences. Ok. So if I go to https://webserver/jeod, i go immediately to my sso page, and log in correctly. I then get redirected back to https://webserver/jeod and go to my main page. ALL portlets now show red text and "You do not have the roles required to access this portlet"

If I now try to log into ROOT, I am able to log into https://webserver/ go into CAS, get redirected, and all portlets show up as intended.

Now I go back to https://webserver/jeod (I am already logged in) and all the portlets show up now. Lets say I now click on enterprise admin->Users... I would expect to be taken to https://webserver/jeod/c/portal.... and go into my jeod enterprise admin portlet. HOWEVER, what actually is currently happening is I'm being taken to https://webserver/c/portal...

For some reason, all my portlets on the other instances other than root are trying to access the ROOT for permissions and everything. I can also tell that the portlets that are showing up under /jeod are acutally portlet instances of root (I can see from an expanded enterprise admin some users that I know are on root, but not jeod)

I could greatly use some help here. Has anyone had the same problem? What was your solution?

Thanks in advance for response.
Perry Minchew
RE: Multiple instances always redirecting to root context
January 3, 2007 10:55 AM
Answer

Perry Minchew

Rank: New Member

Posts: 8

Join Date: January 2, 2007

Recent Posts

Ok, an update. I decided to modify my scenario and see what happened. I change my
{Tomcat_home}/conf/Catalina/localhost/ROOT.xml
to
{Tomcat_home}/conf/Catalina/localhost/other_app.xml

inside the context file:
path="other_app"


I then changed my index to {redirect to}="/other_app/c"

Web.xml:
< context-param >
< param-name >root_path< /param-name >
< param-value >/other_app< /param-value >
< /context-param >

portal-ext.properties:
portal.ctx=/other_app

Alright, now I try to log in. My custom terms of use page shows up, with the text from the html file as I would expect, but no images show up. I try to sign in... get redirected to cas, then back to other_app with a successful login, now I am at my home page.

ALL PORTLET INSTANCES ON THE PAGE are doing the loading image constantly. My IFRAMEs at the top point to the correct address (https://server/other_app/c/...) and they seem to work (we have 1 going to jira, 1 to subversion, and those are loading as intended). Now this same phenomenon is occuring across ALL portal instances now. So basically ALL portlets were trying to load from the root context. Does anyone have any clue as to what might be causing all portlets to not pick up the context that it's in while all other parts of the portal (login, IFRAMES, Jira, Subversion, american flag at bottom, communities link) all seem to point to the correct app.

Thanks in advanced
Perry Minchew
RE: Multiple instances always redirecting to root context
January 3, 2007 11:46 AM
Answer

Perry Minchew

Rank: New Member

Posts: 8

Join Date: January 2, 2007

Recent Posts

Example excerpt from viewing the source when I render the page for the portal:

div id="p_load_28_" style="text-align: left;"
img src="/ncpo-collab/html/themes/brochure/images/progress_bar/loading_animation.gif" /
/div


function _28_returnPortlet(xmlHttpReq) {
var portletDiv = document.getElementById("p_load_28_");

addPortletHTML(xmlHttpReq.responseText, portletDiv.parentNode, portletDiv);

portletDiv.parentNode.removeChild(portletDiv);
};

function _28_loadPortlet() {
var path = "/c/portal/render_portlet";
var queryString = "p_l_id=PRI.1065.1&p_p_id=28&p_p_action=0&p_p_state=normal&p_p_mode=view&p_p_col_id=column-1&p_p_col_pos=1&p_p_col_count=7";



loadPage(path, queryString, _28_returnPortlet);
}

_28_loadPortlet();


Of note, for the loading animation, the source path starts with /ncpo-collab/html..., but farther down, when it is actually trying to load the portlet itself, the path is listed as "/c/portal.."

Notice the lack of /ncpo-collab

Thanks again.
Perry Minchew
RE: Multiple instances always redirecting to root context
January 4, 2007 8:55 AM
Answer

Perry Minchew

Rank: New Member

Posts: 8

Join Date: January 2, 2007

Recent Posts

Alright, another update. This issue is still not resolved, but I feel like I'm defining the problem a little better.

Ok, so I sign into other_app. The entire page says "You do not have roles..." and so the headers of each portlet does NOT allow me to minimize, maximize, close. So I log into root context and all portlets come up with headers. I log back into other_app, and all portlets are available (again pointing to root context). I close the portlets that are available, then use "Add Content" to add in portlets. When I use that menu to add the portlets in to my page, they come through correctly referring to other_app (eg, I can hover my cursor over a link, and I see server/other_app/c). Now I log out, and log back in, and I get the "{does not have roles}" error again.

Anyone? Any ideas at all?
Perry Minchew
RE: Multiple instances always redirecting to root context
January 5, 2007 1:13 PM
Answer

Perry Minchew

Rank: New Member

Posts: 8

Join Date: January 2, 2007

Recent Posts

Since the problem is happening between < server > and /c (mainServlet), could this problem be associated with the mainServlet? I'm trying to look through the code, but I'm not finding any smoking guns. What's confusing me is that in portal-ext.properties, I see layout.url=${ liferay.mainPath }/portal/layout?p_l_i${ liferay:plid }

This leads me to believe that somehow the liferay.mainPath is not getting set correctly on the portlets. Liferay.mainPath should be getting https:// < server > /other_app/c... instead, it's getting https:// < server > /c...

Thoughts?
Perry Minchew
RE: Multiple instances always redirecting to root context
January 8, 2007 7:34 AM
Answer

Perry Minchew

Rank: New Member

Posts: 8

Join Date: January 2, 2007

Recent Posts

Looked in portal.properties, and found the property web.server.host with the description "Set the hostname that will be used when the portlet generates URLs. When I try setting this to "{server}/other_app", I start getting "{server}/other_app/other_app/c" when I try to access my app.

Please, anyone have any ideas?
Perry Minchew
RE: Multiple instances always redirecting to root context
January 8, 2007 2:34 PM
Answer

Perry Minchew

Rank: New Member

Posts: 8

Join Date: January 2, 2007

Recent Posts

At the very least, can anyone tell me what servlet or what method loads portlets... looking back into my httpd access log, I see the following:
[08/Jan/2007:12:24:48 +0100] [IP & SSL Encryption] "GET /jeod-collab/c/portal/javascript_cached?themeId=brochure&languageId=en_US&colorSchemeId=01 HTTP/1.1" 2033
[08/Jan/2007:12:24:48 +0100] [IP & SSL Encryption] "GET /jeod-collab/html/themes/brochure/images/progress_bar/loading_animation.gif HTTP/1.1" 583
[08/Jan/2007:12:24:48 +0100] [IP & SSL Encryption] "GET /jeod-collab/html/themes/brochure/images/custom/liferay-logo.png HTTP/1.1" 4984
[08/Jan/2007:12:24:48 +0100] [IP & SSL Encryption] "GET /jeod-collab/html/themes/brochure/images/common/search.gif HTTP/1.1" 330
[08/Jan/2007:12:24:48 +0100] [IP & SSL Encryption] "GET /jeod-collab/html/themes/brochure/images/custom/banner-middle.png HTTP/1.1" 2853
[08/Jan/2007:12:24:48 +0100] [IP & SSL Encryption] "GET /jeod-collab/html/themes/brochure/images/custom/nav-spacer.png HTTP/1.1" 133
[08/Jan/2007:12:24:48 +0100] [IP & SSL Encryption] "GET /jeod-collab/html/themes/brochure/images/custom/banner-right.png HTTP/1.1" 2971
[08/Jan/2007:12:24:48 +0100] [IP & SSL Encryption] "GET /jeod-collab/html/themes/brochure/images/custom/banner-left.png HTTP/1.1" 2973
[08/Jan/2007:12:24:48 +0100] [IP & SSL Encryption] "GET /html/portlet/termsofuse/styles/terms.css HTTP/1.1" -
[08/Jan/2007:12:24:48 +0100] [IP & SSL Encryption] "GET /jeod-collab/html/themes/brochure/images/custom/nav-left.png HTTP/1.1" 2908
[08/Jan/2007:12:24:48 +0100] [IP & SSL Encryption] "GET /jeod-collab/html/themes/brochure/images/custom/nav-right.png HTTP/1.1" 2906
[08/Jan/2007:12:24:48 +0100] [IP & SSL Encryption] "GET /jeod-collab/html/themes/brochure/images/custom/nav-bg.png HTTP/1.1" 3097
[08/Jan/2007:12:24:48 +0100] [IP & SSL Encryption] "GET /jeod-collab/html/themes/brochure/images/custom/nav-selected.png HTTP/1.1" 3139
[08/Jan/2007:12:24:48 +0100] [IP & SSL Encryption] "GET /html/portlet/termsofuse/scripts/Browser.js HTTP/1.1" -
[08/Jan/2007:12:24:48 +0100] [IP & SSL Encryption] "GET /html/portlet/termsofuse/scripts/utils.js HTTP/1.1" -
[08/Jan/2007:12:24:48 +0100] [IP & SSL Encryption] "GET /html/portlet/termsofuse/images/seals/seal_dod.png HTTP/1.1" -
[08/Jan/2007:12:24:48 +0100] [IP & SSL Encryption] "GET /html/portlet/termsofuse/images/seals/seal_jcs_bw.png HTTP/1.1" -
[08/Jan/2007:12:24:48 +0100] [IP & SSL Encryption] "GET /html/portlet/termsofuse/images/seals/seal_whs_bw.png HTTP/1.1" -
[08/Jan/2007:12:24:48 +0100] [IP & SSL Encryption] "GET /html/portlet/termsofuse/images/seals/seal_usmc_bw.png HTTP/1.1" -
[08/Jan/2007:12:24:48 +0100] [IP & SSL Encryption] "GET /html/portlet/termsofuse/images/seals/seal_usn_bw.png HTTP/1.1" -
[08/Jan/2007:12:24:48 +0100] [IP & SSL Encryption] "GET /html/portlet/termsofuse/images/seals/seal_usarmy_bw.png HTTP/1.1" -
[08/Jan/2007:12:24:48 +0100] [IP & SSL Encryption] "GET /html/portlet/termsofuse/images/seals/seal_usnr_bw.png HTTP/1.1" -
[08/Jan/2007:12:24:48 +0100] [IP & SSL Encryption] "GET /html/portlet/termsofuse/images/seals/seal_usaf_bw.png HTTP/1.1" -
[08/Jan/2007:12:24:48 +0100] [IP & SSL Encryption] "GET /html/portlet/termsofuse/images/seals/seal_uscg_bw.png HTTP/1.1" -
[08/Jan/2007:12:24:48 +0100] [IP & SSL Encryption] "GET /html/portlet/termsofuse/images/seals/seal_armyng_bw.png HTTP/1.1" -
[08/Jan/2007:12:24:48 +0100] [IP & SSL Encryption] "GET /html/portlet/termsofuse/images/seals/seal_airng_bw.png HTTP/1.1" -
[08/Jan/2007:12:24:48 +0100] [IP & SSL Encryption] "GET /html/portlet/termsofuse/images/seals/seal_usmcr_bw.png HTTP/1.1" -
[08/Jan/2007:12:24:48 +0100] [IP & SSL Encryption] "GET /html/portlet/termsofuse/images/seals/seal_usarmyr_bw.png HTTP/1.1" -
[08/Jan/2007:12:24:48 +0100] [IP & SSL Encryption] "GET /html/portlet/termsofuse/images/seals/seal_usafr_bw.png HTTP/1.1" -
[08/Jan/2007:12:24:48 +0100] [IP & SSL Encryption] "GET /html/portlet/termsofuse/images/seals/seal_uscgr_bw.png HTTP/1.1" -
[08/Jan/2007:12:24:48 +0100] [IP & SSL Encryption] "GET /jeod-collab/html/themes/brochure/images/language/en_US.gif HTTP/1.1" 1012
[08/Jan/2007:12:24:48 +0100] [IP & SSL Encryption] "GET /jeod-collab/html/themes/brochure/images/custom/nav-hover.png HTTP/1.1" 3127
[08/Jan/2007:12:24:48 +0100] [IP & SSL Encryption] "GET /jeod-collab/html/themes/brochure/images/custom/bottom-middle.png HTTP/1.1" 2873
[08/Jan/2007:12:24:48 +0100] [IP & SSL Encryption] "GET /jeod-collab/html/themes/brochure/images/custom/bottom-left.png HTTP/1.1" 3202
[08/Jan/2007:12:24:49 +0100] [IP & SSL Encryption] "GET /jeod-collab/html/themes/brochure/images/custom/bottom-right.png HTTP/1.1" 3215
[08/Jan/2007:12:25:09 +0100] [IP & SSL Encryption] "GET /jeod-collab/c/portal/login HTTP/1.1" -




As you can see, any path that includes /html/portlet/ does NOT have /jeod-collab in the path. All other paths seem to go correctly. So pngs, html files, etc that are NOT in /html/portlet are correctly routed. Those in /html/portlet do not. So my very specific question that I HOPE can get answered is.... What method/servlet/funtion/anything calls the portlet data that is running seperately from the code to load jsp/html/non-portlet data.
Perry Minchew
RE: Multiple instances always redirecting to root context
January 11, 2007 8:50 AM
Answer

Perry Minchew

Rank: New Member

Posts: 8

Join Date: January 2, 2007

Recent Posts

I'd like to thank everyone for their ideas and support in this issue. The solution can be found here:

http://support.liferay.com/browse/LEP-1787

Looking forward to working with all again.