Walter Lee

wevb 7.0 u4 is out now

Monday Dec 15, 2008

Hi, 


I just got this from PM, Joe,


"I am delighted to announce that Web Server 7.0 Update 4 has been
released. It can be publicly downloaded at:


http://tinyurl.com/ws70u4

and will be showing up on the various download pages later today.


The Release Notes are here:
http://docs.sun.com/app/docs/doc/820-6373/gdutz?a=view

In addition to bug fixes and stability improvements (>40,
http://docs.sun.com/app/docs/doc/820-6373/ghyks?a=view ), this release
introduces better compatibility with CGI and FastCGI applications by
providing REQUEST_URI and SCRIPT_FILENAME variables, support for
default-sun-web.xml, and certification of OpenSolaris 2008.11 as a
supported platform.


All users of Web Server 7.0 through Web Server 7.0 Update 3 are
encourage to upgrade.


Thank you to the entire product team for another great release!


"


So, please download and try it.


I can see many resolved issues in this latest u4 release, at


http://docs.sun.com/app/docs/doc/820-6373/ghyjt?a=view

[0] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg

Promise's Chinese Painting 1

Sunday Dec 14, 2008

Promise Chinese Painting #1


[0] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg

Promise's P3. Written Book1

Sunday Dec 14, 2008

This below is from a book written by my daughter, Promise,  when she was in P.3.


Book Cover:



Table of content:



Then the pages inside,













[0] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg

Simple script to download or get perfdump output into a file for later analysis for web 6.1

Friday Dec 12, 2008

Today, I found a need to run perfdump periodically in web server 6.1 SPx and download it into a single file with timestamps for later analysis. I can then check further on different number of performance numbers of this web server to see if any area to tune for better.


So, I followed the steps at 6.1 docs to enable perfdump,


http://docs.sun.com/app/docs/doc/820-5719/abyaq?l=en&a=view&q=perfdump


then I came across this great blog,


 http://blogs.sun.com/elving/entry/perfdump_in_7_0


which tells how to do it in web 7 easily.


Inside, I also saw,


" (echo "GET /.perf";sleep 1 ) | telnet www.mysite.com 80  "


by
"Posted by
ttalex

on October 20, 2006 at 02:33 AM PDT" 



So,  I wrote up a simple script to try,


 APPLE:/export/home0/case/7041xxxx-yyy-p1> cat get-perf-2s.ksh
#/usr/bin/ksh
while [ 1 ]
do
# 1st to print date timestamp
echo "=====================next perf dump======================="
date
# 2nd to get .perf
(echo "GET /.perf";sleep 1 ) | telnet apple.asia.sun.com 60103
# 3rd sleep 2s
sleep 2
done


Then, I chmod a+x and then


./get-perf-2s.ksh >> perf.txt


and control-c to stop it after a while,


then  > cat perf.txt
=====================next perf dump=======================
Fri Dec 12 15:06:33 CST 2008
Trying 129.158.175.16...
Connected to apple.
Escape character is '^]'.
webservd pid: 19065

Sun ONE Web Server 6.1SP10 B09/04/2008 10:03 (SunOS DOMESTIC)

Server started Fri Dec 12 14:39:20 2008
Process 19065 started Fri Dec 12 14:39:20 2008

ConnectionQueue:
-----------------------------------------
Current/Peak/Limit Queue Length            0/1/4096
Total Connections Queued                   95
Average Queue Length (1, 5, 15 minutes)    0.00, 0.00, 0.00
Average Queueing Delay                     0.13 milliseconds

ListenSocket ls1:
------------------------
Address                   http://0.0.0.0:60103
Acceptor Threads          1
Default Virtual Server    https-sess

ListenSocket ls2:
------------------------
Address                   http://129.158.175.16:60104
Acceptor Threads          1
Default Virtual Server    land-vs1

KeepAliveInfo:
--------------------
KeepAliveCount        0/256
KeepAliveHits         7
KeepAliveFlushes      0
KeepAliveRefusals     0
KeepAliveTimeouts     3
KeepAliveTimeout      30 seconds

SessionCreationInfo:
------------------------
Active Sessions           1
Keep-Alive Sessions       0
Total Sessions Created    48/128

CacheInfo:
------------------
enabled             yes
CacheEntries        8/1024
Hit Ratio           108/214 ( 50.47%)
Maximum Age         30

Native pools:
----------------------------
NativePool:
Idle/Peak/Limit               1/1/128
Work Queue Length/Peak/Limit  0/0/0

Server DNS cache disabled

Async DNS disabled

Performance Counters:
------------------------------------------------
                           Average         Total      Percent

Total number of requests:                    101
Request processing time:    0.0019        0.1919

default-bucket (Default bucket)
Number of Requests:                          101    (100.00%)
Number of Invocations:                      1307    (100.00%)
Latency:                    0.0003        0.0272    ( 14.18%)
Function Processing Time:   0.0016        0.1647    ( 85.82%)
Total Response Time:        0.0019        0.1919    (100.00%)

Sessions:
----------------------------
Process  Status     Function

19065    response   service-dump
=====================next perf dump=======================
Fri Dec 12 15:06:36 CST 2008
Trying 129.158.175.16...
Connected to apple.
Escape character is '^]'.
webservd pid: 19065

Sun ONE Web Server 6.1SP10 B09/04/2008 10:03 (SunOS DOMESTIC)

Server started Fri Dec 12 14:39:20 2008
Process 19065 started Fri Dec 12 14:39:20 2008

ConnectionQueue:
-----------------------------------------
Current/Peak/Limit Queue Length            0/1/4096
Total Connections Queued                   96
Average Queue Length (1, 5, 15 minutes)    0.00, 0.00, 0.00
Average Queueing Delay                     0.13 milliseconds

................. repeated itself................


======================================


 So, hope this simple script can help capture the perfdump in web 6.1 .


However, it is still best to upgrade to web 7 to use the CLI there for perfdump (it will work in web 7 even when the webservd process hung, but not in web 6.1). Another good reason to upgraded to web 7.



[0] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg

Using the new wshang.ksh version 3.0

Wednesday Dec 10, 2008

I just downloaded the new  wshang.ksh version 3.0 and tried it. See my prior blog at


http://blogs.sun-DOT-com/walter/entry/new_wshang_ksh_version_3 


It is very easy to use.


After I downloaded and gunzipped it, I just ran it,


 APPLE:/export/home/bits/iws/misc/SUN-GDD-webserver-wshang-solaris-v3> ./wshang.ksh
./wshang.ksh[65]: date+%y%m%d%HH%MM%SS:  not found

 This script collects 3 snapshots of the following information
 at a 15 seconds interval against a web server process:
        pstack
        pfiles
        prstat -L -a (will try 'top' on pre-Solaris 8 systems)
        pflags
        pmap -x
        pldd
        netstat -an
 And collections 30 seconds of:
        truss -feald -vall -wall -rall

Data will be collected to the location /tmp/wshang by default.
Data location should have enough disk space for large core files.
Would you like to specify a different directory for data?
(y/n)



Specify a directory:
/export/home/bits/iws/misc/SUN-GDD-webserver-wshang-solaris-v3/data


The following is a list of web server processes:

Solaris 8 or greater
Web Server 7.0/6.1 processes
    364   webservd -r /export/home/iws6.1sp2 -d /export/home/iws6.1sp2/https-ap
    11478 webservd -r /export/home0/case/11330103-admin-gu/61sp10 -d /export/ho
    11640 webservd -d /export/home0/case/11330103-admin-gu/70u3/https-APPLE.low
    12091 webservd -d /export/home/iws7.0u3/admin-server/config -r /export/home
    12742 webservd -r /export/home0/case/11315437-web-session/FVB/run -d /expor
    12814 webservd -r /export/home0/case/11315437-web-session/FVB/run -d /expor
    12860 webservd -r /export/home/iws6.1sp10 -d /export/home/iws6.1sp10/https-
    12919 webservd -r /export/home/iws6.1sp10 -d /export/home/iws6.1sp10/https-
    13879 webservd -d /export/home/iws7.0u3/https-java-mon/config -r /export/ho
    13573 webservd -d /export/home/iws7.0u3/https-apple.asia.sun.com/config -r
    15402 webservd -r /export/home/iws6.1sp10 -d /export/home/iws6.1sp10/https-
    15497 webservd -d /export/home0/case/11330103-admin-gu/70u3-2/admin-server/
Web Server 6.0 processes
Proxy Server 4.0 processes
    14065 proxyd -r /export/home/ips4.0sp8 -d /export/home/ips4.0sp8/proxy-acl/
    15527 proxyd -r /export/home/ips4.0sp7 -d /export/home/ips4.0sp7/proxy-adms
    15867 proxyd -r /export/home/ips4.0sp7 -d /export/home/ips4.0sp7/proxy-rpp/


Enter the PID of the web server process to collect data on
(Note that the correct PID for child webservd/ns-httpd process will not be listed correctly here if you have MaxProcs > 1 in your magnus.conf):
12919


(this is already the needed worker process pid from my ptree outputs,


APPLE:/export/home0> ptree 12919
12893 ./webservd-wdog -r /export/home/iws6.1sp10 -d /export/home/iws6.1sp10/htt
  12918 webservd -r /export/home/iws6.1sp10 -d /export/home/iws6.1sp10/https-se
    12919 webservd -r /export/home/iws6.1sp10 -d /export/home/iws6.1sp10/https-


)



   PID TTY      TIME CMD
 12919 ?        1:41 webservd


Gathering data now...

Loop 1 for 15 seconds...

collecting pflags...
collecting pmap -x...
collecting pldd...
collecting prstat -L -a...
collecting pstack...
collecting pfiles...
collecting netstat...

Loop 2 for 15 seconds...

collecting pflags...
collecting pmap -x...
collecting pldd...
collecting prstat -L -a...
collecting pstack...
collecting pfiles...
collecting netstat...

Loop 3 for 15 seconds...

collecting pflags...
collecting pmap -x...
collecting pldd...
collecting prstat -L -a...
collecting pstack...
collecting pfiles...
collecting netstat...

collecting 30 seconds of truss...
done

Collecting gcore...
gcore: /export/home/bits/iws/misc/SUN-GDD-webserver-wshang-solaris-v3/data/gcore.out.12919 dumped
/export/home/iws6.1sp10/bin/https/bin/webservd
* ----------------------------------------------------------------------------------
* Sun Microsystems RSD pkgapp 3.0 Solaris                               [12/10/2008]
* ----------------------------------------------------------------------------------
* OS release                            [5.8]
* Platform                              [SUNW,Sun-Blade-1000]
* Checking [-c] is a core or pid        [using pid 12919]
* Process Root                          [/export/home/iws6.1sp10/https-sess/config]
* Databin parameter [-s] checks         [reset to /export/home/bits/iws/misc/SUN-GDD-webserver-wshang-solaris-v3]
* Creating Databin directories          [/export/home/bits/iws/misc/SUN-GDD-webserver-wshang-solaris-v3/data/pkgapp_data]
* Databin used/created is               [/export/home/bits/iws/misc/SUN-GDD-webserver-wshang-solaris-v3/data/pkgapp_data/pkgapp-121008-01]
* Creating temp area                    [/tmp/pkgapp.16081/]
* Pid used, no corefile to check
* Process binary                        [webservd]
* Checking usage history                [not recently run]
* webservd binary bit version           [32]
* Checking path [-p] to binary name     [failed, path includes binary name]
* Resetting path [-p] parameter         [/export/home/iws6.1sp10/bin/https/bin]
* Checking path [-p] is a directory     [success]
* Locating webservd                     [success]
* Checking located webservd is 32 bit   [success]
* Binary located                        [/export/home/iws6.1sp10/bin/https/bin/webservd]
* Adding binary to pkgapp.pldd          [success]
* Grabbing pldd                         [success]
* Grabbing pstack                       [success]
* Grabbing pmap                         [success]
* Grabbing pcred                        [success]
* Grabbing pflags                       [success]
* Grabbing pargs                        ./pkgapp[103]: /usr/bin/pargs:  not found
[failed]
./pkgapp[110]: /usr/bin/pargs:  not found
* Not Including the core/gcore
* Javatools [-j] not set                [skipped]
* Grabbing /var/adm/messages            [success]
* Grabbing uname -a                     [success]
* Grabbing date/time                    [success]
* Grabbing showrev -p                   [success]
* Grabbing pkginfo -l                   [success]
* Grabbing /etc/release                 [success]
* Grabbing coreadm                      [success]
* Grabbing ulimit                       [success]
* Grabbing libs                         [success]
* Making lib paths app/                 [success]
* Making lib paths libs/                [success]
* Linking libraries                     [success]
* Libraries linked                      [101 ttl]
*
* Using hostid for naming .tar.gz       [83450f78]
* Writing file                          [pkgapp-83450f78-APPLE-081210-145852.tar.gz]
*
* Done gathering files
* Writing dbxrc & opencore.sh files     [success]
* Writing manifest-081210-145852.log    [success]
* Writing pkgapp-args-081210-145852     [success]
* Creating final tarfile                [success]
* Compressing tarfile                   [success]
* End of runtime logging
* Saving history info                   [/var/tmp/pkgapp-history/history-081210-145852.log]
* Saving runtime log                    [/var/tmp/pkgapp-history/runtime-081210-145852.log]
* Removing [-r] temp area/files         [left alone]
*
* Operations Complete
----------------------------------------------------------------------------------
Upload the following file(s) to your supportfiles.sun.com Cores Directory at Sun

1) File(s) located in directory /export/home/bits/iws/misc/SUN-GDD-webserver-wshang-solaris-v3/data/pkgapp_data/pkgapp-121008-01

                [ pkgapp-83450f78-APPLE-081210-145852.tar.gz ]



                                Thank you.
                                Sun Software Technology Service Center (STSC)


