Guide to startup mulitple instances
OS: Red Hat Enterprise Linux 5
Sun Java Web Server 7 update 6
When I installed the webserver 7 (as root), it asked me if I wanted to start-up the admin-server automatically and I typed in Yes, however it did not create a script for it in the startup (either in init.d or rc3.d) and it's not starting up automatically.
I'd like to know how to do this and also I have 20 sites (instances) that need to start up automatically as well. Going through the GUI is a pain as sometimes, I have to restart a site twice, because it doesn't start up the first time. There are no errors at all.. I suck as scripting, but here is something I was working on.. It doesn't work though.
startup.sh script
/usr/bin/find webserver7/servers/https* -name start -print > list
count=`ps -ef | grep -v grep | grep webservd | wc -l`
clear
echo "\n\n\nThere are currently " $count " web servers running."
echo "\nEnter the Certificate db Password:\n"
read pass
echo "\nYou Entered: " $pass
echo "\n\nOK to proceed with starting all the web servers? [yes/no]\n"
read ans
if [ $ans = yes ]
then
tmp=`echo "echo" \"$pass\" "|\ "`
sed -e "s/^/$tmp/" list > .list.tmp ; chmod 400 .list.tmp ; rm list
awk -f start.awk .list.tmp > .list ; chmod 500 .list ; rm .list.tmp
./.list ; rm .list
sleep 3 ; echo "\n\n\nThere are currently "`ps -ef | grep -v grep | grep webservd | wc -l` " web servers runni
ng."
else
clear
echo "\n\n\n"
echo "You did not answer 'yes'. Bailing..." ; rm list ; exit
fi
start.awk script
BEGIN { RS = "\n" ; FS = "/" }
print "echo \"\\n\""
print "echo \"Starting up " $5 "\""
print $0 " &" }
Thanks!
Much appreciated!
Edited by: bubbamax on Apr 16, 2010 1:38 PM
Edited by: bubbamax on Apr 16, 2010 1:38 PM
The SJSWS7.0u8 install provides a startup script that will work:
#!/bin/sh
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
# NOTE: To avoid your system from failing on reboot, do not change this
# file in any way.
# This script is designed to be executed on reboot.
# Make sure we have PATH set at this point.
PATH="/bin:/sbin:/usr/bin:/usr/sbin:$PATH"
# Set this to 0, if you do NOT want autostart of Web Server
# after a system reboot.
WS_START_ONBOOT=1
# Initialize Script scope level variables.
WS_INSTANCE_ROOT="/path/to/installed/webserver"
# Setup return and error values.
rc_failed="Failure"
rc_success="Success"
ret=$rc_success
# See how we were called.
case "$1" in
start)
if [ -z "WS_START_ONBOOT" ] || [ "$WS_START_ONBOOT" = "0" ]; then
ret=$rc_success
else
echo "Starting Web Servers in $WS_INSTANCE_ROOT"
for each_server in $WS_INSTANCE_ROOT/admin-* $WS_INSTANCE_ROOT/https-*
do
if [ -d "$each_server" ]
then
if [ ! -f "$each_server/.noStartOnBoot" ]
then
echo -n " `basename $each_server`: "
$each_server/bin/startserv > /dev/null 2>&1 || ret=$rc_failed
echo "$ret"
fi
fi
done
fi
stop)
for each_server in $WS_INSTANCE_ROOT/admin-* $WS_INSTANCE_ROOT/https-*
do
reversed_list="$each_server $reversed_list"
done
echo "Stopping Web Servers in $WS_INSTANCE_ROOT"
for each_server in $reversed_list
do
if [ -d $each_server ]
then
echo -n " `basename $each_server`: "
$each_server/bin/stopserv > /dev/null 2>&1 || ret=$rc_failed
echo "$ret"
fi
done
restart)
$0 stop || return=$rc_failed
$0 start || return=$rc_failed
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
# Inform the caller not only verbosely and set an exit status.
test "$ret" = "$rc_success" || exit 1
exit 0
Similar Messages
-
Script to Shutdwon and startup Oracle instance
Hi
Can any one tell how to create a batch file to shutdwon or startup Oracle instance in NT server ?
YasirAssume you are using ora8i and the script file is called start.bat and shutdown.bat. Their contents are as follows:
cd %ORAHOME%
set oracle_sid=%SID%
%ORAHOME%\bin\svrmgrl
connect internal/password
startup pfile=%init_file_path%
exit
cd %ORAHOME%
set oracle_sid=%SID%
%ORAHOME%\bin\svrmgrl
connect internal/password
shutdown immediate
exit
Please replace %ORAHOME% and %SID% with related string.
Thanks -
Unable to start sap hana. -Startup of Instance failed-
I can not start the sap hana, if you know better how to respond, please advise.
Error:
The following is the error log at startup.
Version:
SAP HANA SPS3 Rev.22
Background:
The phenomenon began to occur after failing to recover from. However, it might not matter.
/ Usr/sap/HN1/home/startsap_HDB00.log "contents.
Thursday, January 05 01:16:26 UTC Trace of system startup / check of SAP System HN1 on 2012
Called command: / usr/sap/HN1/SYS/exe/hdb/startsap HDB00
Starting SAP Instance HDB00
Instance Service on host TECTKOSV043 started
SAP-R/3-Startup Program Rel 802 V2.0 (2008/11/15)
Starting at 2012/01/05 01:16:26
Startup Profile: "/ usr/sap/HN1/SYS/profile/HN1_HDB00_tectkosv043.tecnos.jp"
Setup Environment Variables
(8972) SETENV PATH = / usr/sap/HN1/HDB00/exe: / usr/sap/HN1/HDB00/tectkosv043.tecnos.jp: / usr/sap/HN1/HDB00: / usr/sap/HN1/HDB00 / exe: / usr/sap/HN1/HDB00/exe/Python/bin: / usr / local / bin: / bin: / usr / bin: / usr/bin/X11: / usr/X11R6/bin: / usr / games : / usr / lib / mit / bin: / usr / lib / mit / sbin: / opt / dell / srvadmin / bin: / usr / sap / tools / bin: / bin: / usr / bin: / usr / ucb: / sbin
(8972) SETENV SAP_RETRIEVAL_PATH = / usr/sap/HN1/HDB00/tectkosv043.tecnos.jp
(8972) SETENV PYTHONPATH = / usr/sap/HN1/HDB00/tectkosv043.tecnos.jp: / usr/sap/HN1/HDB00/exe: / usr/sap/HN1/SYS/global/hdb/custom/python_support: / usr/sap/HN1/HDB00/exe/python_support
(8972) SETENV DIR_LIBRARY = / usr/sap/HN1/HDB00/exe
(8972) SETENV LD_LIBRARY_PATH = / usr/sap/HN1/HDB00/exe: / usr/sap/HN1/HDB00/exe: / usr/sap/HN1/HDB00/exe: / usr/sap/HN1/HDB00/exe / Python / lib: / usr/sap/HN1/HDB00/exe/filter: / usr/sap/HN1/HDB00/exe/AFL
(8972) SETENV SHLIB_PATH = / usr/sap/HN1/HDB00/exe:
(8972) SETENV LIBPATH = / usr/sap/HN1/HDB00/exe:
Execute Pre-Startup Commands
(8973) Local: rm-f / usr/sap/HN1/HDB00/tectkosv043.tecnos.jp/trace/py.sapHN1_HDB00
(8974) Local: ln-s-f / usr/sap/HN1/HDB00/exe/Python/bin/python / usr/sap/HN1/HDB00/tectkosv043.tecnos.jp/trace/py.sapHN1_HDB00
(8975) Local: rm-f / usr/sap/HN1/HDB00/tectkosv043.tecnos.jp/trace/HDB.sapHN1_HDB00
(8976) Local: ln-s-f / usr/sap/HN1/HDB00/exe/hdbdaemon / usr/sap/HN1/HDB00/tectkosv043.tecnos.jp/trace/HDB.sapHN1_HDB00
Starting Programs
05.01.2012 01:16:26
ShmDetach
OK
(8979) Starting: local / usr/sap/HN1/HDB00/tectkosv043.tecnos.jp/trace/HDB.sapHN1_HDB00-d-nw-f / usr/sap/HN1/HDB00/tectkosv043.tecnos.jp/daemon.ini pf = / usr/sap/HN1/SYS/profile/HN1_HDB00_tectkosv043.tecnos.jp
(8972) Waiting for Child Processes to terminate.
(8972) **** 2012/01/05 01:16:31 Child 8979 terminated with Status 0. ****
(8979) **** 2012/01/05 01:16:31 No RestartProgram command for program 2 ****
(8972) **** No more Child Processes to wait for.
(8972) Parent Shutdown at 2012/01/05 01:16:31
Execute Post-Shutdown Commands
05.01.2012 01:16:31
ShmDetach
OK
(8972) Exiting with Return-Code 3. (No more child processes)
Startup of Instance failedThis question is not related to the HANA developer center sandboxes - no user can stop/start these systems...
If the issue happened after a failed restore, your database is probably corrupted and cannot be started. Try to restore another backup. You can also try to restore the same backup again, and choose to not replay the log (recover from data files only). You will probably loose some changes, but at least have a consistent state...
--Juergen -
Could not able to startup the instance
After shutdown the instance, I could not able to starup the instance. ORA-12203 TNS:UNABLE TO CONNECT TO DESTINATION ,error showing. Database already down, then how to make to startup.
ORA-12203: TNS:unable to connect to destination
Cause: Invalid address specified or destination is not listening. This error can also occur because of underlying network or network transport problems.
Action: Verify that the net service name you entered was correct. Verify that the ADDRESS portion of the connect descriptor which corresponds to the net service name is correct. Ensure that the destination process (for example the listener) is running at the remote node.
Connect with your server. Export ORACLE_HOME and ORACLE_SID. Then login with SQLPLUS as sysdba and startup the instance.
Regards
Asif Kabir -
Disable Show content Guide at startup & Automatically update
Can I disable the setting 'Show content Guide at startup' from the 'Player Preferences...' menu. I know how to do it in the menu, but I want to change this option for 100 pc's at once.
Same problem for the 'Check for updates automatically' option in the 'Quicktime Preferences...' menu.
Is this possible via the registry or via a textfile?
Can someone help me, please?
Quicktime Player 7.0.3 on Windows XP Pro
Windows XP ProrEFIt will basically do the same as holding the option key,I believe it's defaulted(?) to give the boot screen when you cold start showing any available boot drives, but it won't help with Windows auto restart after updating. There may be an option to do so as there's a lot more to rEFIt then I use so you may be able to have it show up at restarts also.
Sorry I can't help more.... -
Running Mulitple instances concurrently
I have installed oracle 8.1.7 on windows 2000 Advanced server. I have created two instances and appropriate listener files for these instances. However I cannot run these two instances concurrently. at any point of time only one can run.
I have to switch back and forth between two instances , whereas my requirement is to have both instances running con currently.
Anyone please help to resolve this.
Thanks in Advance.
Srinihey! if you are sure you have install two instances successfully, then you can always have both of them running concurrently.
lets assume the two instane names are oracle1 & oracle2 respectively
Make sure that the databases are registered correctly with the listener.check the "listener.ora" in your 'orahome\network\admin folder. Also verify the connect descriptor for the databases in your "tnsnames.ora file" also in the same directory....
If all check is successful then you can attempt starting up the instances../
C:\>set oracle_sid=oracle1
C:\>sqlplus/nolog
SQL>conn / as sysdba
If you recieve a reply of connected, then you are connected to oracle1
ELSE ("you recieve connected to an idle instance") then type:
SQL>startup and the instance will be started.
when the instance is started and you are sucessfully connected as a sysdba, then type:
SQL>conn /@oracle2 as sysdba (If you get "connected to an idle instance", then the instance isn't started, Type:
SQL>startup
the instance will start and try to mount corresponding database.
Remember, in future whenever you want to connect to database 'oracle2', you will have to type:
SQL> conn /@oracle2 as sysdba
OR
SQL>host set oracle_sid=oracle2
SQL>conn / as sysdba
Now your defoult SID has become oracle2.
If you still have problems, mail me [email protected] -
I have a problem with Application server it gives error "Startup of Instance failed" when i try to start application server
My database and CI is up. log for the error are as below :---
Trace of system startup/check of SAP System CRP on Tue Feb 9 14:39:25 CUT 2010
Called command: /usr/sap/CRP/SYS/exe/run/startsap r3
Starting SAP-Collector Daemon
saposcol already running
Checking CRP Database
Database is running
Starting SAP Instance
sapparam: SAPSYSTEMNAME neither in Profile nor in Commandline
unknown SAPSYSTEMNAME.
(393374) Exiting with Return-Code -101. (Unknown Sap-System-Name)
Startup of Instance failed
Pl suggest some solution.Hi,
Please analyze the following logs (located at /usr/sap/<SID>/DVEBMGS00/work), to get possible causes.
stderr1 ?
sapstart.log ?
dev_ms ?
dev_disp?
dev_w0 ?
R3trans -d ?
Weather Under <SID>ADM , you are executing this command startsap r3 <instance id of Dialogue Insance> ?
Regards,
Bhavik G. Shroff -
I can't startup an instance of APP Server
Hi,
When I try to startup an application this message appears on serverlog.
[09/May/2003:10:47:24] INFO ( 4767): CORE1116: Sun ONE Application Server 7.0
[09/May/2003:10:47:27] INFO ( 4768): CORE3016: daemon is running as super-user
[09/May/2003:10:47:40] INFO ( 4768): CORE5076: Using [Java HotSpot(TM) Server VM
, Version 1.4.0_02] from [Sun Microsystems Inc.]
[09/May/2003:10:47:48] INFO ( 4768): JMS5034: Could not start the JMS service br
oker process.
[09/May/2003:10:47:48] INFO ( 4768): JMS5036: More details may be available in t
he log file for the JMS service broker instance domain1_server1. Please refer to
the JMS provider documentation for the exact location of this log file.
[09/May/2003:10:47:48] SEVERE ( 4768): JMS5024: JMS service startup failed.
[09/May/2003:10:47:48] SEVERE ( 4768): CORE5071: An error occured during initial
ization
com.sun.appserv.server.ServerLifecycleException: Not enough space
at com.iplanet.ias.jms.JmsProviderLifecycle.onInitialization(JmsProvider
Lifecycle.java:247)
at com.iplanet.ias.server.ApplicationServer.onInitialization(Application
Server.java:206)
at com.iplanet.ias.server.J2EERunner.confPreInit(J2EERunner.java:114)
Caused by: com.sun.appserv.server.ServerLifecycleException: Not enough space
at com.iplanet.ias.jms.JmsProviderLifecycle.onInitialization(JmsProvider
Lifecycle.java:220)
... 2 more
Caused by: java.io.IOException: Not enough space
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:54)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Runtime.java:550)
at java.lang.Runtime.exec(Runtime.java:475)
at java.lang.Runtime.exec(Runtime.java:441)
at com.sun.messaging.jmq.admin.jmsspi.JMSAdminImpl.startProvider(JMSAdmi
nImpl.java:719)
at com.iplanet.ias.jms.JmsProviderLifecycle.onInitialization(JmsProvider
Lifecycle.java:213)
... 2 more
What can i do to solve this problem?
Thanks,It seems you are out of swap space. Server startup process, among other things, has to fork and exec in order to start related MQ broker process. This failed due to insufficient amount of memory needed to temporarily hold both the original process and its fork image.
You could try cleaning up /tmp partition or rebooting the system. Also, you might review what other applications are running on the system at the same time and shut some of them down temporarily until server starts up.
Hope this helps. -
Contradiction in Developer Guide about what is instance?
Hi!
On page 16 of developer guide it is said that the structure of URL is follows
protocol:[//host][:port]/appname/[instanceName]
But earlier on this page it was said that
The NetConnection class connects a client to an application instance on the server.
and an example was given
var nc:NetConnection = new NetConnection();
nc.connect("rtmp://localhost/HelloServer");
where the connect directive does not contain instance name.
So, how these relates? Does instance name is just omited in example meaning _definst_?
Is it possible to write
nc.connect("rtmp://localhost/HelloServer/room1");
Thanks.Hi,
Your understanding is almost correct and there is no contradiction regarding the instance and URL in the Developer guide.
As it said, the net connection always connects to an instance of an application, this instance can be explicitly mentioned (as you wanted to add room1) or if it is not given, FMS uses a default instance with the identity _definst_ for all its purposes. You do not need to append this _definst_ in your connection URLs or elsewhere, but its what the connection goes to.
If you see the administration console for FMS, you can observe clearly what instance is getting the connections.
So, protocol:[//host][:port]/appname/[instanceName] is complete with explicit instance name in the URL.
The NetConnection class connects a client to an application instance on the server. : Correct
nc.connect("rtmp://localhost/HelloServer"); // it connects to _definst_
nc.connect("rtmp://localhost/HelloServer/room1"); // possible and connected to instance room1.
Hope it helps. Thank you ! -
hi all,
I am using oc4j standalone for development. Is it poosible to run multiple instances of oc4j on the same jvm? If so please guide me... Also could i deploy two applications with different contexts in the seperate instances?
Thanks in advanceHello,
First of all you can not have multiple OC4J instances in 1 single JVM, but you can configure your application to use multiple instances of OC4J -each one running in its own VM-; and you do this for scalability and load balancing.
When you have multiple JVM, and you are running a stateful application (EJB and/or Servlet sessions) you have to configure your OC4J instances to replicate the session information in the different nodes (this is where in the context of OracleAS -not stand-alone OC4J- we are talking about "islands")
So to comment Stefano answer, yes you can have your application deployed to multiple OC4J instances, and if configure correctly it will appear like 'one single' application; but as I said before each instance is running in its own JVM.
Niranjan, I would like to understand better why do you wan to use multiple instances? This will help us to answer you question...
Regards
Tugdual Grall -
Install mulitple instance oracle
Hi,
I have a linux server and i already install Database called X,
now i want to install another 2 instance in the same server and using the same Database so at the end i will have 3 instance called X, X1, X2 on the same server and using the same oracle 10g DB, i know how to do that by using the Database configuration assistance but now i want to do that manually
i already prepare the script for each DB and i am confuse about the patch_profile and it configure that , i really appreciate if you have a documentation about how to do that
Thank you in advanceCheck Administration Guide,
Manually Creating an Oracle Database
http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/create.htm#sthref220 -
Windows service does not startup an instance
In a number of occasions, a Windows service i.e. OracleServiceXYZ (which is set to automatically start instance XYZ) fails to do so and I have to start it manually. The problem is resolved temporarily with ORADIM (i.e. delete and redefine the Windows service) and it all works well until for some unknown reason, one day we bounce the server and the Oracle service does not start (MEMORY REALM DOES NOT EXIST). Am I the only one who is having problems with this?.
No, you're not the only one.
I'm searching for an explanation for this problem too.
One more detail: in all cases we have tracked down, the same machine had 2 instances to start. From time to time only one of them starts, the other fails.
The most I can tell is that the windows event log shows a connect attempt of / without SYSDBA priviledges at reboot time.
It seems that the windows service is trying to start the instance with the wrong connect string from time to time, and of course it fails.
Even stranger is that if you restart the service (which was configured with auto-start at ORADIM) the instance will start normally... very strange.
Please post any solution or info you get on this subject, I'm thinking of submiting a TAR for this.
-jp -
Maintaining sessions in mulitple instance of Oc4J
I have a light weight J2ee application deployed in default "home" of Oc4j .If i have more than 1 instance of Oc4j , then how can i stick my user session always to 1 instance of the oc4j . Right now due to probably load balancing issues , the user request always swaps between both Oc4j instances and I am loosing all session variables in between application.
ThanksAfter reading though lot of article , I consistently find the following :
==============================================
Note:
For a session based request mod_oc4j always directs the request to the original OC4J process which created the session, unless the original OC4J process is not available. In case of failure, mod_oc4j sends the request to another OC4J process with the same island name as the original request (either within same host if available, or on a remote host).
==============================================
If this is the case , then I should get my session attributes over a complete User session . Why am i losing them ?
Thanks -
We have an HP MS6200 MulitSeat PC
It is running Microsoft Windows MultiPoint Server 2011 (which appears to be a tweaked version of Windows 7)
It is set up in a computer lab, and students log in using their shared room account - ie multiple instances of the same user accounts are running on the PC at the same time.
The first student to run Firefox can work with it without problem.
However when another student tries to start firefox they get the following message:
Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system.Thanks for the quick reply.
I managed to get this to work by using:
"C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -profile "%temp%\ffprof" -no-remote
This works because Windows assigns a different temp location for each instance of a user
Thanks for your help -
Mulitple instances of same VI on same machine
is this possible?
if so how?
when i try and open the same vi on my machine it justs goes back to the
previously opened one..D wrote:
: is this possible?
Yes but ...
(1) If your VI has front panel controls
One way is to make a physical copy with a different NAME. I believe
shortcuts may work. You will need to be careful about sub-VIs tho.
I have also fiddled with function nodes but I am not quite sure if those
will work or not
Finally, the best way of doing this is to get the application builder
option and compile the VI. Once that has happened the VIs become
independent and you should be able to run any number of instances of the
executable.
(2) If your VI does not have front panel controls and you just wish to
use the same sun-VI in multiple VIs or multiple parallel instances in the
same VI, there is an execution option "reentrant" that
will allow this.
Rudolf
Maybe you are looking for
-
Error Message when starting Lightroom
When I start Lightroom 3.0 I occasionally get the following error message. My RAW files are read from an external HD that has an automatic spin down "feature" that I can't de-activate. I suspect that may be the source of the problem. Can anyone confi
-
== Issue == Firefox is having problems with certain web sites == Description == I HAVE TO USE ANOTHER BROWER. T5HIS HAPPEN WAY WYWA WAY TOO MUCHN. <blockquote>language cleaned up by a moderator - eh https://support.mozilla.com/en-US/kb/Forum+and+chat
-
Suddenly, I started getting the following error when attempting to play rented or purchased movies on Apple TV with my LG TV. This setup has been working fine for a year. Trailers play fine, just purchased/rented/Netflix movies don't play. Works fine
-
I am writing a program where I am receiving an ETSI LIP string and need to convert it to decimal. I currently don't understand how it is converted. I receive the following in HEX, which coverted to binary for ease, but can't figure out the conversion
-
How to stop process flow?
Hi there. I have oracle 9i + OWB 10.1..2. During last changes on the server (AIX) there was a problem with starting JServer. I didn't seem to be problem until I wanted to user Workflow Monitor. Obviously it didn't work. My question is: how to stop a