Oracle beans...
Wednesday, September 28, 2011
Wednesday, July 6, 2011
Oracle Web Logic init scrips
Simple script to start WLS.
There is one difficulty with console return after calling startWebLogic.sh and startManagedWebLogic.sh. Regarding to it I had to run it in background. If startup script runs in background it returns code which means successful completion of "&" operation. If you need to make sure services started correctly code you have two ways:
- do it in WLST
- try to catch "<Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode>
This script installed at development server. As it is not a production variant and have limited number of domains I do not have to spend much time WLST script coding (which is actually python). Lately if it would be necessary I will certainly do advanced script to automatically start/stop WLS domains. There are some simple samples.
#!/bin/sh
# using of LOOPs is regarded to future improovements. May well you will
# have several Admin servers and Several Managed Servers. Just change
# the code to work with arrays.
# The only problem is to check successfull start of Java instances which is in background.
LOG_ADM="/tmp/ora_wls-admin"
LOG_MNGR="/tmp/ora_wls-nmgr"
MW_HOME="/u01/oracle/mw"
WLS_DOMAINS_ADM="base_domain"
WLS_DOMAINS_MNGD="osb_server1 Server-0"
#for compatibility with sh
ADNAME="basedomain"
MDNAME="osbserver1"
# write svn information to a header
version() {
Log " category System scripts"
Log " author V.Bychkov"
Log " changedby $Author: bes $"
Log " version SVN: $Id: oracle.wls-middleware 1002 2011-07-04 04:26:20Z bes $"
Log " revision SVN: $Revision: 1002 $"
#!/bin/sh
# using of LOOPs is regarded to future improovements. May well you will
# have several Admin servers and Several Managed Servers. Just change
# the code to work with arrays.
# The only problem is to check successfull start of Java instances which is in background.
LOG_ADM="/tmp/ora_wls-admin"
LOG_MNGR="/tmp/ora_wls-nmgr"
MW_HOME="/u01/oracle/mw"
WLS_DOMAINS_ADM="base_domain"
WLS_DOMAINS_MNGD="osb_server1 Server-0"
#for compatibility with sh
ADNAME="basedomain"
MDNAME="osbserver1"
# write svn information to a header
version() {
Log " category System scripts"
Log " author V.Bychkov"
Log " changedby $Author: bes $"
Log " version SVN: $Id: oracle.wls-middleware 1002 2011-07-04 04:26:20Z bes $"
Log " revision SVN: $Revision: 1002 $"
Log " link $HeadURL: file:///opt/svn/projects/scripts/oracle/init.d/oracle.wls-middleware $" Log "# date $Date: 2011-07-04 14:26:20 +1000 (Mon, 04 Jul 2011) $"}
Saturday, July 2, 2011
Delete domain in Oracle WebLogic Server
There is no special tool for that. If we are talking about 11g, just delete domain directory.
For example in my configuration it is:
rm -rf /u01/oracle/mw/user_projects/domains/base_domain
it is also necessary to remove deleted domain from domains list:
For example in my configuration it is:
rm -rf /u01/oracle/mw/user_projects/domains/base_domain
it is also necessary to remove deleted domain from domains list:
[oracle@db02-app01 zone:app01]/u01/oracle/mw/wls_10.3$ cat common/nodemanager/nodemanager.domains
#
#Thu Jun 30 15:53:24 MSD 2011
wl_server=/u01/oracle/mw/wls_10.3/samples/domains/wl_server
medrec-spring=/u01/oracle/mw/wls_10.3/samples/domains/medrec-spring
base_domain=/u01/oracle/mw/user_projects/domains/base_domain
servicebus=/u01/oracle/mw/osb_11.1/../user_projects/samples/domains/servicebus
medrec=/u01/oracle/mw/wls_10.3/samples/domains/medrec
It is a good practice for me to make backup of file before modification.
Start Oracle Service Bus 11g
To start OSB firstly need to start a WLS with correct memory settings and configure WLS Servers/Domains.
Execute /opt/bea/wlserver_103/common/bin/config.sh to configure domain.
1. choose "Oracle Service Bus for Developers - 11.1.1.4 [Oracle_OSB1]" option during configuration process. After completing this step you will get configured base_domain domain with osb_server1 server instance. For the first time I decided to accept default names.
2. start WL Server with Administration Console
export USER_MEM_ARGS="-Xms1280m -Xmx1280m -XX:PermSize=128m -XX:MaxPermSize=512m"
/u01/oracle/mw/user_projects/domains/base_domain$ ./bin/startWebLogic.sh
3. Start Managed Server osb_server1
/u01/oracle/mw/user_projects/domains/base_domain$ ./bin/startManagedWebLogic.sh osb_server1
Execute /opt/bea/wlserver_103/common/bin/config.sh to configure domain.
1. choose "Oracle Service Bus for Developers - 11.1.1.4 [Oracle_OSB1]" option during configuration process. After completing this step you will get configured base_domain domain with osb_server1 server instance. For the first time I decided to accept default names.
2. start WL Server with Administration Console
export USER_MEM_ARGS="-Xms1280m -Xmx1280m -XX:PermSize=128m -XX:MaxPermSize=512m"
/u01/oracle/mw/user_projects/domains/base_domain$ ./bin/startWebLogic.sh
3. Start Managed Server osb_server1
/u01/oracle/mw/user_projects/domains/base_domain$ ./bin/startManagedWebLogic.sh osb_server1
Tuesday, June 28, 2011
Working example of Oracle Service Bus 11g silent installation.
I am administering some clients remotely, so it is vital to be able to install and configure with no GUI because I currently have ping time=391 ms to my client.
All that we need:
1. prepare
2. install Oracle WebLogic Server
3. install Oracle Service Bus then.
let's go.
1. some preparation:
#create users and groups
groupadd -g 100 oinstall
groupadd -g 110 dba
useradd -u 100 -g oinstall -G dba oracle
passwd oracle
# create /var/opt/oracle/oraInst.loc file
echo "inventory_loc=/u01/oracle
inst_group=oinstall" > /var/opt/oracle/oraInst.loc
2. Install Oracle WebLogic Server 11g
(all output included)
# create silent xml file:
<bea-installer>
<input-fields>
</bea-installer>
All that we need:
1. prepare
2. install Oracle WebLogic Server
3. install Oracle Service Bus then.
let's go.
1. some preparation:
#create users and groups
groupadd -g 100 oinstall
groupadd -g 110 dba
useradd -u 100 -g oinstall -G dba oracle
passwd oracle
# create /var/opt/oracle/oraInst.loc file
echo "inventory_loc=/u01/oracle
inst_group=oinstall" > /var/opt/oracle/oraInst.loc
2. Install Oracle WebLogic Server 11g
(all output included)
# create silent xml file:
<bea-installer>
<input-fields>
<data-value name="BEAHOME" value="/u01/oracle/mw" /> <data-value name="WLS_INSTALL_DIR" value="/u01/oracle/mw/wls_10.3" /> <data-value name="COMPONENT_PATHS" value="WebLogic Server" /> <data-value name="INSTALL_NODE_MANAGER_SERVICE" value="yes" /> <data-value name="NODEMGR_PORT" value="5559" /> <data-value name="INSTALL_SHORTCUT_IN_ALL_USERS_FOLDER" value="yes"/></input-fields>
</bea-installer>
Monday, March 28, 2011
liboraInstaller.so: wrong ELF class: ELFCLASS64 (Possible cause: architecture word width mismatch)
Machine Info: SunOS XXX 5.10 Generic_142909-17 sun4u sparc SUNW,Sun-Fire-V440
I run it on Sun Fire which is 64 bit.
[oracle@XXX]/u01/app/oracle/product/wls/oms11g/OPatch$ opatch -invPtrLoc /u01/app/oracle/product/wls/oms11g/oraInst.loc -local -oh /u01/app/oracle/product/wls/oms11g/../oracle_common /u01/app/oracle/product/wls/oms11g/install/oneoffs/111010/9329357
Invoking OPatch 11.1.0.8.0
java.lang.UnsatisfiedLinkError: /u01/app/oracle/product/wls/oracle_common/oui/lib/solaris/liboraInstaller.so: ld.so.1: java: fatal: /u01/app/oracle/product/wls/oracle_common/oui/lib/solaris/liboraInstaller.so: wrong ELF class: ELFCLASS64 (Possible cause: architecture word width mismatch)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1803)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1699)
at java.lang.Runtime.load0(Runtime.java:770)
at java.lang.System.load(System.java:1003)
at oracle.sysman.oii.oiip.osd.unix.OiipuUnixOps.loadNativeLib(OiipuUnixOps.java:402)
at oracle.sysman.oii.oiip.osd.unix.OiipuUnixOps.(OiipuUnixOps.java:125)
at oracle.sysman.oii.oiip.oiipg.OiipgEnvironment.ssgetUidux(OiipgEnvironment.java:528)
at oracle.sysman.oii.oiix.OiixEnvironmentOps.ssgetUidux(OiixEnvironmentOps.java:159)
at oracle.opatch.OUIReplacer.isRootAccess(OUIReplacer.java:716)
at oracle.opatch.OPatch.main(OPatch.java:445)
Exception in thread "main" java.lang.UnsatisfiedLinkError: no oraInstaller in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1734)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1028)
at oracle.sysman.oii.oiip.osd.unix.OiipuUnixOps.loadNativeLib(OiipuUnixOps.java:420)
at oracle.sysman.oii.oiip.osd.unix.OiipuUnixOps.(OiipuUnixOps.java:125)
at oracle.sysman.oii.oiip.oiipg.OiipgEnvironment.ssgetUidux(OiipgEnvironment.java:528)
at oracle.sysman.oii.oiix.OiixEnvironmentOps.ssgetUidux(OiixEnvironmentOps.java:159)
at oracle.opatch.OUIReplacer.isRootAccess(OUIReplacer.java:716)
at oracle.opatch.OPatch.main(OPatch.java:445)
OPatch failed with error code 1
I run it on Sun Fire which is 64 bit.
[oracle@XXX]/u01/app/oracle/product/wls/oms11g/OPatch$ opatch -invPtrLoc /u01/app/oracle/product/wls/oms11g/oraInst.loc -local -oh /u01/app/oracle/product/wls/oms11g/../oracle_common /u01/app/oracle/product/wls/oms11g/install/oneoffs/111010/9329357
Invoking OPatch 11.1.0.8.0
java.lang.UnsatisfiedLinkError: /u01/app/oracle/product/wls/oracle_common/oui/lib/solaris/liboraInstaller.so: ld.so.1: java: fatal: /u01/app/oracle/product/wls/oracle_common/oui/lib/solaris/liboraInstaller.so: wrong ELF class: ELFCLASS64 (Possible cause: architecture word width mismatch)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1803)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1699)
at java.lang.Runtime.load0(Runtime.java:770)
at java.lang.System.load(System.java:1003)
at oracle.sysman.oii.oiip.osd.unix.OiipuUnixOps.loadNativeLib(OiipuUnixOps.java:402)
at oracle.sysman.oii.oiip.osd.unix.OiipuUnixOps.
at oracle.sysman.oii.oiip.oiipg.OiipgEnvironment.ssgetUidux(OiipgEnvironment.java:528)
at oracle.sysman.oii.oiix.OiixEnvironmentOps.ssgetUidux(OiixEnvironmentOps.java:159)
at oracle.opatch.OUIReplacer.isRootAccess(OUIReplacer.java:716)
at oracle.opatch.OPatch.main(OPatch.java:445)
Exception in thread "main" java.lang.UnsatisfiedLinkError: no oraInstaller in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1734)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1028)
at oracle.sysman.oii.oiip.osd.unix.OiipuUnixOps.loadNativeLib(OiipuUnixOps.java:420)
at oracle.sysman.oii.oiip.osd.unix.OiipuUnixOps.
at oracle.sysman.oii.oiip.oiipg.OiipgEnvironment.ssgetUidux(OiipgEnvironment.java:528)
at oracle.sysman.oii.oiix.OiixEnvironmentOps.ssgetUidux(OiixEnvironmentOps.java:159)
at oracle.opatch.OUIReplacer.isRootAccess(OUIReplacer.java:716)
at oracle.opatch.OPatch.main(OPatch.java:445)
OPatch failed with error code 1
Explore:
Friday, March 25, 2011
ORA-27102: out of memory when DBCA -createDatabase
[oracle@xxx zone:xx]~/Install/solaris.sparc64_11gR2_database/database$ $ORACLE_HOME/bin/dbca -silent -createDatabase -templateName General_Purpose.dbc -gdbName $SID -sid $SID -sysPassword $PASSWORD -systemPassword $PASSWORD -sysmanPassword $PASSWORD -dbsnmpPassword $PASSWORD -emConfiguration LOCAL -storageType FS -datafileJarLocation $ORACLE_HOME/assistants/dbca/templates -characterset WE8ISO8859P1 -obfuscatedPasswords false -sampleSchema false -oratabLocation /var/opt/oracle/oratab
Copying database files
1% complete
2% complete
4% complete
100% complete
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/XX01/XX01.log" for further details.
[oracle@xxx zone:xx]~/Install/solaris.sparc64_11gR2_database/database$ less /u01/app/oracle/cfgtoollogs/dbca/XX01/XX01.log
Copying database files
DBCA_PROGRESS : 1%
DBCA_PROGRESS : 2%
ORA-27102: out of memory
DBCA_PROGRESS : 4%
ORA-01034: ORACLE not available
ORA-01034: ORACLE not available
DBCA_PROGRESS : 100%
Copying database files
1% complete
2% complete
4% complete
100% complete
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/XX01/XX01.log" for further details.
[oracle@xxx zone:xx]~/Install/solaris.sparc64_11gR2_database/database$ less /u01/app/oracle/cfgtoollogs/dbca/XX01/XX01.log
Copying database files
DBCA_PROGRESS : 1%
DBCA_PROGRESS : 2%
ORA-27102: out of memory
DBCA_PROGRESS : 4%
ORA-01034: ORACLE not available
ORA-01034: ORACLE not available
DBCA_PROGRESS : 100%
solution
Subscribe to:
Posts (Atom)