NOTES:
1) You can check for updates to this script here:
        BigAdmin - http://www.sun.com/bigadmin/scripts/indexSjs.html
2) Release Notes and Guides located here:
        Docs - http://docs.sun.com/app/docs/doc/820-0437
3) GDD information located here:
        Docs - http://www.sun.com/service/gdd/index.xml

4) Please send all Bugs and RFE's to the following address:
        Subject "pkgapp bug/rfe" - gdd-issue-tracker-AT-sun.com

5) Please send all other questions etc to:
        Subject "pkgapp feedback" - gdd-feedback-AT-sun.com


Creating a tar file of the results...
a gcore.out.12919 70628K
a gcore_pldd.out 3K
a gcore_pmap.out 14K
a gcore_pstack.out 71K
a netstat.out.1 30K
a netstat.out.2 30K
a netstat.out.3 30K
a pfiles.out.1 4K
a pfiles.out.2 4K
a pfiles.out.3 4K
a pflags.out.1 8K
a pflags.out.2 8K
a pflags.out.3 8K
a pkgapp_data/ 0K
a pkgapp_data/pkgapp-121008-01/ 0K
a pkgapp_data/pkgapp-121008-01/pkgapp-83450f78-APPLE-081210-145852.tar.gz 14849K
a pldd.out.1 3K
a pldd.out.2 3K
a pldd.out.3 3K
a pmap.out.1 20K
a pmap.out.2 20K
a pmap.out.3 20K
a prstat.out.1 2K
a prstat.out.2 2K
a prstat.out.3 2K
a pstack.out.1 71K
a pstack.out.2 71K
a pstack.out.3 71K
a release.out 1K
a showrev.out 70K
a truss.out 37K
a ulimit 1K
a uname.out 1K

