Monday, February 24, 2020

Oracle Cloud changes /etc/hosts after reboot


Symptoms: 
You have your Linux /etc/hosts configured correctly and after a reboot, the Cloud removes the line where your hostname was set. So the questions is how to permanently change the hostname of an Oracle Cloud Infrastructure (OCI) compute instance?

Cause: 
If any aplication that looks for the physical hostname to start, an example is Weblogic, the start process will hang due to the missing entry on /etc/hosts

Solution:
As given on the MOS Doc ID 2325469.1, by design, changes made in the /etc/hosts and resolve.conf files revert to their original values, after an instance restart.

To stop reverting this changes, edit the oci configuration file for hostnames as given below to update the needed value to 2.
    vi /etc/oci-hostname.conf
    PRESERVE_HOSTINFO=2

Reboot the instance and check.

Tuesday, January 7, 2020

ORA-01017: invalid username/password; logon denied with sqlnet.authentication_services

Symptoms: 
When tyring to login on the db instance using sqlplus / as sysdba, gets ORA-01017: invalid username/password; logon denied.

Cause: 
Operating system authentication may have been deliberately disabled.


Solution:
Look at the sqlnet.ora file located at $ORACLE_HOME/network/admin and check the value of parameter sqlnet.authentication_services.

If you get the operating system authentication disabled, this parameter is set with the value:
#SQLNET.AUTHENTICATION_SERVICES = (NONE)

If you want to allow connection using operating system authentication, remove or comment out the line:
#SQLNET.AUTHENTICATION_SERVICES = (NONE)

Wednesday, November 6, 2019

Open Oracle Forms via application raises FRM-93652


Symptoms:
When opening a Forms through the application, it raises an error with no details such as:
FRM-93652: The runtime process has terminated abnormally.

Cause: 
This is very generic error and might be lots of things.
But a possible reason is a problem to open the compiled .fmx form.

Solution:
When raised the issue to open the form, an error message is written on the Forms log files.
The one that has more details is formsapp-diagnostic.log and the message is similar to this:

