Wednesday, 6 March 2013

More on the AJAX Proxy

Following on from my earlier posts, I've now discovered, thanks to @WAS_John, how to determine whether the AJAX Proxy config ( proxy-config.xml ) actually made it into my cluster member's configuration.

He explained that the update process: -

wsadmin> AdminTask.updateBlobConfig('[-clusterName BAMSR01.WebApp -propertyFileName "/opt/IBM/WebSphere/AppServer/profiles/BAMDMProfile/BusinessSpace/BAMSR01.WebApp/mm.runtime.prof/config/proxy-config.xml" -prefix "Mashups_"]')

actually updates resources.xml.

However, I wasn't 100% clear which specific file got updated.

This is how I checked: -

cd /opt/IBM/WebSphere/AppServer/profiles/BAMN1Profile/config/cells

ls -al `find . -name resources.xml`

-rw-r--r-- 1 wasadmin wasadmins  53144 Mar  4 14:18 ./BAMCELL/applications/commsvc.ear/deployments/commsvc/resources.xml
-rw-r--r-- 1 wasadmin wasadmins  51832 Mar  4 14:18 ./BAMCELL/clusters/BAMSR01.AppTarget/resources.xml 
-rw-r--r-- 1 wasadmin wasadmins 135131 Mar  4 14:18 ./BAMCELL/clusters/BAMSR01.Messaging/resources.xml 
-rw-r--r-- 1 wasadmin wasadmins 120465 Mar  4 14:18 ./BAMCELL/clusters/BAMSR01.Support/resources.xml 
-rw-r--r-- 1 wasadmin wasadmins 855651 Mar  6 11:16 ./BAMCELL/clusters/BAMSR01.WebApp/resources.xml 
-rw-r--r-- 1 wasadmin wasadmins  51382 Mar  4 14:04 ./BAMCELL/nodes/BAMNODE1/resources.xml 
-rw-r--r-- 1 wasadmin wasadmins  53783 Mar  4 14:18 ./BAMCELL/nodes/BAMNODE1/servers/BAMSR011.AppTarget/resources.xml 
-rw-r--r-- 1 wasadmin wasadmins  53783 Mar  4 14:18 ./BAMCELL/nodes/BAMNODE1/servers/BAMSR011.Messaging/resources.xml 
-rw-r--r-- 1 wasadmin wasadmins  53783 Mar  4 14:18 ./BAMCELL/nodes/BAMNODE1/servers/BAMSR011.Support/resources.xml 
-rw-r--r-- 1 wasadmin wasadmins  53783 Mar  4 14:18 ./BAMCELL/nodes/BAMNODE1/servers/BAMSR011.WebApp/resources.xml 
-rw-r--r-- 1 wasadmin wasadmins 200966 Mar  4 14:14 ./BAMCELL/resources.xml


Note that I have highlighted the file that changed most recently.

view ./BAMCELL/clusters/BAMSR01.WebApp/resources.xml

