Tuesday, March 12, 2019

jython-modules.jar/Lib/socket.py", line 338,in gethostname gaierror: (20001, 'getaddrinfo failed')

Failed on while creating a domain Security Processing. 


ERROR Logs:

2019-03-12 21:27:54,853 SEVERE [85] com.oracle.cie.domain.progress.AbstractProgressGenerator - Error occurred in phase {Security Processing} execution.

Traceback (innermost last):

  File "<iostream>", line 43, in ?

  File "/app/middleware/wlserver/common/wlst/modules/jython-modules.jar/Lib/socket.py", line 338, in gethostname

gaierror: (20001, 'getaddrinfo failed')

        at org.python.core.Py.makeException(Py.java:1163)

        at socket$py.gethostname$37(/app/middleware/wlserver/common/wlst/modules/jython-modules.jar/Lib/socket.py:338)

        at socket$py.call_function(/app/middleware/wlserver/common/wlst/modules/jython-modules.jar/Lib/socket.py)

        at org.python.core.PyTableCode.call(Unknown Source)

        at org.python.core.PyTableCode.call(Unknown Source)

        at org.python.core.PyFunction.__call__(Unknown Source)

        at org.python.core.PyObject.invoke(Unknown Source)

        at org.python.pycode._pyx31.f$0(<iostream>:43)

        at org.python.pycode._pyx31.call_function(<iostream>)

        at org.python.core.PyTableCode.call(Unknown Source)

        at org.python.core.PyCode.call(Unknown Source)

        at org.python.core.Py.runCode(Py.java:1226)

        at org.python.util.PythonInterpreter.execfile(Unknown Source)

        at org.python.util.PythonInterpreter.execfile(Unknown Source)

        at com.oracle.cie.domain.script.ScriptHelper.executeEmbeddedTemplateScript(ScriptHelper.java:1766)

        at com.oracle.cie.domain.DomainChecker.executeEmbeddedScript(DomainChecker.java:1924)

        at com.oracle.cie.domain.DomainChecker.runCustomWLSTScript(DomainChecker.java:1906)

        at com.oracle.cie.domain.DomainChecker.preprocessOutput(DomainChecker.java:113)

        at com.oracle.cie.domain.progress.domain.generation.DomainSecurityPhase.execute(DomainSecurityPhase.java:53)

        at com.oracle.cie.domain.progress.AbstractProgressGenerator.run(AbstractProgressGenerator.java:94)

        at java.lang.Thread.run(Thread.java:748)


Solution:

  1. Type hostname on server 
  2. sudo su root
  3. vi /etc/hosts
  4. Change from --> 127.0.0.1 localhost locahost.localdomain localhost4 localhost4.localdomain4
  5. To --> 127.0.0.1 HostName HostName.localdomain localhost4 localhost4.localdomain4
  6. ex- 127.0.0.1 OIG OIG.localdomain localhost4 localhost4.localdomain4



-Arihant

Monday, March 11, 2019

oracle.iam.oimupgrade.exceptions.OIMUpgradeException: Error in running target :migrateJazn-unix

Error while running OIM Post Patching script : sh patch_oim_wls.sh

ERROR Logs:

[java] INFO: buffer : migrateSecurityStore.py -type policyStore -dst default -configFile /app/oracle/middleware/Oracle_IDM1/server/patching/policiestomigrate/jps-config-jse_patching.xml -src jazn-data-oim.xml
[java] oracle.iam.oimupgrade.exceptions.OIMUpgradeException: Error in running target :migrateJazn-unix
[java]     at oracle.iam.oimupgrade.standalone.utils.AntUtil.runTargetWithNoProcessing(AntUtil.java:150)
[java]     at oracle.iam.oimupgrade.standalone.utils.OfflineUpgradeUtil.migrateSecurityStore(OfflineUpgradeUtil.java:813)
[java]     at oracle.iam.oimupgrade.standalone.utils.OfflineUpgradeUtil.migrateJAZN(OfflineUpgradeUtil.java:760)
[java]     at oracle.iam.patching.authz.AuthzPolicyMigration.migrateJaznFilesToPolicyStore(AuthzPolicyMigration.java:149)
[java]     at oracle.iam.patching.authz.AuthzPolicyMigration.main(AuthzPolicyMigration.java:99)
[java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[java]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[java]     at java.lang.reflect.Method.invoke(Method.java:606)
[java]     at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:217)
[java]     at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:152)
[java]     at org.apache.tools.ant.taskdefs.Java.run(Java.java:764)
[java]     at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:218)
[java]     at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:132)
[java]     at org.apache.tools.ant.taskdefs.Java.execute(Java.java:105)
[java]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
[java]     at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
[java]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

[java]     at java.lang.reflect.Method.invoke(Method.java:606)

Solution:

1) Open file $WL_HOME/server/lib/weblogic.policy for edit

2) Search for the string For standard extensions directories and add after the comment and before the grant codeBase "file:/opt/oracle/Middleware/wlserver_10.3/common/lib/ext/*" { the following grant:

grant codeBase "file:/opt/oracle/Middleware/patch_wls1036/patch_jars/*" {

  permission java.security.AllPermission;
};

Once the change done , restart the weblogic servers and rerun sh patch_oim_wls.sh

-Arihant

java.security.AccessControlException: access denied ("javax.management.MBeanTrustPermission" "register")

Error while running OIM Post Patching script : sh patch_oim_wls.sh

ERROR Logs:

[oracle@oracle bin]$ tail -f patch_oim_wls.log
tail: cannot open ‘nohup.out’ for reading: No such file or directory
==> patch_oim_wls.log <==
     [java] Mar 11, 2019 2:02:47 PM oracle.iam.oimupgrade.standalone.utils.WriteLog writeMessage
     [java] INFO: Updating the JPS Config File
     [java] Mar 11, 2019 2:02:48 PM oracle.iam.oimupgrade.standalone.utils.WriteLog writeMessage
     [java] INFO: Update of JPS Config Complete
     [java] Mar 11, 2019 2:02:48 PM oracle.iam.oimupgrade.standalone.utils.WriteLog writeMessage
     [java] INFO: Policy Backup Required :: false
     [java] Mar 11, 2019 2:02:48 PM oracle.iam.oimupgrade.standalone.utils.WriteLog writeMessage
     [java] INFO: AuthorizationMAPIUtil : JPS COnfig Location:/app/oracle/middleware/Oracle_IDM1/server/patching/policiestomigrate/jps-config-jse_patching.xml
     [java] Mar 11, 2019 2:02:48 PM oracle.iam.oimupgrade.standalone.utils.WriteLog writeMessage
     [java] INFO: AuthorizationMAPIUtil : Domain Home  Location:/app/oracle/middleware/user_projects/domains/base_domain
     [java] Mar 11, 2019 2:02:51 PM oracle.jdbc.driver.OracleDriver registerMBeans
     [java] WARNING: Error while registering Oracle JDBC Diagnosability MBean.
     [java] java.security.AccessControlException: access denied ("javax.management.MBeanTrustPermission" "register")
     [java]     at java.security.AccessControlContext.checkPermission(AccessControlContext.java:372)
     [java]     at java.lang.SecurityManager.checkPermission(SecurityManager.java:585)

Solution:

Add the following lines to java.policy file under $JAVA_HOME/jre/lib/security and re-run the script.

grant {
permission javax.management.MBeanTrustPermission "register";
};

-Arihant