Saturday, October 27, 2012

Iceless Arctic in 2014

Just reblogging a post from the excellent Arctic News:

http://arctic-news.blogspot.ch/2012/10/big-changes-in-arctic-within-years.html


The summer 2012 has made it evident that we are in the middle of a free fall. Humanity is heading full speed into the biggest planetary catastrophe in the last 15 million years.

You don't need to do anything, just keep driving cars, flying planes and consume till we die.... very soon, just a matter of years. Hurricanes, droughts, major shortages of food and water will be our immediate future.

Drive, baby, drive like there is no tomorrow. Buy a bigger car, destroy more, eat more meat, drink more coke and buy that new model of SmartPhone. There is no tomorrow. Anthropogenic Global Warming is just a myth, relax and consume more. Burning and consuming is the sole purpose of life.

Monday, October 22, 2012

OSB throttle jms consumption

https://forums.oracle.com/forums/thread.jspa?threadID=2324654
 
"change the Maximum Messages per Session setting to 1 in Connection Factory Client tab" :

"Create a single threaded work manager and associate it with your JMS proxy service:"







Sunday, October 21, 2012

Firefox history

In Firefox, history is kept in a file places.sqlite (see http://kb.mozillazine.org/Viewing_the_browsing_history_-_Firefox )
You can install Firefox sqlite-manager plugin, open Firefox Menu (ALT key), Tools, SQLLite Manager:

https://code.google.com/p/sqlite-manager/wiki/FAQ#I_have_installed_SQLite_Manager,_but_I_cannot_find_how_to_start
The plugin works very well, it can show you the list of hosts that have been accessed. (table moz_hosts).

Saturday, October 20, 2012

Book Review, Curzio Malaparte - "The Skin" and "Kaputt"




Two unique testimonies of the absurdity of war, the hypocrisy of politics, the horror of the human condition of civilians in war times.

The Skin: a tender and moving portrait of the city of Naples in the years of WWII, and the American Army entering in Roma.
Kaputt: chronicles of Finland Romania Ukraine and Italy from a brilliant intellectual who knew personally the most important nazist and fascist personalities of the time.

Friday, October 19, 2012

WebLogic embedded LDAP, Refresh Replica At Startup

When using Whole Server Migration, LDAP files MIGHT not be properly synchronized, and you end up in "Authentication Failed" :

javax.security.auth.login.FailedLoginException: [Security:090304]Authentication Failed: User ser_nesoav2gxs javax.security.auth.login.FailedLoginException: [Security:090302]Authentication Failed: User ser_nesoav2gxs denied
        at weblogic.security.providers.authentication.LDAPAtnLoginModuleImpl.login(LDAPAtnLoginModuleImpl.java:261)

http://docs.oracle.com/cd/E17904_01/web.1111/e13707/ldap.htm

in WebLogic console, go to Domain / Security / Embedded LDAP , there is an option "Refresh Replica At Startup".

Thursday, October 18, 2012

java.io.IOException: [DeploymentService:290066]Error occurred while downloading files from admin server for deployment request "0". Underlying error is: "null"

in OSB we get this stacktrace, and the server starts in ADMIN mode. Root cause is missing .EAR file on some server - and the Admin is unable to redeploy the file, no clue why.
The only way to recover is by stopping the failed deployments (use the script here) and restart the failed server.
OSB will regenerate the EAR and redeploy to all instances in the cluster.

See also http://www.javamonamour.org/2012/06/weblogicmanagementdeploymentexception.html for a possible workaround.

####<Oct 18, 2012 6:37:39 PM CEST> <Error> <Deployer> <hqchnesoa106> <osbpp1ms2> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <0000JdoiDifE4Uk5oz9DiY1GW2xD000002> <1350578259992> <BEA-149205> <Failed to initialize the application '_ALSB_1347537893822' due to error weblogic.management.DeploymentException: Exception occured while downloading files. weblogic.management.DeploymentException: Exception occured while downloading files at weblogic.deploy.internal.targetserver.datamanagement.AppDataUpdate.doDownload(AppDataUpdate.java:43) at weblogic.deploy.internal.targetserver.datamanagement.DataUpdate.download(DataUpdate.java:56) at weblogic.deploy.internal.targetserver.datamanagement.Data.prepareDataUpdate(Data.java:97) at weblogic.deploy.internal.targetserver.BasicDeployment.prepareDataUpdate(BasicDeployment.java:682) at weblogic.deploy.internal.targetserver.BasicDeployment.stageFilesForStatic(BasicDeployment.java:725) at weblogic.deploy.internal.targetserver.AppDeployment.prepare(AppDeployment.java:104) at weblogic.management.deploy.internal.DeploymentAdapter$1.doPrepare(DeploymentAdapter.java:39) at weblogic.management.deploy.internal.DeploymentAdapter.prepare(DeploymentAdapter.java:191) at weblogic.management.deploy.internal.AppTransition$1.transitionApp(AppTransition.java:21) at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:240) at weblogic.management.deploy.internal.ConfiguredDeployments.prepare(ConfiguredDeployments.java:165) at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:122) at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:180) at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:96) at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209) at weblogic.work.ExecuteThread.run(ExecuteThread.java:178) Caused By: java.io.IOException: [DeploymentService:290066]Error occurred while downloading files from admin server for deployment request "0". Underlying error is: "null" at weblogic.deploy.service.datatransferhandlers.HttpDataTransferHandler.getDataAsStream(HttpDataTransferHandler.java:86) at weblogic.deploy.service.datatransferhandlers.DataHandlerManager$RemoteDataTransferHandler.getDataAsStream(DataHandlerManager.java:153) at weblogic.deploy.internal.targetserver.datamanagement.AppDataUpdate.doDownload(AppDataUpdate.java:39) at weblogic.deploy.internal.targetserver.datamanagement.DataUpdate.download(DataUpdate.java:56) at weblogic.deploy.internal.targetserver.datamanagement.Data.prepareDataUpdate(Data.java:97) at weblogic.deploy.internal.targetserver.BasicDeployment.prepareDataUpdate(BasicDeployment.java:682) at weblogic.deploy.internal.targetserver.BasicDeployment.stageFilesForStatic(BasicDeployment.java:725) at weblogic.deploy.internal.targetserver.AppDeployment.prepare(AppDeployment.java:104) at weblogic.management.deploy.internal.DeploymentAdapter$1.doPrepare(DeploymentAdapter.java:39) at weblogic.management.deploy.internal.DeploymentAdapter.prepare(DeploymentAdapter.java:191) at weblogic.management.deploy.internal.AppTransition$1.transitionApp(AppTransition.java:21) at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:240) at weblogic.management.deploy.internal.ConfiguredDeployments.prepare(ConfiguredDeployments.java:165) at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:122) at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:180) at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:122) at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:180) at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:96) at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209) at weblogic.work.ExecuteThread.run(ExecuteThread.java:178) >

WLST to stop and undeploy a list of Deployments


cd /opt/oracle/fmw11_1_1_5/
. ./wlserver_10.3/common/bin/wlst.sh
connect( 'weblogic', 'password', 't3://acme.com:7001')
modulestodelete='_ALSB_1347537896788,_ALSB_1347537898052,_ALSB_1347537898748,_ALSB_1347537899485,_ALSB_1347537900275,_ALSB_1347541839901'
for mymodule in modulestodelete.split(','):
 stopApplication(mymodule)
 undeploy(mymodule)
disconnect()
exit()



Wednesday, October 17, 2012

WebLogic server starting in ADMIN mode, some doubts



ms1 was restarted and went to ADMIN mode.

I can see several error in the logs, first it can’t create a Connection Pool:

Caused By: weblogic.common.ResourceException: weblogic.common.ResourceException: Could not create pool connection. The DBMS driver exception was: Listener refused the connection with the following error:
ORA-12514, TNS:listener does not currently know of service requested in connect descriptor

then it decides to go in Admin Mode:

#### <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <> <> <0000jdahmbme4uk5oz4eyy1gv9za00000h> <1350343196766> brought up in administration state due to failed deployments
.>

but strangely there is still some deployment activity going on:

#### <pippo107> <[ACTIVE] ExecuteThread: '14' for queue: 'weblogic.kernel.Default (self-tuning)'> <> <> <4cea82998b9a2c15:5c6e1c09:13a66b4d85c: -8000-0000000000000112="-8000-0000000000000112"> <1350343231055> <There was an error while making the initial connection to the JMS resource named ALSB_JMS_SessionPool_1750602009 from within an EJB or a servlet. The server will attempt the connection again later. The error was javax.jms.JMSException: [JMSPool:169803]JNDI lookup of the JMS connection factory jms.jndi.cf.CommonOsb.CommonOsbCF failed: weblogic.jndi.internal.AdminModeAccessException: Unable to resolve 'CommonOsbCF'. Resolved 'jms.jndi.cf.CommonOsb'; remaining name ''>

but, VERY STRANGELY, the server still seems to go in RUNNING mode (even if it doesn’t say “server state changed to RUNNING”):

#### <pippo107> <[ACTIVE] ExecuteThread: '19' for queue: 'weblogic.kernel.Default (self-tuning)'> <> <> <4cea82998b9a2c15:5c6e1c09:13a66b4d85c: -8000-0000000000000156="-8000-0000000000000156"> <1350343252905>

and then it goes to ADMIN mode:

#### <pippo107>
<> <> <4cea82998b9a2c15:5c6e1c09:13a66b4d85c: -8000-0000000000002128="-8000-0000000000002128"> <1350343264564>


My main worry is that in this time interval some messages are actually processed, even if most components are not actually set up.


 


Tuesday, October 16, 2012

Proud to be a Jew


and not a fascist criminal.

Sunday, October 14, 2012

BI and ODI

What is Business Intelligence:

Introduction to Oracle ODI:
Part I

Part II

unfortunately the rest is not available unless you register and pay :o(

Installation of ODI 11:



Obertraubling tourist attraction: the Pestkreuz (1520 Pest)

3000 dead (Tote) in Obertraubling for the 1520 Pest. Amazing.

The exact place is this

More info on the Church here.

Friday, October 12, 2012

Beethoven, Symphonies



Saturday, October 6, 2012

Rotating weblogic stdout file

taking some notes here:
https://forums.oracle.com/forums/thread.jspa?threadID=903561
see also Oracle document ID 827438.1 "How to rotate .out ( stdout) log file in weblogic 9.2 (solaris/linux)"

Default location of the file is <domain_name>/servers/<server_name>/logs/server_name.out

The answer is "WebLogic Server cannot set this file to another location than the default. But you can use "symbolic link" on Linux OS to realize this function"

There is a script file wlscontrol.sh declaring a variable OutFile.
A consultant tried to change it but the server started in FAILED mode.

See also:

By default Weblogic wont have options to rotate the *.out file, If you are running in unix or Linux boxes, you can add the following snippet

under /etc/logrotate.conf file append a function to handle *.out files

<<Location of logs directory>>/*.out {
copytruncate
rotate
size=20Mb
}




Shell script, scope of variables

recently I was maintaining shell scripts written in a very sloppy way by a (luckily) gone consultant.
First, the standard way of reading the content of a file in shell scripts is:
counter=0
while read line 
do
   echo $line
   counter=`expr $counter + 1`
done < myfile.txt
echo $counter


For some funny reason (arrogance and ignorance) the consultant had instead written:
cat myfile.txt | while read line 
do
   echo $line
   counter=`expr $counter + 1`
done
echo $counter



The big problem with pipes is that they are executed in a subshell, and they don't access the same variable space of the main shell.... so the above code will always print 0 (zero) as the value of the counter.
No workaround found so far. Just don't use pipes.

Friday, October 5, 2012

Multiple actions/buttons form in HTML

create a form like this:

form name="myform" onsubmit="return onsubmitform();" method="post"

The onsubmitform is something like:

<script type="text/javascript">
function onsubmitform() {
 if (document.pressed == "Purge Messages Selected") {
  document.myform.action = "purgemessages.jsp";
 }
 else {
  alert("unknown action");
 }
 return true;
}
</script>


each "active" control should be like :
<input type="submit" name="operation" onclick = "document.pressed=this.value" value="Purge Messages Selected" title="purgeallmsg" />

the above is a button, but the onclick can apply to anything (radio button...).... actually any event can trigger the submission.

Thursday, October 4, 2012

OSB. version info embedded in a project, and how to query it dynamically

in a project httptest, create a XML Schema "version", whose content is minimal:

<xs:schema><xs:element name="version" id="v1.02"/></xs:schema>

you can retrieve the content of the document with a HTTP GET:

http://hostname:8101/sbresource?SCHEMA/httptest/version

See also http://docs.oracle.com/cd/E23943_01/admin.1111/e15867/project_explorer.htm


In alternative, you can embed the info in a comment:
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema">
<!--version=v1.21 -->
<!--timestamp=20130204154312 -->
<!--deployer=topolino -->
</schema>





Tuesday, October 2, 2012

Parse log files in WLST, print text between 2 strings

When grepping logs, it's often useful to isolate a specific string occurring between 2 other strings, like

Received exception while creating connection for pool "PIPPODataSourceJP": ORA-04031: unable to allocate 32 bytes of shared memory ("shared pool","DATABASESYS","trigger inform","kglhin: temp")
osbpr1do.log00253:ORA-04031: unable to allocate 32 bytes of shared memory ("shared pool","select obj#,type#,ctime,mtim...","sql area","tmp"


I am interested in all the strings like PIPPODataSourceJP, to extract from the logs  a unique list of Datasources failing.

Let's first grep all the lines:

grep ORA-04031 * > /tmp/allora04031.txt


this doesn't work, it prints all the line:
sed -n '/for pool /,/: ORA-04031/p' /tmp/allora04031.txt

All this sed and awk is bullshit.

/opt/oracle/fmw11_1_1_5/wlserver_10.3/common/bin/wlst.sh



import fileinput
start = 'for pool "'
end = '": ORA-04031'

for line in fileinput.input(['/tmp/allora04031.txt']):
    indstart = line.find(start, 0)
    if indstart > 0:
        indend = line.find(end, indstart)
        print line[indstart + len(start):indend]

   
   
   
Here is the doc http://docs.python.org/library/string.html
 




ORA-04031 and the shared pool

We often get this kind of error:

BEA-001129 Received exception while creating connection for pool "PIPPODataSourceASIA": ORA-04031: unable to allocate 32 bytes of shared memory ("shared pool","DATABASESYS","trigger inform","kglhin: temp")
osbpr1do.log00252:ORA-04031: unable to allocate 32 bytes of shared memory ("shared pool","select name,password,datats#...","sql area","tmp")


the SQL statement changes, but the "shared pool" is always the same.

First we need to understand what a "shared pool" is:

http://www.dba-oracle.com/concepts/shared_pool_concepts.htm

the "shared pool" is part of the http://en.wikipedia.org/wiki/Oracle_Database#System_Global_Area

It turns out that the DB parameters had to be tuned. No settings on WebLogic side can fix the issue.

Monday, October 1, 2012

CISCO ACE Load Balancer

Configuration guide is available here:

http://www.cisco.com/en/US/docs/app_ntwk_services/data_center_app_services/ace_appliances/vA3_1_0/configuration/slb/guide/slbgd.pdf

Glossary:

SLB = Server Load Balancer

ACE = Application Control Engine