[2019-11-05T17:12:38.913-02:00] [WLS_FORMS] [ERROR] [FRM-93656] [oracle.forms.servlet] [tid: 82] [userId: <anonymous>] [ecid: 0000MswyvBTESOGayx3j6G1Thhj80004Tb,0] [APP: formsapp#11.1.2] [FORMS_SESSION_ID: WLS_FORMS.formsapp.104] [SRC_CLASS: oracle.forms.servlet.RunformProcess] [SRC_METHOD: fromFrmwebToODL] Runtime process 7603 is terminating due to signal 11.
[2019-11-05T17:12:38.913-02:00] [WLS_FORMS] [NOTIFICATION] [FRM-93658] [oracle.forms.servlet] [tid: 82] [userId: <anonymous>] [ecid: 0000MswyvBTESOGayx3j6G1Thhj80004Tb,0] [APP: formsapp#11.1.2] [FORMS_SESSION_ID: WLS_FORMS.formsapp.104] [SRC_CLASS: oracle.forms.servlet.RunformProcess] [SRC_METHOD: fromFrmwebToODL] Stack trace for runtime process 7603 is being written to file <WLS-dir>/asinst_1/FormsComponent/forms/trace/frmweb_dump_7603.

If opening via menu application, firstly you have to identify which form name is getting the error.
And then just compile the form and test later.

frmcmp_batch.sh userid=$UP module_type=form module=yourform.fmb

Leave your comment if you found other solutions.

Wednesday, October 16, 2019

Oracle 12c R2+ with ORA-28040: No matching authentication protocol

Symptoms: 

When trying to connect to an Oracle Instance 12c Release 2 onwards via client connection the error is presented:
ORA-28040: No matching authentication protocol


Cause: 
This problem was encountered on database instances version 12.2+ and clients with version 11.2.0.1.
This error indicates a compatibility problem between the authentication protocol used on the client side and the server side.
The authentication protocol used on the server side depends on the SQLNET.ALLOWED_LOGON_VERSION_SERVER parameter in the sqlnet.ora file.


Solution:
You can follow one of the options below:

Option 1:
Upgrade to an Oracle client version that is compatible with the default value of the SQLNET.ALLOWED_LOGON_VERSION_SERVER parameter.

or

Option 2:
Stay in the current version of the client, but in this case you must:
On the server-side, edit the sqlnet.ora file and add the following directive:

SQLNET.ALLOWED_LOGON_VERSION_SERVER = 11

Once done restart the instance, the database no longer excludes the use of 10G password.
Reset the password of the accounts you are trying to connect from the 11.2.0.1 client, reusing the same password.

alter user XXX identified by Your_Pwd;

Validate the value of the field PASSWORD_VERSIONS has been modified for the accounts in question (change from "11G 12C" to "10G 11G 12C").

SQL> select username, password_versions from dba_users;

You can try to connect form the 11.2.0.1 client and it supposed to work.


Wednesday, September 25, 2019

WLS AdminServer Startup Failing With "The Object Identified By: '31' Could Not Be Found"

SYMPTOMS
WLS AdminServer startup failing with "The object identified by: '31' could not be found"
It applies for Oracle WebLogic Server - Version 10.3.6 and later


<Error> <Configuration Management> <BEA-150000> <An error occurred while establishing a connection back to the adminstration server t3://IP:XXX during startup. Since bootstrap succeeded check that t3://IP:XXX uniquely identifies the administration server.
javax.naming.ServiceUnavailableException [Root exception is java.rmi.NoSuchObjectException: The object identified by: '31' could not be found.  Either it was has not been exported or it has been collected by the distributed garbage collector.]
at weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:70)
at weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:32)
at weblogic.jndi.WLInitialContextFactoryDelegate.toNamingException(WLInitialContextFactoryDelegate.java:792)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialReference(WLInitialContextFactoryDelegate.java:431)
at weblogic.jndi.Environment.getInitialReference(Environment.java:245)
Truncated. see log file for complete stacktrace
Caused By: java.rmi.NoSuchObjectException: The object identified by: '31' could not be found.  Either it was has not been exported or it has been collected by the distributed garbage collector.
at weblogic.rmi.internal.OIDManager.getServerReference(OIDManager.java:251)
at weblogic.rmi.extensions.server.ServerHelper.getLocalInitialReference(ServerHelper.java:476)
at weblogic.rmi.extensions.StubFactory.getStub(StubFactory.java:131)
at weblogic.rmi.extensions.StubFactory.getStub(StubFactory.java:124)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialReference(WLInitialContextFactoryDelegate.java:427)
Truncated. see log file for complete stacktrace

 <Critical> <WebLogicServer> <BEA-000362> <Server failed. Reason: 

There are 1 nested errors:

javax.naming.ServiceUnavailableException [Root exception is java.rmi.NoSuchObjectException: The object identified by: '31' could not be found.  Either it was has not been exported or it has been collected by the distributed garbage collector.]
at weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:70)
at weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:32)
at weblogic.jndi.WLInitialContextFactoryDelegate.toNamingException(WLInitialContextFactoryDelegate.java:792)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialReference(WLInitialContextFactoryDelegate.java:431)
at weblogic.jndi.Environment.getInitialReference(Environment.java:245)
at weblogic.server.channels.RemoteChannelServiceImpl.registerInternal(RemoteChannelServiceImpl.java:174)
at weblogic.server.channels.RemoteChannelServiceImpl.registerForever(RemoteChannelServiceImpl.java:147)
at weblogic.protocol.ConnectMonitorFactory.registerForever(ConnectMonitorFactory.java:88)
at weblogic.management.provider.MSIService.registerForReconnectToAdminServer(MSIService.java:174)
at weblogic.management.mbeanservers.compatibility.internal.CompatibilityMBeanServerService.start(CompatibilityMBeanServerService.java:154)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:263)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
Caused by: java.rmi.NoSuchObjectException: The object identified by: '31' could not be found.  Either it was has not been exported or it has been collected by the distributed garbage collector.
at weblogic.rmi.internal.OIDManager.getServerReference(OIDManager.java:251)
at weblogic.rmi.extensions.server.ServerHelper.getLocalInitialReference(ServerHelper.java:476)
at weblogic.rmi.extensions.StubFactory.getStub(StubFactory.java:131)
at weblogic.rmi.extensions.StubFactory.getStub(StubFactory.java:124)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialReference(WLInitialContextFactoryDelegate.java:427)
... 9 more


 <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FAILED> 
 <WebLogicServer> <BEA-000383> <A critical service failed. The server will shut itself down> 
