start oracle weblogic server when system starts - oracle10g

I want to set Oracle weblogic server 10.3.6 to start automatically when my Ubuntu machine starts.
At this moment, I start it from this sh file manually
Oracle > MiddleWare > user_domains > base_domain > bin > startWebLogic.sh

There are many ways to start a process like this... you can use cron or you can use a service in /etc/init.d ... not sure which one you are looking for.
For a super simple /etc/init.d example:
Create /etc/init.d/weblogic_start
Add the following:
su – user -c "/path/to/script/startWebLogic.sh &"
This will start Weblogic every time the machine boots. See other questions like: Start JBoss 7 as a service on Linux

Related

Mongos auto start script for Linux

I have two mongos server in a production environment. I want to start mongos automatically when the server reboots. I tried several options to achieve this, but couldn't. I have three config servers.
This is the easiest way to get it accomplished.
If you are using Linux , it should have 'crontab' installed – a utility which runs cron job.
You need to execute the following command (only once) to automate run of mongos on every start/re-start of your linux machine. Here we are editing the crontab to add a cron job(run script) on every reboot/boot event.
sudo crontab -e
Add a line like this to it:
#reboot /path/to/script
The script should invoke path/to/mongo/bin/mongos -options

Vagrant & Chef - Postgresql not starting on reboot

I decided to create my own chef script to install Postgres. The installation works perfectly fine, but postgres doesn't start on boot when I vagrant reload
Here's my recipes/default.rb:
include_recipe "apt"
apt_repository 'apt.postgresql.org' do
uri 'http://apt.postgresql.org/pub/repos/apt'
distribution node["lsb"]["codename"] + '-pgdg'
components ['main', node["postgres"]["version"]]
key 'http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc'
action :add
end
package 'postgresql-' + node["postgres"]["version"] do
action :install
end
file "/etc/postgresql/#{node['postgres']['version']}/main/postgresql.conf" do
action :delete
end
link "/etc/postgresql/#{node['postgres']['version']}/main/postgresql.conf" do
to node["postgres"]["conf_path"]
action :create
notifies :reload, "service[postgresql]", :delayed
end
service "postgresql" do
action [:enable, :start]
supports :status=>true, :restart=>true, :start => true, :stop => true, :reload=>true
end
And here's my attributes/default.rb:
default["postgres"]["version"] = "9.3"
default["postgres"]["conf_path"] = "/home/vagrant/postgres/postgresql.conf"
Any help would be greatly appreciated!!
============ EDIT 1 ============
Here is the output when running vagrant up for the first time with chef.log_level = :debug: http://pastebin.com/w8Lp8gzv
Here is /etc/init.d/postgresql: http://pastebin.com/dQ5Zb1yj
Here is /var/log/postgresql/postgresql-9.3-main.log: http://pastebin.com/0Y2RhWvL
============ EDIT 2 ============
I'm now fairly confident that it's my postgresql.conf file, which looks like: http://pastebin.com/rjX89iU0
shared_buffers might be too high...
When you run vagrant reload, is the Chef Client running? I suspect not. Mitchell changed the behavior in a recent version of vagrant to only provision if the machine hasn't already been provisioned. This information is stored in the .vagrant directory in your working directory. In short, since you already provisioned your machine with vagrant up, it is not provisioned when you run vagrant reload.
You run vagrant up - this is actually going to run vagrant up --provision, which executes the Chef Client provisioner on the node, executing your Chef Recipe.
You run vagrant reload - this actually runs vagrant up --no-provision, because the .vagrant. directory indicates the machine has already been provisioned. So your machine is rebooted, but the Chef Client provisioner is not executed.
Solution
Run vagrant reload with the --provision flag
vagrant reload --provision
Notes
This still doesn't explain why upstart (or whatever you're using to ensure the postgres service is running at boot) isn't starting the server for your automatically. In order to answer that question, I'll need to see more information. Can you set the chef.log_level = :debug in your Vagrantfile and update your question with the output? It would also be helpful to see the init.d script this postgres installer creates, and any log output from /var/log related to postgres.
Alright, it looks like Postgresql doesn't play nice with postgresql.conf being a symbolic link. Copying the file instead did the trick.
Turns out the postgresql was starting before the postgersql.conf file was mounted
If you're starting services with Upstart that depend on something in Vagrant's shared folders, have your upstart conf file listen for the vagrant-mounted event.
# /etc/init/start-postgresql.conf
start on vagrant-mounted
script
# commands to start postgresql...
end script
The vagrant-mounted event is emitted after Vagrant is done setting up shared folders, this way you can restart dependent services after vagrant reload without having to run your provisioners again.

Avoid a GUID refresh in OBIEE

