Thursday, March 12, 2020

Google Colab Session and keeping that alive

Google colab takes 90 minutes if we close the browser to disconnect the session. 12 hours if we keep the browser open. Additionally, if we close our browser with a code cell is running, if that same cell has not finished, when we reopen the browser it will still be running (the current executing cell keeps running even after browser is closed).
some times we have to keep out loaded data for long time. Usually google colab keeps disconnecting after 30 mins automatically if we do not respond. And our data is lost.
We can prevent this just by running the following code in the console and it will prevent  from disconnecting. Ctrl+ Shift + i to open inspector view . Then go to console.
function ClickConnect(){
console.log("Working"); document.querySelector("colab-toolbar-button#connect").click() } setInterval(ClickConnect,60000)
It would keep on clicking the page and prevent it from disconnecting. It will solve the issue for us.

Wednesday, March 11, 2020

How to reset the Weblogic admin server password


In some case we need to change the weblogic password, and then we can follow the below steps to reset it.

Step 1:

Set the following environment variables (update the domain name    as appropriate):

export FMW_HOME=/u01/app/oracle/product/middleware
export DOMAIN_HOME=$FMW_HOME/user_projects/domains/
export CLASSPATH=$CLASSPATH:$MW_HOME/wlserver_10.3/server/lib/weblogic.jar

NOw we will run the env as shown below.
. $DOMAIN_HOME/bin/setDomainEnv.sh

Step 2:

Need to shut down weblogic domain:
$DOMAIN_HOME/bin/stopWebLogic.sh

Step 3:

Rename and backup the DefaultAuthenticatorInit.ldift file as shown below,

cd $DOMAIN_HOME/security
mv DefaultAuthenticatorInit.ldift DefaultAuthenticatorInit.ldift.old

Now run the following command to generate a new DefaultAuthenticatorInit.ldift file. ((here ‘weblogic’ is default username))

java weblogic.security.utils.AdminAccount .

Note: Don't forget the period "." at the end of the this command, otherwise you will get "Error: Invalid arguments"

Rename and backup the following LDAP directory.

mv $DOMAIN_HOME/servers/AdminServer/data/ldap $DOMAIN_HOME/servers/AdminServer/data/ldap.old
(This ldap directory will be recreated once weblogic server startup time)

Step 4:


Back and Edit the boot.properties file and update the new password. (Above new_password)

cd $DOMAIN_HOME/servers/AdminServer/security
cp boot.properties  boot.properties_old

vi boot.properties
password=
username=

(Note: New password will be encrypted once server starts)

Step 5:


Now start your weblogic domain.

[oracle@appserver01 bin]# cd /root/MW_home/user_projects/domains/base_domain/bin/
[oracle@appserver01 bin]# ls
nodemanager  nohup.out  server_migration  service_migration  setDomainEnv.sh 
startManagedWebLogic.sh  startWebLogic.sh  stopManagedWebLogic.sh  stopWebLogic.sh
[oracle@appserver01 bin]# nohup ./startWebLogic.sh &
[oracle@appserver01 bin]# nohup: appending output to `nohup.out'
[oracle@appserver01 bin]# tail -f nohup.out 

Server state during the startup:
 
 
 
 
 
 

Now we can access your weblogic console page.