… 
 <resourceProperties xmi:id="J2EEResourceProperty_1362406193149" name="proxy-config.xml" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?>&lt;!-- ***************************************************************** -->&lt;!-- Licensed Materials - Property of IBM                              -->&lt;!-- 5724-L01, 5655-N53, 5724-I82, 5655-R15                            -->&lt;!-- (C) Copyright IBM Corporation 2006, 2012. All rights reserved.    -->&lt;!-- US Government Users Restricted Rights - Use, duplication or       -->&lt;!-- disclosure restricted by GSA ADP Schedule Contract with           -->&lt;!-- IBM Corp.                                                          -->&lt;!-- ***************************************************************** -->&lt;proxy:proxy-rules xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance" xmlns:proxy="http://www.ibm.com/xmlns/prod/sw/ajax/proxy-config/1.1">&#x9;&lt;proxy:mapping contextpath=&quot;/proxy/*&quot;/>  &#x9;&lt;proxy:policy url=&quot;endpoint://*&quot; acf=&quot;none&quot; basic-auth-support=&quot;true&quot;>&#x9;&#x9;&lt;proxy:actions>&#x9;&#x9;&#x9;&lt;proxy:method>GET&lt;/proxy:method>&#x9;&#x9;&#x9;&lt;proxy:method>POST&lt;/proxy:method>&#x9;&#x9;&#x9;&lt;proxy:method>PUT&lt;/proxy:method>&#x9;&#x9;&#x9;&lt;proxy:method>DELETE&lt;/proxy:method>&#x9;&#x9;&lt;/proxy:actions>&#x9;&#x9;&lt;proxy:headers>&#x9;&#x9;&#x9;&lt;proxy:header>Cache-Control&lt;/proxy:header>&#x9;&#x9;&#x9;&lt;proxy:header>Pragma&lt;/proxy:header>&#x9;&#x9;&#x9;&lt;proxy:header>User-Agent&lt;/proxy:header>&#x9;&#x9;&#x9;&lt;proxy:header>Accept*&lt;/proxy:header>&#x9;&#x9;&#x9;&lt;proxy:header>Content*&lt;/proxy:header>&#x9;&#x9;&#x9;&lt;proxy:header>X-Method-Override&lt;/proxy:header>&#x9;&#x9;&#x9;&lt;proxy:header>X-HTTP-Method-Override&lt;/proxy:header>&#x9;&#x9;&#x9;&lt;proxy:header>If-Match&lt;/proxy:header>&#x9;&#x9;&#x9;&lt;proxy:header>If-None-Match&lt;/proxy:header>&#x9;&#x9;&#x9;&lt;proxy:header>If-Modified-Since&lt;/proxy:header>&#x9;&#x9;&#x9;&lt;proxy:header>If-Unmodified-Since&lt;/proxy:header>&#x9;&#x9;&#x9;&lt;proxy:header>Slug&lt;/proxy:header>&#x9;&#x9;&#x9;&lt;proxy:header>SOAPAction&lt;/proxy:header>&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;/proxy:headers>&#x9;&#x9;&lt;proxy:cookies>&#x9;&#x9;&#x9;&lt;proxy:cookie>LtpaToken&lt;/proxy:cookie>&#x9;&#x9;&#x9;&lt;proxy:cookie>LtpaToken2&lt;/proxy:cookie> &#x9;&#x9;&#x9;&lt;proxy:cookie>JSESSIONID&lt;/proxy:cookie>&#x9;&#x9;&#x9;&#x9;&#x9;&lt;/proxy:cookies>&#x9;&lt;/proxy:policy>&#x9;&lt;proxy:policy url=&quot;http://www.ibm.com/*" acf=&quot;none&quot; basic-auth-support=&quot;true&quot;>&#x9;&#x9;&lt;proxy:actions>&#x9;&#x9;&#x9;&lt;proxy:method>GET&lt;/proxy:method>&#x9;&#x9;&lt;/proxy:actions>&#x9;&lt;/proxy:policy>&#x9;&lt;proxy:policy url=&quot;http://www-03.ibm.com/*" acf=&quot;none&quot; basic-auth-support=&quot;true&quot;>&#x9;&#x9;&lt;proxy:actions>&#x9;&#x9;&#x9;&lt;proxy:method>GET&lt;/proxy:method>&#x9;&#x9;&lt;/proxy:actions>&#x9;&lt;/proxy:policy>&#x9;&lt;proxy:policy url=&quot;http://www.redbooks.ibm.com/*" acf=&quot;none&quot; basic-auth-support=&quot;true&quot;>&#x9;&#x9;&lt;proxy:actions>&#x9;&#x9;&#x9;&lt;proxy:method>GET&lt;/proxy:method>&#x9;&#x9;&lt;/proxy:actions>&#x9;&lt;/proxy:policy>&#x9;&#x9;&lt;proxy:policy url=&quot;http://www.google.com/ig/*"  acf=&quot;none&quot; basic-auth-support=&quot;true&quot;>&#x9;&#x9;&lt;proxy:actions>&#x9;&#x9;&#x9;&lt;proxy:method>GET&lt;/proxy:method>&#x9;&#x9;&lt;/proxy:actions>&#x9;&lt;/proxy:policy>&#x9;    &lt;proxy:mapping contextpath=&quot;/cognosProxy/*&quot;>&#x9;   &lt;proxy:policy url=&quot;endpoint://*&quot; acf=&quot;none&quot; basic-auth-support=&quot;true&quot;>&#x9;&#x9;&#x9;&lt;proxy:actions>&#x9;&#x9;&#x9;&#x9;&lt;proxy:method>GET&lt;/proxy:method>&#x9;&#x9;&#x9;&#x9;&lt;proxy:method>POST&lt;/proxy:method>&#x9;&#x9;&#x9;&#x9;&lt;proxy:method>PUT&lt;/proxy:method>&#x9;&#x9;&#x9;&#x9;&lt;proxy:method>DELETE&lt;/proxy:method>&#x9;&#x9;&#x9;&lt;/proxy:actions>&#x9;&#x9;&#x9;&lt;proxy:headers>&#x9;&#x9;&#x9;&#x9;&lt;proxy:header>Cache-Control&lt;/proxy:header>&#x9;&#x9;&#x9;&#x9;&lt;proxy:header>Pragma&lt;/proxy:header>&#x9;&#x9;&#x9;&#x9;&lt;proxy:header>User-Agent&lt;/proxy:header>&#x9;&#x9;&#x9;&#x9;&lt;proxy:header>Accept*&lt;/proxy:header>&#x9;&#x9;&#x9;&#x9;&lt;proxy:header>Content*&lt;/proxy:header>&#x9;&#x9;&#x9;&#x9;&lt;proxy:header>X-Method-Override&lt;/proxy:header>&#x9;&#x9;&#x9;&#x9;&lt;proxy:header>X-HTTP-Method-Override&lt;/proxy:header>&#x9;&#x9;&#x9;&#x9;&lt;proxy:header>If-Match&lt;/proxy:header>&#x9;&#x9;&#x9;&#x9;&lt;proxy:header>If-None-Match&lt;/proxy:header>&#x9;&#x9;&#x9;&#x9;&lt;proxy:header>If-Modified-Since&lt;/proxy:header>&#x9;&#x9;&#x9;&#x9;&lt;proxy:header>If-Unmodified-Since&lt;/proxy:header>&#x9;&#x9;&#x9;&#x9;&lt;proxy:header>Slug&lt;/proxy:header>&#x9;&#x9;&#x9;&#x9;&lt;proxy:header>SOAPAction&lt;/proxy:header>&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;/proxy:headers>&#x9;&#x9;&#x9;&lt;proxy:cookies>&#x9;&#x9;&#x9;&#x9;&lt;proxy:cookie>LtpaToken&lt;/proxy:cookie>&#x9;&#x9;&#x9;&#x9;&lt;proxy:cookie>LtpaToken2&lt;/proxy:cookie> &#x9;&#x9;&#x9;&#x9;&lt;proxy:cookie>JSESSIONID&lt;/proxy:cookie>&#x9;&#x9;&#x9;&#x9;&lt;proxy:cookie>CRN&lt;/proxy:cookie>&#x9;&#x9;&#x9;&#x9;&lt;proxy:cookie>caf&lt;/proxy:cookie>&#x9;&#x9;&#x9;&#x9;&lt;proxy:cookie>cam_passport&lt;/proxy:cookie>&#x9;&#x9;&#x9;&#x9;&lt;proxy:cookie>cc_session&lt;/proxy:cookie>&#x9;&#x9;&#x9;&#x9;&lt;proxy:cookie>userCapabilities&lt;/proxy:cookie>&#x9;&#x9;&#x9;&#x9;&lt;proxy:cookie>usersessionid&lt;/proxy:cookie>&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;/proxy:cookies>&#x9;    &lt;/proxy:policy>        &lt;proxy:meta-data>            &lt;proxy:name>use-context-path-for-cookies&lt;/proxy:name>            &lt;proxy:value>true&lt;/proxy:value>        &lt;/proxy:meta-data>    &lt;/proxy:mapping>&#x9;&#x9;&lt;proxy:meta-data>&#x9;&#x9;&lt;proxy:name>socket-timeout&lt;/proxy:name>&#x9;&#x9;&lt;proxy:value>30000&lt;/proxy:value>&#x9;&lt;/proxy:meta-data>&#x9;&lt;proxy:meta-data>&#x9;&#x9;&lt;proxy:name>connection-timeout&lt;/proxy:name>&#x9;&#x9;&lt;proxy:value>30000&lt;/proxy:value>&#x9;&lt;/proxy:meta-data>&#x9;&#x9;&lt;proxy:meta-data>&#x9;&#x9;&lt;proxy:name>retries&lt;/proxy:name>&#x9;&#x9;&lt;proxy:value>2&lt;/proxy:value>&#x9;&lt;/proxy:meta-data>&#x9;&lt;proxy:meta-data>&#x9;&#x9;&lt;proxy:name>max-connections-per-host&lt;/proxy:name>&#x9;&#x9;&lt;proxy:value>10&lt;/proxy:value>&#x9;&lt;/proxy:meta-data>&#x9;&lt;proxy:meta-data>&#x9;&#x9;&lt;proxy:name>max-total-connections&lt;/proxy:name>&#x9;&#x9;&lt;proxy:value>200&lt;/proxy:value>&#x9;&lt;/proxy:meta-data>&#x9;&lt;proxy:meta-data>&#x9;&#x9;&lt;proxy:name>unsigned_ssl_certificate_support&lt;/proxy:name>&#x9;&#x9;&lt;proxy:value>false&lt;/proxy:value>&#x9;&lt;/proxy:meta-data>&#x9;&lt;proxy:meta-data>&#x9;&#x9;&lt;proxy:name>forward-http-errors&lt;/proxy:name>&#x9;&#x9;&lt;proxy:value>true&lt;/proxy:value>&#x9;&lt;/proxy:meta-data>&lt;/proxy:proxy-rules>" description="Automatically generated! Do not change the value here! Please use the according file in the config directory and rerun the update task!" required="false"/>


Note that I've highlighted the property that I had previously changed - unsigned_ssl_certificate_support=false.

Nice one, John


No comments:

Note to self - use kubectl to query images in a pod or deployment

In both cases, we use JSON ... For a deployment, we can do this: - kubectl get deployment foobar --namespace snafu --output jsonpath="{...