Saturday, July 19, 2014

OID11G: Disabling LDAP NULL BASE SEARCH or how to disable ldapbind into OID.

Simple but very helpful article.


1)I always like to do it by command line as below:

ldapbind -h leonciohost -p 3060 -D cn=orcladmin
Result: bind successful


This above means the bind feature is enable.

If you look into this parameter below:

ldapsearch -p 3060 -b "cn=oid1,cn=osdldapd,cn=subconfigsubentry" -s base "objectclass=*" orclanonymousbindsflag -D cn=orcladmin -q
orclanonymousbindsflag=1

0 is disallow
1 is enabled
2 is disallow except for Read Access o the root DSE



So, you have to change this parameter thru ldapmodify as below:
...
orclanonymousbindsflag
...

command:

ldapmodify -p 3060 -D cn=orcladmin -w leonciopwd << EOF
dn: cn=oid1,cn=osdldapd,cn=subconfigsubentry
changetype: modify
replace: orclanonymousbindsflag
orclanonymousbindsflag: 0
EOF



ldapsearch -p 3060 -b "cn=oid1,cn=osdldapd,cn=subconfigsubentry" -s base "objectclass=*" orclanonymousbindsflag -D cn=orcladmin -q
orclanonymousbindsflag=0

This means anonymous bind is now disallow


2) But you can also do it by EM as below:

a. Navigate to "Identity and Access' -> oid1
b. Click on 'Oracle Internet Directory' and select 'Administration' -> 'Server Properties'
c. Switch 'Anonymous Bind' from 'Allows' to 'Disallow except for Read Access on the root DSE' or 'Disallow'
d. Click 'Apply'






I hope this helps you,
Thiago Leoncio.

Sunday, July 6, 2014

OAM 11G Troubleshooting session: "AMInitServlet" failed to preload on startup in Web application: "oam". java.lang.ExceptionInInitializerError

Hello everyone,

   today I was installing my OAM environment and I had a very interesting issue that I would like to share into my troubleshooting article.

After finish my domains creation and Start AdminServer and OAM managed Server I received this issue below:

<BEA-000628> <Created "1" resources for pool "oamDS", out of which "1" are available and "0" are unavailable.>
####<Jul 05, 2014 2:35:56 PM EDT> <Error> <HTTP> <oam1.domdaman.intra> <WLS_OAM1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <0000KSmQ^QF9DgYjLpuHOA1Jkmq2000002> <1405300164014> <BEA-101216> <Servlet: "AMInitServlet" failed to preload on startup in Web application: "oam".
java.lang.ExceptionInInitializerError
  at oracle.security.am.engines.sso.adapter.AbstractSessionAdapterImpl.checkAndInit(AbstractSessionAdapterImpl.java:92)
  at oracle.security.am.engines.sso.adapter.AbstractSessionAdapterImpl.<init>(AbstractSessionAdapterImpl.java:75)
  at oracle.security.am.engines.sso.adapter.MultipleUserSessionAdapterImpl.<init>(MultipleUserSessionAdapterImpl.java:56)
  at oracle.security.am.engines.sso.adapter.MultipleUserSessionAdapterImpl.<clinit>(MultipleUserSessionAdapterImpl.java:45)
  at oracle.security.am.engines.sso.adapter.SessionManagementAdapterFactory.getAdapter(SessionManagementAdapterFactory.java:46)
  at oracle.security.am.engines.enginecontroller.SSOEngineController.processEvent(SSOEngineController.java:497)
  at oracle.security.am.controller.MasterController.processEvent(MasterController.java:568)
  at oracle.security.am.controller.MasterController.processRequest(MasterController.java:757)
  at oracle.security.am.controller.MasterController.process(MasterController.java:680)
  at oracle.security.am.pbl.transport.http.AMInitServlet.initializeAmServer(AMInitServlet.java:137)
  at oracle.security.am.pbl.transport.http.AMInitServlet.init(AMInitServlet.java:79)
  at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283)
  at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
  at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
  at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64)


It took a lot of time to realize that my server was not starting properly because of a related multicast issue that is described into this WLS document:

So, what is the fix?

You have 2 possibilities to fix this:
1)-Djava.net.preferIPV4stack=true as WLS document describe below:

2)Or force to not be IPV6 with -Djava.net.preferIPV6=false option





Once your wls server recognize that you are using the proper IPV(Internet Protocol Version). This will make the OAM deployment to go thru and your managed server you start successfully.

I hope this helps you and don't make you loose time as I did,
Thiago Leoncio.