Some quick notes on upgrading 111 to 111a and preparing for GlassFish v2.1 clustering and load balancing tests:
(Note: This is really a scratch-pad of notes and resources for my own benefit, rather than a structured Blog for others to follow, however some of the resources might be useful for someone, somewhere)
OpenSolaris upgrade problems:
Graphical login failed to start
Simply restarting gdm fixed this problem!
svcadm disable gdm
svcadm enable gdm
Installing GlassFish v2.1 - problems:
Running java -Xmx256m -jar glassfish_xxx.jar reported "Not Enough Space Available"
zfs list showed 8gig space available
check for large files in swap directories:
pfexec du -k /tmp|sort -n
pfexec du -k /etc/svc/volatile|sort -n
Increasing swap space, adding a second swap file:
zfs create -V2G rpool/swap2 ; swap -a /dev/zvol/dsk/rpool/swap2
GlassFish clustering:
Steps for setting up GlassFish clustering:
Setup default clustering profile;
lib/ant/bin/ant -f setup-cluster.xml
Start the DAS;
bin/asadmin start-domain --user admin
Create the node agent;
bin/asadmin create-node-agent
Start the node agent;
bin/asadmin start-node-agent
Create cluster and instances (for node agent) in GlassFish admin console.
Download Load Balancer plug-in according to platform
http://download.java.net/javaee5/external/
Guide to setting up GlassFish clustering:
http://blogs.sun.com/dadelhardt/entry/clustering_web_applications_with_glassfish1
Guide to setting up GlassFish with Load Balancer plugin:
https://glassfish.dev.java.net/javaee5/build/GlassFish_LB_Cluster.html
Further resources:
Clustering with Apache HTTPd:
http://blogs.sun.com/jluehe/entry/supporting_apache_loadbalancer_with_glassfish
Interesting thread about clustering problems:
http://www.nabble.com/Cluster-session-replication-not-working-td20691318.html
GlassFish V2 Clustering presentation:
http://blogs.sun.com/stripathi/resource/Preso/GlassFishv2Clustering.pdf
Sun Clustering with GlassFish v2:
http://developers.sun.com/appserver/reference/techart/glassfishcluster/
Setting up GlassFish SSL support:
http://java.sun.com/mailers/techtips/enterprise/2007/TechTips2_Nov07.html
GlassFish JMX / JConsole:
http://docs.sun.com/app/docs/doc/820-4335/ablwi?a=view
Sun Java web server (for load balancing):
https://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_SMI-Site/en_US/-/USD/ViewProductDetail-Start?ProductRef=SJWS6.1SP5-OTH-G-F@CDS-CDS_SMI
Showing posts with label OpenSolaris. Show all posts
Showing posts with label OpenSolaris. Show all posts
Saturday, 16 May 2009
Thursday, 8 January 2009
OpenSolaris - ZFS and Zones
Today, just a quick note on setting up an OpenSolaris 10 system local zone.
Firstly, you need to ensure there's a suitable ZFS file system created for the zone, then you define and install the zone itself. The basic steps are quite simple, here's a basic example as a starter:
Note: Global zone means the default zone, the basic machine assuming no zones have been created yet. Local zone is a created zone within the global zone, as described here.
As root on the global zone:
Take a look at available pools:
global# rpool list
On my system, with one disk fully used, I have rpool already, but no other pools.
Creating a new ZFS filesystem under rpool as follows:
global# zfs create /rpool/zones
Now create a new zone configuration, here is a really basic minimal zone config with networking, taken from the zone FAQ.
global# zonecfg -z my-zone
global# zonecfg:my-zone> create
global# zonecfg:my-zone> set zonepath=/zones/zone_roots/my-zone
global# zonecfg:my-zone> add net
global# zonecfg:my-zone:net> set address=10.1.1.1
global# zonecfg:my-zone:net> set physical=hm0
global# zonecfg:my-zone:net> end
global# zonecfg:my-zone> commit
global# zonecfg:my-zone> exit
Install the zone (if this fails, check permissions, shown as *1 below)
global# zoneadm -z my-zone install
Boot the installation!
global# zoneadm -z my-zone boot
Login to the new zone:
global# zlogin -C my-zone
*1 change permissions on the dataset if necessary
global# chown root /rpool/zones/my-zone
global# chmod 700 /rpool/zones/my-zone
A more complete zone configuration, for reference:
create -b
set zonepath=/zones/dev1
set autoboot=true
add inherit-pkg-dir
set dir=/lib
end
add inherit-pkg-dir
set dir=/platform
end
add inherit-pkg-dir
set dir=/sbin
end
add inherit-pkg-dir
set dir=/usr
end
add inherit-pkg-dir
set dir=/opt/apache22
end
add inherit-pkg-dir
set dir=/opt/csw
end
add inherit-pkg-dir
set dir=/opt/mysql5
end
add inherit-pkg-dir
set dir=/opt/pgsql829
end
add inherit-pkg-dir
set dir=/opt/php5
end
add fs
set dir=/opt/SUNWspro
set special=/opt/SUNWspro
set type=lofs
add options ro
end
add net
set address=10.80.117.152
set physical=bge0
end
Resources:
ZFS: http://www.linuxdynasty.org/zfs-howto-howto-create-a-zfs-file-system.html
Zones: http://opensolaris.org/os/community/zones/faq/#sa_create
.
Firstly, you need to ensure there's a suitable ZFS file system created for the zone, then you define and install the zone itself. The basic steps are quite simple, here's a basic example as a starter:
Note: Global zone means the default zone, the basic machine assuming no zones have been created yet. Local zone is a created zone within the global zone, as described here.
As root on the global zone:
Take a look at available pools:
global# rpool list
On my system, with one disk fully used, I have rpool already, but no other pools.
Creating a new ZFS filesystem under rpool as follows:
global# zfs create /rpool/zones
Now create a new zone configuration, here is a really basic minimal zone config with networking, taken from the zone FAQ.
global# zonecfg -z my-zone
global# zonecfg:my-zone> create
global# zonecfg:my-zone> set zonepath=/zones/zone_roots/my-zone
global# zonecfg:my-zone> add net
global# zonecfg:my-zone:net> set address=10.1.1.1
global# zonecfg:my-zone:net> set physical=hm0
global# zonecfg:my-zone:net> end
global# zonecfg:my-zone> commit
global# zonecfg:my-zone> exit
Install the zone (if this fails, check permissions, shown as *1 below)
global# zoneadm -z my-zone install
Boot the installation!
global# zoneadm -z my-zone boot
Login to the new zone:
global# zlogin -C my-zone
*1 change permissions on the dataset if necessary
global# chown root /rpool/zones/my-zone
global# chmod 700 /rpool/zones/my-zone
A more complete zone configuration, for reference:
create -b
set zonepath=/zones/dev1
set autoboot=true
add inherit-pkg-dir
set dir=/lib
end
add inherit-pkg-dir
set dir=/platform
end
add inherit-pkg-dir
set dir=/sbin
end
add inherit-pkg-dir
set dir=/usr
end
add inherit-pkg-dir
set dir=/opt/apache22
end
add inherit-pkg-dir
set dir=/opt/csw
end
add inherit-pkg-dir
set dir=/opt/mysql5
end
add inherit-pkg-dir
set dir=/opt/pgsql829
end
add inherit-pkg-dir
set dir=/opt/php5
end
add fs
set dir=/opt/SUNWspro
set special=/opt/SUNWspro
set type=lofs
add options ro
end
add net
set address=10.80.117.152
set physical=bge0
end
Resources:
ZFS: http://www.linuxdynasty.org/zfs-howto-howto-create-a-zfs-file-system.html
Zones: http://opensolaris.org/os/community/zones/faq/#sa_create
.
Saturday, 12 July 2008
OpenSolaris - upgrade to b93
More notes on OpenSolaris image-update, to b93 (in my case from b91)
See this thread http://opensolaris.org/jive/thread.jspa?messageID=258127𿁏 discussing the problem and it's solution.
Performing the standard image-update failed with an error of the form:
> pkg: attempt to mount opensolaris-3 failed.
> pkg: image-update cannot be done on live image
The problem is caused by:
2387 libbe.so:beCopy() frees nvlist variables before using them
http://defect.opensolaris.org/bz/show_bug.cgi?id=2387
So, time to find a work around. This wasn't as seamless as perhaps it should have been, this is how I did it:
#beadm list
> my active BE was opensolaris-3, which I was booted in
#export PKG_CLIENT_TIMEOUT=2000
#pfexec pkg refresh
create a temp BE
#pfexec beadm create opensolaris-4
mount it as /mnt
#pfexec mount -F zfs rpool/ROOT/opensolaris-4 /mnt
update it
#pfexec pkg -R /mnt image-update
#pfexec beadm unmount opensolaris-4
#pfexec beadm activate opensolaris-4
reboot into BE opensolaris-4 build 93
Note: b92 was skipped (not released)!
Also, this failed _every time_ when attempting it from desktop terminal (graphical login) - but worked as soon as I did the same thing from an ssh terminal!
Blog for installing / configuring mysql as service using gui http://weblogs.java.net/blog/bleonard/archive/2008/06/opensolaris_200_3.html
Additional notes:
BE_PRINT_ERR=true can be used to output diagnostic error logs from the be process,
e.g.
BE_PRINT_ERR=true beadm create test
.
See this thread http://opensolaris.org/jive/thread.jspa?messageID=258127𿁏 discussing the problem and it's solution.
Performing the standard image-update failed with an error of the form:
> pkg: attempt to mount opensolaris-3 failed.
> pkg: image-update cannot be done on live image
The problem is caused by:
2387 libbe.so:beCopy() frees nvlist variables before using them
http://defect.opensolaris.org/bz/show_bug.cgi?id=2387
So, time to find a work around. This wasn't as seamless as perhaps it should have been, this is how I did it:
#beadm list
> my active BE was opensolaris-3, which I was booted in
#export PKG_CLIENT_TIMEOUT=2000
#pfexec pkg refresh
create a temp BE
#pfexec beadm create opensolaris-4
mount it as /mnt
#pfexec mount -F zfs rpool/ROOT/opensolaris-4 /mnt
update it
#pfexec pkg -R /mnt image-update
#pfexec beadm unmount opensolaris-4
#pfexec beadm activate opensolaris-4
reboot into BE opensolaris-4 build 93
Note: b92 was skipped (not released)!
Also, this failed _every time_ when attempting it from desktop terminal (graphical login) - but worked as soon as I did the same thing from an ssh terminal!
Blog for installing / configuring mysql as service using gui http://weblogs.java.net/blog/bleonard/archive/2008/06/opensolaris_200_3.html
Additional notes:
BE_PRINT_ERR=true can be used to output diagnostic error logs from the be process,
e.g.
BE_PRINT_ERR=true beadm create test
.
Friday, 20 June 2008
OpenSolaris 2008.05 & update to >= b90
With the demise of SXDE I thought I'd prepare for life with OpenSolaris...
Currently on build 90, 2008.05 represents build 86.
Installation of OpenSolaris 2008.05 from the Live CD (1 CD) is a breeze, simply boot from the CD (this took some time under VMWare!), have a play then click the install link on the desktop - great!
OS2008.05 uses ZFS and IPS - so this is a good starting point and upgradable using a package management system rather like we've all come to expect from the Linux world :)
Once installed, you can use pkg image-update to udate to the latest build of OpenSolaris, here are some quick notes:
set a timeout to avoid disapointment during the udate process!
#export PKG_CLIENT_TIMEOUT=2000
#pkg refresh
#pfexec pkg image-update
# important - do this before reboot! (or your reboot won't [boot])
http://mail.opensolaris.org/pipermail/indiana-discuss/attachments/20080606/94969481/attachment-0003.txt
Which boils down to:
A guide for OpenSolaris installation under vmware:
http://blogs.sun.com/souvik/entry/getting_started_with_opensolaris_2008
Another good thread: http://opensolaris.org/jive/thread.jspa?threadID=62982&tstart=0
--
Install Java JDK and Netbeans:
http://blogs.sun.com/souvik/entry/getting_started_with_opensolaris_2008
#zcat jdk-6u6-solaris-i586.tar.Z | tar -xf -
#pfexec pkgadd -d . SUNWj6dev SUNWj6cfg SUNWj6man SUNWj6dmo
NB: after installing the 32bit version the 64bit extensions can be installed but don't do this if you want to use applets or web start.
Install FireFox 3:
http://opensolaris.org/jive/thread.jspa?messageID=250311&tstart=0
Installing mysql etc:
#pfexec pkg install SUNWapch22 SUNWmysql5 SUNWapch22m-php5 SUNWphp524-mysql
http://blogs.sun.com/natarajan/entry/how_to_install_apache_php
--
Check platform 32/64 bit:
#isainfo -b
Currently on build 90, 2008.05 represents build 86.
Installation of OpenSolaris 2008.05 from the Live CD (1 CD) is a breeze, simply boot from the CD (this took some time under VMWare!), have a play then click the install link on the desktop - great!
OS2008.05 uses ZFS and IPS - so this is a good starting point and upgradable using a package management system rather like we've all come to expect from the Linux world :)
Once installed, you can use pkg image-update to udate to the latest build of OpenSolaris, here are some quick notes:
set a timeout to avoid disapointment during the udate process!
#export PKG_CLIENT_TIMEOUT=2000
#pkg refresh
#pfexec pkg image-update
# important - do this before reboot! (or your reboot won't [boot])
http://mail.opensolaris.org/pipermail/indiana-discuss/attachments/20080606/94969481/attachment-0003.txt
Which boils down to:
#beadm listCheck the active on reboot name, e.g. opensolaris-1
#pfexec mount -F zfs rpool/ROOT/opensolaris-1 /mnt
#pfexec /mnt/boot/solaris/bin/update_grub -R /mnt
A guide for OpenSolaris installation under vmware:
http://blogs.sun.com/souvik/entry/getting_started_with_opensolaris_2008
Another good thread: http://opensolaris.org/jive/thread.jspa?threadID=62982&tstart=0
--
Install Java JDK and Netbeans:
http://blogs.sun.com/souvik/entry/getting_started_with_opensolaris_2008
#zcat jdk-6u6-solaris-i586.tar.Z | tar -xf -
#pfexec pkgadd -d . SUNWj6dev SUNWj6cfg SUNWj6man SUNWj6dmo
NB: after installing the 32bit version the 64bit extensions can be installed but don't do this if you want to use applets or web start.
Install FireFox 3:
http://opensolaris.org/jive/thread.jspa?messageID=250311&tstart=0
Installing mysql etc:
#pfexec pkg install SUNWapch22 SUNWmysql5 SUNWapch22m-php5 SUNWphp524-mysql
http://blogs.sun.com/natarajan/entry/how_to_install_apache_php
--
Check platform 32/64 bit:
#isainfo -b
Wednesday, 7 May 2008
DNS troubles on Solaris
After having a little DNS trouble on Solaris, here are some useful links for future reference:
http://www.sun.com/bigadmin/content/selfheal/smf-quickstart.jsp
http://www.learning-solaris.com/index.php/configuring-a-dns-server/
http://www.softpanorama.org/DNS/dns_clients.shtml
http://www.sun.com/bigadmin/content/selfheal/smf-quickstart.jsp
http://www.learning-solaris.com/index.php/configuring-a-dns-server/
http://www.softpanorama.org/DNS/dns_clients.shtml
Friday, 2 May 2008
Solaris 10, X fails to start after installing VMWare tools
Note to self - if this happens restore the pre-installation vmware_drv.so as per this link:
http://communities.vmware.com/thread/93366
and this one too http://knowledgefrontier.blogspot.com/2008/04/opensolaris-snv86-on-vmware-with.html
which is essentially to do this:
mv /usr/X11/lib/modules/drivers/vmware_drv.so.BeforeVMwareToolsInstall /usr/X11/lib/modules/drivers/vmware_drv.so
luckily vmware keeps the old copy, which is handy....
this is dead easy when you know it. When it only shows up as a problem after a reboot, and the time between installing the tools and rebooting is days or weeks with many other changes in-between - working out the cause and effect relationship is not always so obvious :)
http://communities.vmware.com/thread/93366
and this one too http://knowledgefrontier.blogspot.com/2008/04/opensolaris-snv86-on-vmware-with.html
which is essentially to do this:
mv /usr/X11/lib/modules/drivers/vmware_drv.so.BeforeVMwareToolsInstall /usr/X11/lib/modules/drivers/vmware_drv.so
luckily vmware keeps the old copy, which is handy....
this is dead easy when you know it. When it only shows up as a problem after a reboot, and the time between installing the tools and rebooting is days or weeks with many other changes in-between - working out the cause and effect relationship is not always so obvious :)
Labels:
blank screen,
OpenSolaris,
Solaris,
upgrade,
vmware,
vmware tools
Thursday, 1 May 2008
Blastwave for easy Apache http 2.2 and mod_jk, on Solaris SXDE 10
Goal: Install mod_jk for Apache http 2.2.x with minimal effort!
Such that Apache http can be tested as a front for Glassfish 2ur2 (rather than the usual Tomcat) using the same mod_jk connector...
A handy binary of mod_jk for Solaris and the right version of Apache http didn't seem readily available.
Here are some quick notes on Solaris, Blastwave, Apache httpd and mod_jk
Decided to try out the Blastwave software repository for CSW, site is here http://www.blastwave.org/
Rough steps as follows:
Follow http://www.blastwave.org/howto.html
which is essentially:
pkgadd -d http://www.blastwave.org/pkg_get.pkg
/opt/csw/bin/pkg-get -i wget
/opt/csw/bin/pkg-get -i apache2
/opt/csw/bin/pkg-get -i ap2_mod_jk
and optionally:
cp -p /var/pkg-get/admin-fullauto /var/pkg-get/admin
check the exact version installed:
/opt/csw/apache2/sbin/httpd -v
stop existing service installed as part of SXDE:
svcadm disable apache22
svcs apache22
check lib dsos:
/opt/csw/apache2/libexec
start the server manually:
/opt/csw/apache2/sbin/apachectl start
/opt/csw/apache2/sbin/apachectl stop
Todo:
Configure Apache http and mod_jk
Configure Glassfish with libs etc
Test web applications including failure conditions
Set Blastwave installed version as a service
Such that Apache http can be tested as a front for Glassfish 2ur2 (rather than the usual Tomcat) using the same mod_jk connector...
A handy binary of mod_jk for Solaris and the right version of Apache http didn't seem readily available.
Here are some quick notes on Solaris, Blastwave, Apache httpd and mod_jk
Decided to try out the Blastwave software repository for CSW, site is here http://www.blastwave.org/
Rough steps as follows:
Follow http://www.blastwave.org/howto.html
which is essentially:
pkgadd -d http://www.blastwave.org/pkg_get.pkg
/opt/csw/bin/pkg-get -i wget
/opt/csw/bin/pkg-get -i apache2
/opt/csw/bin/pkg-get -i ap2_mod_jk
and optionally:
cp -p /var/pkg-get/admin-fullauto /var/pkg-get/admin
check the exact version installed:
/opt/csw/apache2/sbin/httpd -v
stop existing service installed as part of SXDE:
svcadm disable apache22
svcs apache22
check lib dsos:
/opt/csw/apache2/libexec
start the server manually:
/opt/csw/apache2/sbin/apachectl start
/opt/csw/apache2/sbin/apachectl stop
Todo:
Configure Apache http and mod_jk
Configure Glassfish with libs etc
Test web applications including failure conditions
Set Blastwave installed version as a service
Labels:
Apache HTTPD 2.2.x,
Blastwave,
mod_jk,
Open Solaris,
OpenSolaris
Subscribe to:
Posts (Atom)