The tar file has been created....

Please send the file /export/home/bits/iws/misc/SUN-GDD-webserver-wshang-solaris-v3/data/11111111-gdd-wshang-.tar.gz to
Sun Microsystems at https://supportfiles.sun.com/upload
Choose cores as the destination.



Then, I checked my output dir,


 APPLE:/export/home0> ls -l /export/home/bits/iws/misc/SUN-GDD-webserver-wshang-solaris-v3/data/
total 193098
-rw-rw-rw-   1 root     other    25833674 Dec 10 15:00 11111111-gdd-wshang-.tar.gz
-rw-rw-rw-   1 root     other    72322796 Dec 10 14:58 gcore.out.12919
-rw-rw-rw-   1 root     other       2684 Dec 10 14:58 gcore_pldd.out
-rw-rw-rw-   1 root     other      14161 Dec 10 14:58 gcore_pmap.out
-rw-rw-rw-   1 root     other      72266 Dec 10 14:58 gcore_pstack.out
-rw-rw-rw-   1 root     other      30577 Dec 10 14:57 netstat.out.1
-rw-rw-rw-   1 root     other      30577 Dec 10 14:58 netstat.out.2
-rw-rw-rw-   1 root     other      30421 Dec 10 14:58 netstat.out.3
-rw-rw-rw-   1 root     other       3572 Dec 10 14:57 pfiles.out.1
-rw-rw-rw-   1 root     other       3572 Dec 10 14:58 pfiles.out.2
-rw-rw-rw-   1 root     other       3572 Dec 10 14:58 pfiles.out.3
-rw-rw-rw-   1 root     other       8143 Dec 10 14:57 pflags.out.1
-rw-rw-rw-   1 root     other       8143 Dec 10 14:58 pflags.out.2
-rw-rw-rw-   1 root     other       8143 Dec 10 14:58 pflags.out.3
drwxrwxrwx   3 root     other        512 Dec 10 14:58 pkgapp_data
-rw-rw-rw-   1 root     other       2651 Dec 10 14:57 pldd.out.1
-rw-rw-rw-   1 root     other       2651 Dec 10 14:58 pldd.out.2
-rw-rw-rw-   1 root     other       2651 Dec 10 14:58 pldd.out.3
-rw-rw-rw-   1 root     other      19535 Dec 10 14:57 pmap.out.1
-rw-rw-rw-   1 root     other      19535 Dec 10 14:58 pmap.out.2
-rw-rw-rw-   1 root     other      19535 Dec 10 14:58 pmap.out.3
-rw-rw-rw-   1 root     other       1388 Dec 10 14:57 prstat.out.1
-rw-rw-rw-   1 root     other       1390 Dec 10 14:58 prstat.out.2
-rw-rw-rw-   1 root     other       1392 Dec 10 14:58 prstat.out.3
-rw-rw-rw-   1 root     other      72231 Dec 10 14:57 pstack.out.1
-rw-rw-rw-   1 root     other      72235 Dec 10 14:58 pstack.out.2
-rw-rw-rw-   1 root     other      72233 Dec 10 14:58 pstack.out.3
-rw-rw-rw-   1 root     other        184 Dec 10 15:00 release.out
-rw-rw-rw-   1 root     other      71631 Dec 10 15:00 showrev.out
-rw-rw-rw-   1 root     other      37856 Dec 10 14:58 truss.out
-rw-rw-rw-   1 root     other        206 Dec 10 15:00 ulimit
-rw-rw-rw-   1 root     other         66 Dec 10 15:00 uname.out