<WebLogicServer> <BEA-000365> <Server state changed to FORCE_SHUTTING_DOWN



CAUSE
Weblogic admin server listener address was empty,
<listen-address></listen-address>



SOLUTION
Implement the below fix,

1. Go to $DOMAIN_HOME/config/config.xml file
2. Edit config.xml and set valid listen-address for admin server.
<listen-address></listen-address>
3. Restart the server.

It can also be changed via Console, such as below:



Based on the Oracle Support ID: 2572710.1


Wednesday, September 18, 2019

Weblogic startup error: ERROR: transport error 202: bind failed: Address already in use

Symptoms: 
You try to start up the managed-server on Weblogic, but gets error such as this:

ERROR: transport error 202: bind failed: Address already in use
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [../../../src/share/back/debugInit.c:750]
FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
/u01/ofm/10.3.6-RSB/WLS/user_projects/domains/RSB/bin/startWebLogic.sh: line 180: 11471 Aborted                 (core dumped) ${JAVA_HOME}/bin/java ${JAVA_VM} ${MEM_ARGS} -Dweblogic.Name=${SERVER_NAME} -Djava.security.policy=${WL_HOME}/server/lib/weblogic.policy ${JAVA_OPTIONS} ${PROXY_SETTINGS} ${SERVER_CLASS}
<Sep 18, 2019 6:05:36 PM> <FINEST> <NodeManager> <Waiting for the process to die: 11418>
<Sep 18, 2019 6:05:36 PM> <INFO> <NodeManager> <Server failed during startup so will not be restarted>
<Sep 18, 2019 6:05:36 PM> <FINEST> <NodeManager> <runMonitor returned, setting finished=true and notifying waiters>


Cause: 
The main part of the error message is this: Address already in use.
And the explanation is that you might have multiple managed server's configured in a single domain running on same debug port, it gives the below error while starting a managed server


Solution:
1) Disable the debugFlag in setDomainEnv.sh file

Take backup of  <DOMAIN_HOME>/<DOMAIN_NAME>/bin/setDomainEnv.sh
Modify the debugFlag="true" to debugFlag="false" in setDomainEnv.sh

This will disable the debug and will solve the issue.
But if you want to keep enabled the debug option, so you have to change the debug port as given below:

2) Give different debug port for all the managed servers

Take backup of  <DOMAIN_HOME>/<DOMAIN_NAME>/bin/setDomainEnv.sh
Add the below lines for all the managed server in setDomainEnv.sh

if [ "${SERVER_NAME}" = "soa_server1" ] ; then
   DEBUG_PORT="7453"
   export DEBUG_PORT
   
 if [ "${SERVER_NAME}" = "osb_server1" ] ; then
   DEBUG_PORT="7454"
   export DEBUG_PORT

Here it will take different value of debug ports while starting, hence will not give the address already in use error.
After that bounce the Weblogic.

Thursday, September 12, 2019

Error while running VMWare on Linux - gcc was not found

Symptoms: 
When installed and running for the first time it shows errors with gcc and headers.
The presented error is such: VMware kernel module: a compatible version of gcc was not found

Cause: 
When the Linux installed, it may be chosen the minimal installation and many development linux library are not installed.
Those libs are required for VMWare Workstation/Player to compile and run the app.


Solution:
Install the libs according the version of your Linux:
- Debian based
  apt-get install build-essential
 
- Red Hat based
  yum groupinstall 'Development Tools'


Another error that might show during the first launch is:
Cannot open /dev/vmmon: No such file or directory"
And the solution for this error is described on the VMWare KB:
https://kb.vmware.com/s/article/2146460

Hope this help.

Configure the Oracle DB Access Control List to avoid error like ORA-24247: network access denied

Symptoms:  You try to make external connections from the Oracle Database and receive erros like ORA-24247: network access denied by access c...