My Oracle Support Banner

EMCLI Fails with Errors: Some required configuration is missing.. (EM 12c) or Java.io.IOException: No Locks Available (EM 11g) (Doc ID 1480978.1)

Last updated on APRIL 14, 2017

Applies to:

Enterprise Manager Base Platform - Version 11.1.0.1 to 12.1.0.5.0 [Release 11.1 to 12.1]
Information in this document applies to any platform.

Symptoms

Enterprise Manager (EM) 12c Cloud Control emcli
Enterprise Manager 11g Grid Control emcli

 

The EM  emcli utility uses this command for setup prior to use:  emcli setup -url="https://oms.hostname:7799/em" -user=sysman

However, running this command fails with the following session errors:

For 11.1

java.util.logging.ErrorManager: 0
java.io.IOException: No locks available
  at sun.nio.ch.FileChannelImpl.lock0(Native Method)
  at sun.nio.ch.FileChannelImpl.lock(FileChannelImpl.java:842)
  at java.nio.channels.FileChannel.lock(FileChannel.java:860)
  at oracle.sysman.emCLI.Logging$MyFileHandler.publish(Logging.java:104)
  at java.util.logging.Logger.log(Logger.java:458)
  at java.util.logging.Logger.doLog(Logger.java:480)
  at java.util.logging.Logger.log(Logger.java:569)
  at oracle.sysman.emCLI.CLIController.go(CLIController.java:318)
  at oracle.sysman.emCLI.CLIController.main(CLIController.java:148)
Error: Some required configuration is missing, corrupt, inaccessible, or insecure (access permissions are too liberal).
Resolve the problem and run setup.
java.io.IOException: No locks available
  at sun.nio.ch.FileChannelImpl.lock0(Native Method)
  at sun.nio.ch.FileChannelImpl.lock(FileChannelImpl.java:842)
  at oracle.sysman.emCLI.Utility.lockFile(Utility.java:407)
  at oracle.sysman.emCLI.CLIController.go(CLIController.java:275)
  at oracle.sysman.emCLI.CLIController.main(CLIController.java:148)

 

For 12.1.0.X

Error: Some required configuration is missing, corrupt, inaccessible, or insecure (access permissions are too liberal).
Resolve the problem and run setup.

 

TROUBLESHOOTING:

cd $HOME/.emcli
ls –ltr

This will show you the file which emcli is trying to lock
Example: .homelock

Run a simple java program:

1. Create a file called TestLock.java in the $HOME/.emcli directory with this content:

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;

public class TestLock
{
  public static void main(String[] args)
  {
   try
   {
    File f = new File(".homelock");
    f.createNewFile();
    FileOutputStream fos = new FileOutputStream(f);
    fos.getChannel().lock();
    }
    catch (IOException e)
    {
        e.printStackTrace();
    }
  }
}

 

Note:

The java file is available for download as an attachment in this document.
The file used here as an example is .homelock
File f = new File(".homelock");
If the lock file in the .emcli is different, please use that filename for your troubleshooting

 

2. Compile the program
javac TestLock.java

This will create a TestLock.class file

3. Execute the program (example):

java TestLock
java.io.IOException: No locks available
at sun.nio.ch.FileChannelImpl.lock0(Native Method)
at sun.nio.ch.FileChannelImpl.lock(FileChannelImpl.java:887)
at java.nio.channels.FileChannel.lock(FileChannel.java:876)
at TestLock.main(TestLock.java:14)

 

 

Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.