Then it is all done and just need to do this ,


"Please send the file /export/home/bits/iws/misc/SUN-GDD-webserver-wshang-solaris-v3/data/11111111-gdd-wshang-.tar.gz to

Sun Microsystems at https://supportfiles.sun.com/upload

Choose cores as the destination.



[0] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg

how to use webdav to access source code

Tuesday Dec 09, 2008

Sometimes, we like to allow people to access source code with webdav.


To do this in web 6.1, you turn on webdav, see docs at


http://docs.sun.com/app/docs/doc/820-5714/bhavk?l=en&a=view&q=webdav


e.g. in my env, I created a dir. under my docroot, 



1. APPLE:/export/home/iws6.1sp10/httpacl> ls -l ../docs
total 56
.....
drwxrwxrwx   2 root     other        512 Dec  9 14:16 test3cu
lrwxrwxrwx   1 root     other         36 Dec  9 14:20 test3cu-src -> /export/home/iws6.1sp10/docs/test3cu


APPLE:/export/home/iws6.1sp10/httpacl> ls -l ../docs/test3cu
total 2
-rw-r--r--   1 root     other        423 Dec  9 14:16 check-heap-mem.jsp


(So,  test3cu-src  will map to runtime test3cu .
We need two different uri above for different ACLs later for source and runtime access.)