I am unable to login to Answers (/analytics) after every time I deploy the metadata repository of OBIEE using Enterprise manager, on Linux. It works after I refresh the GUIDs. Is there a way to avoid refreshing GUIDs?
Open the rpd offline before deployment, Goto Manage -> Identity->users
Check if your users are there in the rpd, if so remove them. Now deploy your rpd on your target instance. This should go fine. You wont have to reset GUIDs...
Cheers,
RamC
Yes there is.
Stop BI Server
opmnctl stopproc ias-component=coreapplication_obis1
Backup the original repository
cp repository1.rpd repository2.rpd
Modify repository1.rpd on a Windows machine and copy it back to the Linux machine running OBIEE
Start BI Server
opmnctl startproc ias-component=coreapplication_obis1
Stop Services in Linux:
1.Stop opmnctl
Navigate to /instances/instance1/bin
./opmnctl stopall
2.Stop Managed Server (bi_server1)
Navigate to /user_projects/domains/bifoundation_domain/bin
./stopManagedWebLogic.sh bi_server1
3.Stop Admin Server (weblogic)
in the same above location
./stopWebLogic.sh
4.Stop Node manger
Just kill the Node Manager process
ps -ef|grep node –to find nodemanger pid
kill -9
Note: If Managed and Admin server not stopped properly ,you can kill same way like above
ps -ef|grep weblogic
kill -9
Start Services:
======================
1.Start Node Manager
Navigate to /wlserver_10.3/server/bin
nohup sh startNodeManager.sh &
2.Start Admin Server
Navigate to /user_projects/domains/bifoundation_domain/bin
nohup sh startWebLogic.sh -Dweblogic.management.username=weblogic -Dweblogic.management.password=weblogic123 > admin_server.log &
Tip: you can check log using tail command
tail -f admin_server.log
ctrl-z or ctrl-c to exit log window
3.Start Managed Server (bi_server1)
In the same above location
nohup sh startManagedWebLogic.sh bi_server1 http:// managed_server.log &
Start opmnctl
Navigate to /instances/instance1/bin
./opmnctl startall

Can't stop or restart JBoss AS 4.2.3 as a service in Fedora

i have a little issue with a Jboss AS 4.2.3 . I'm developing an application in Seam so i'm using Jboss as server. In the client company they have a Jboss AS 4.2.3 installed on Fedora and configured as a service, so it starts automatically on boot machine with PostgreSQL. So, if i run chkconfig --list i can see Jboss here as a service.
But the problem is when i try to restart, stop or start this service (i have root permissions) using this command:
service jboss stop/restart
But i don't know what happens that looks like it doesn't find the Jboss AS instance that's running because i get this message:
JOBSS_CMD_START = cd /opt/java/jboss/bin; /opt/java/jboss/bin/run.sh -c default
No JBossas is currently running
But it's running because if i enter localhost:8080 on a browser it loads the Jboss page. The server admin of the company doesn't know also why the service can't restart or stop or start and only i know that he followed this tutorial to install and configure JBoss AS:
thewiki4opentech.org/index.php/How_to_install_JBoss_AS_in_CentOS_/RedHat/_Fedora
Also, i tried with
/etc/init.d/jboss stop
And i get the same output. If i use
/opt/java/jboss/bin/start.sh -c default
It tries to start a second instance of Jboss AS but it gives me errors because is trying to use the same ports as already started Jboss instance.
And it's difficult to me because i'm connecting remotely using Teamviewer and i want to deploy an EAR but i can't because i can't restart the service to extract the ear. So i wanna ask you for help if you know why the Jboss AS that's running can't be stopped or started using service jboss stop.
As aditional info, i'm using the config to access Jboss apps from other machines (using 0.0.0.0) and the server has a static IP. The config of my hosts file is this:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
192.168.1.106 entertechserver.localdomain entertechserver
#::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
Regards.
Well, i think that i found the answer. The server admin copy the script run.sh to /etc/init.d/ but we saw that there's another script named jboss_init_redhat.sh that i think is optimized for redhat/fedora systems, so we used this script to copy to /etc/init.d/ and it works!! Now when i stop it gives me the next output:
JBOSS_CMD_START = cd /opt/java/jboss/bin; /opt/java/jboss/bin/run.sh -c default -b 0.0.0.0
waiting for processes to stop
Really i haven't seen the difference between both scripts yet but it will be intersting to take a look.
Regards.

jboss-5.1.0.GA auto start on boot

I was given the task of installing jboss-5.1.0.GA on a remote ubuntu 10.4 Lts server. With all those resources out there I was able to run jboss successfully but my problem was that I wasn't able to get auto start on boot work so that jboss would be running on the server.
I followed a couple of tutorials that said me create a separate user called jboss and to copy the jboss_init_Redhat.sh to the /etc/init.d/jboss (jboss home, java path ,jboss user and the binding to 0.0.0.0 is all set) and used /etc/init.d/jboss start
but I can't get to see the Jboss page at the Ip on a browser.,
If i do a ./run.sh -b 0.0.0.0 ==> the server is up ...
Can some body shed some light on this issue????
If you want to run JBoss AS on given interface using jboss_init_redhat.sh script look at these line:
#if JBOSS_HOST specified, use -b to bind jboss services to that address
JBOSS_BIND_ADDR=${JBOSS_HOST:+"-b $JBOSS_HOST"}
You should just define new variable before these line:
JBOSS_HOST="0.0.0.0"
You should also check shutdown command (especially when you run your server on some other address then 127.0.0.1 or 0.0.0.0), it should know how to find your server:
JBOSS_CMD_STOP=${JBOSS_CMD_STOP:-"java -classpath $JBOSSCP org.jboss.Shutdown --shutdown -s jnp://${JBOSS_HOST}:1099"}