2. then I added it into my webdav collection,


then my server.xml looks like:


      <DAV lockdb="/export/home/iws6.1sp10/https-dav/lock-db/https-dav" minlockt
imeout="0" maxxmlrequestbodysize="8192" maxpropdepth="1" enabled="true" lockdbup
dateinterval="0" propdbupdateinterval="0" maxpropdbsize="8192">
        <DAVCOLLECTION uri="/test3cu" sourceuri="/test3cu-src" enabled="true"/>
      </DAV>


3. then , I added my ACLs,


APPLE:/export/home/iws6.1sp10/httpacl> cat generated.https-dav.acl
version 3.0;
acl "default";
authenticate (user, group) {
  prompt = "Sun ONE Web Server";
};
allow (read, execute, info) user = "anyone";
allow (list, write, delete) user = "all";

acl "es-internal";
allow (read, execute, info) user = "anyone";
deny (list, write, delete) user = "anyone";

acl "dav-src";
deny (all) user = "anyone";

....

acl "uri=/test3cu/";
authenticate (user,group) {
        database = "default";
        method = "basic";
        prompt = "webdav testcu3 execution path";
};
deny (all)
 (user = "anyone" ›;

allow (all)
 (user = "u1" ›;

acl "uri=/test3cu-src/";
authenticate (user,group) {
        database = "default";
        method = "basic";
        prompt = "webdav for source uri test3cu-src";
};
deny (all)
 (user = "anyone" ›;

allow (all)
 (user = "u2" ›;

----
so, u1 can run the jsp, and u2 can access the source code of the jsp.


4. then I tested

a/ the runtime,

http://apple.asia.sun.com:60105/test3cu/check-heap-mem.jsp
then login as u1, passwd = u1
will show the jsp runtime results properly

b/ access the jsp source

http://apple.asia.sun.com:60105/test3cu-src/check-heap-mem.jsp

if login as u1,  then it will be forbidden

if login as u2,  then it will be ok and fine.
and show the source of the jsp instead of the runtime result.


5. If I use the same uri in my server.xml webdav collection, e.g.


        <DAVCOLLECTION uri="/test" sourceuri="/test"
enabled="true"/>


and ACL:



acl "dav-src";

deny (all) user = "anyone";



acl "uri=/test/";

authenticate (user,group) {

        method = "basic";

        prompt = "webdav PURE uri test";

};

deny (all)

 (user = "anyone"›;


allow (all)

 (user = "u1"›;


then the default will be source code access.


e.g.


http://apple.asia.sun.com:60105/test/check-heap-mem.jsp

will ASK auth and prompt asking uid/passwd, then enter uid/passwd ok,
and will show the

jsp source code, instead of jsp results because sourceuri="/test" default behavior is source access.

6. if you do not have sourceuri="/test" , then it will run the jsp and show the runtime results,


e.g.



        <DAVCOLLECTION uri="/test2" enabled="true"/>


and ACL:


http://apple.asia.sun.com:60105/test2/check-heap-mem.jsp

will run the jsp results and no auth prompt asking uid/passwd

because we use acl "default";


 Feel free to try the webdav collection.




[0] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg

New wshang.ksh version 3.0 just released

Tuesday Dec 02, 2008

Hi,


We got a new troubleshooting tool,  wshang.ksh version 3.0 just released. FYI.


You can download it at


http://www.sun.com/bigadmin/jsp/descFile.jsp?url=descAll/sun_gdd_wshang_vers


There are some user configurable options inside, e.g.


Some notes on usage:  The customer will have to edit the script to
change a few options as needed.  These options will be made interactive
in the next release of wshang.

# The following four settings can be changed as necessary:


# Change this value to set the duration in secs between data collection
rounds

DURATION=15


# Set the following variable to y or n to allow a gcore to be taken

CORECHOICE=y


# Set the following variable to y or n to allow the pkgapp script to run.

# Assumes the pkgapp script is in the same location as wshang script.

PKGAPP=y


# Set the following variable with your Case Number. If no case number
has been

# opened but wish to use wshang.ksh to trap an issue, you can use your
Company

# Name (no spaces) or all 1's.  Once you get a Sun Case number, you can
rename

# the resulting tar file before sending to Sun.

CASENUMBER=11111111


This will be a useful tool to collect troubleshooting data for web and/or proxy server. 

[0] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg

Pkgapp 3.0 for Solaris Available now !

Tuesday Nov 25, 2008

I just know this, so share here,


Pkgapp 3.0 for Solaris Available!


 This is a very useful tool to collect the data for troubleshooting, see more at web GDD , e.g.


http://docs.sun.com/app/docs/doc/820-2483/gebbt?a=view



[0] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg

Proxy 4.0.8 Patch version is out now

Wednesday Nov 05, 2008

If you are using a package-based proxy 4.x installation, then  you need the patch 120981-15 release (for Solaris Sparc).


You can download it at


http://sunsolve.sun.com/search/document.do?assetkey=1-21-120981-15-1


(login  and contract required)  


It is always a good idea to upgrade to the latest SP to avoid any known and fixed issues. 

[0] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg

How to log Host header in web 6.1SPx

Wednesday Nov 05, 2008

If you need to see the incoming request Host header logged in the web server 6.1SPx logs, then you can try below:


add last one below in magnus.conf, i.e. %Req->headers.host%

Init fn="flex-init" access="$accesslog" format.access="%Ses->client.ip% - %Req->vars.auth-user% [%SYSDATE%] \"%Req->reqpb.clf-request%\" %Req->srvhdrs.clf-status% %Req->srvhdrs.content-length% %vsid%  %Req->headers.host% "


then it will log the host header of the incoming request, e.g.


apple:/export/home/iws6.1sp10> telnet localhost 60103
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET /banner.html HTTP/1.1
Host: dummytest  (note this)

HTTP/1.1 200 OK
Server: Sun-ONE-Web-Server/6.1
Date: Wed, 05 Nov 2008 10:45:37 GMT
Content-length: 1827
Content-type: text/html
Last-modified: Mon, 29 Sep 2008 08:37:07 GMT
Etag: "723-48e093b3"
Accept-ranges: bytes
...........


 The log will show,


127.0.0.1 - - [05/Nov/2008:18:45:37 +0800] "GET /banner.html HTTP/1.1" 200 1827 https-sess  dummytest

You can see the Host: dummytest  in the last column above.


See more at
http://docs.sun.com/app/docs/doc/820-1639/6nda10e4a?l=ja&a=view


e.g. add Req->headers.cookie.cookie_name for


Easy Cookie Logging

[0] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg

Sun Web Server 6.1 SP 10 is out now

Monday Sep 29, 2008

You can now download the latest 6.1SP10 at


https://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_SMI-Site/en_US/-/USD/ViewProductDetail-Start?ProductRef=SJWS-6.1-SP10-OTH-G-F@CDS-CDS_SMI 


The release notes can be found at


http://docs.sun.com/app/docs/doc/820-5627


FYI.




[0] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg

A good wiki site for Sun Java web server information

Friday Sep 26, 2008

I found this site has a lot of good and useful information about Sun Java Web server.


See more at


http://wikis.sun.com/display/WebServer/Sun+Java+System+Web+Server


e.g. you can go to the FAQ at


http://wikis.sun.com/display/WebServer/FAQ


For example,  I just solved a customer problem with the entry about


    <If $headers{'user-agent'} =~ "foo">

See more at. 


http://wikis.sun.com/display/WebServer/faq_configuration#faq_configuration-10.GettinganerrorErrorevaluatingexpression%3AReferencetoundefinedvariable%22%24headers%5C%22ifweadd%3CIf%24headers%5C%3D%22foo%22%3Einobj.confinSunJavaSystemWebServer7.0.



 So, please take a look at this wiki site.


[0] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg

Why sometimes we cannot see the custom errors in IE ?

Wednesday Sep 24, 2008

Sometimes, you have configured the web server to return custom errors, e.g. in obj.conf,

Error fn="send-error" code="404" path="<path>/error404.html"
Error fn="send-error" code="401" path="<path>/error401.html"
Error fn="send-error" code="403" path="<path>/error403.html"
Error fn="send-error" code="405" path="<path>/error405.html"
Error fn="send-error" code="500" path="<path>/error500.html"

But you can see the above custom error pages ok in Firefox and telnet test,

e.g.

apple:> telnet localhost 61801
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET /nono1.html HTTP/1.1
Host: apple

HTTP/1.1 404 Not found
Server: Sun-ONE-Web-Server/6.1
Date: Wed, 16 Jan 2008 10:02:35 GMT
Content-length: 44
Content-type: text/html

this is a customer error page, crowded.html

But you will see IE showing its standard error, e.g.


But not the custom error page, why ?

This can be because of the IE option "Show friendly HTTP error messages" in the Advanced tab in Internet Options.

See  below,

This will  force the IE to show its  friendly HTTP error messages  in  404,  401, 500  status code, instead of the custom errors sent out by web server. This is why you can see the custom error ok in Firefox and telnet test, but not in IE sometimes. If you uncheck this option, then restart IE, then you can see the custom error page in response to a 404 Not Found.

If you really want your custom error page shown in IE, then one possible workaround (although I do not recommend, because changing status code is not a good idea/practice in general).

You can add this below in obj.conf to change from , e.g. 404 to 306 which is unused.

(see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.7

"
10.3.7 306 (Unused)

The 306 status code was used in a previous version of the specification, is no longer used, and the code is reserved.
"     )

Service method="TRACE" fn="service-trace"
<Client code="404">
Output fn="set-variable" error="306 Not Found" noaction="true"
Error fn="send-error" path="/export/home/iws6.1sp8/docs2/crowded.html"
</Client>
Error fn="error-j2ee"
....

Then, IE can see the new custom error page because now we change its status from 404 to 306. IE does not have a friendly error page for 306, so it will show our custom error page now. However, I have to say again - I do not recommend this. It is shown here just in case you really need to workaround this IE option to show your custom error page.

[2] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg

Sun Java System Web Proxy Server 4.0.8 is out now

Monday Sep 08, 2008

You can now download the latest Proxy 4.0.8 at


https://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_SMI-Site/en_US/-/USD/ViewProductDetail-Start?ProductRef=SJPrxySrv-4.0.8-OTH-G-F@CDS-CDS_SMI


and release notes at


http://docs.sun.com/app/docs/doc/820-5728


If you are using a package-based proxy installation, then please wait for the patch 120981-15 release (for Solaris Sparc).

[0] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg

Web 7 Admin GUI not showing the proper running status of instance ?

Tuesday Sep 02, 2008

Sometimes, if you set a too restrictive umask (e.g. 007) in the .profile file of the running uid of the web 7 instance server process, you may see the status of the instance server as NOT RUNNING in Admin GUI (even it is actually running). This is because the pid file in the <temp-path> directory is not readable by the admin server process running uid.


e.g. if .profile of uid=web has a umask = 007, then if cu login as web, then switch user to root, then startserv to start up a web 7 instance. If cu runs Admin server process as uid=web too, then the Admin GUI will show instance NOT RUNNING.


If you check cu temp-path at


apple:/export/home/iws7.0u3/https-www/config> grep temp-path server.xml
  <temp-path>/tmp/https-www-8d5fe446</temp-path>


then check the pid file in above dir,


apple:/export/home/iws7.0u3/https-www/config> ls -l /tmp/https-www-8d5fe446
total 16
-rw-rw----   1 root     other          5 Aug 26 19:00 pid
srwxrwx---   1 root     other          0 Aug 26 19:00 webservd-wdog.socket
srwxrwx---   1 root     other          0 Aug 26 19:00 webservd.socket


(note the file permission, which is NOT world-readable, so if Admin process uid is not in this


group, it will not be able to read it properly).


When Admin process runs as uid=web, then it will not read above pid file successfully.
The Admin GUI will display it as NOT RUNNING even when it is actually running.


To fix it, use a less restrictive umask , e.g. umask 022, then the pid file will have :


apple:/export/home/iws7.0u3/https-www/config> ls -l /tmp/https-www-8d5fe446
total 16
-rw-r--r--   1 root     other          5 Aug 27 11:17 pid


(note - now is world-readable)


Then the Admin server process can read it properly and show it as RUNNING in Admin GUI.


The other possible fix is to use a uid in the same group (e.g. group=other in above) to run Admin process.




[0] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg