IBM Support

Attempts to deploy a stub give "java.io.IOException: Couldn't get lock" error

Troubleshooting


Problem

IBM Rational Integration Tester Agent (RIT-Agent) starting new stubs gives error "java.io.IOException: Couldn't get lock for <logfile location>/RIT-Engine%u-%g.log, maxLocks: 100"

Symptom

Stubs start successfully but cannot create log files.
RIT-Agent log file <RIT-Agent installation>/logs/agent-0-0.log contains an error similar to the following:
[RunTests/instance4 (3)]: Can't load log handler "java.util.logging.FileHandler" [RunTests/instance4 (3)]: java.io.IOException: Couldn't get lock for C:\Program Files\IBM\RIT-Agent/logs/engine-%u-%g.log, maxLocks: 100
[RunTests/instance4 (3)]: java.io.IOException: Couldn't get lock for C:\Program Files\IBM\RIT-Agent/logs/engine-%u-%g.log, maxLocks: 100
[RunTests/instance4 (3)]:       at java.util.logging.FileHandler.openFiles(FileHandler.java:467) 
  ...

Cause

Each RunTests instance runs stubs for a given project and environment.
In later versions of Rational Test Virtualization Server (RTVS), a log file is created for each RunTests process.
When deploying high numbers of stubs that are in differing projects you can cause high numbers of RunTests processes to execute.
See this section of the Knowledge Center documentation for an explanation of this:  Handling many RunTests instances
The default Java limit for log file locks is 100.
In some instances this limit needs to be increased.

Diagnosing The Problem

View the RIT-Agent log file <RIT-Agent installation>/logs/agent-0-0.log

Resolving The Problem

  1. Stop all stubs running on the RIT-Agent in question.
     
  2. Run RIT-Agent Library Manager.
     
  3. Add the following entry with a value of your choice, on its own line to the JVM Arguments section.
    Ensure that the value is larger than the maximum number of required RunTests instances.
     
    -Djdk.internal.FileHandlerLogging.maxLocks=200
    
    
  4. Re-start RIT-Agent and stubs.
     

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSBLXN","label":"IBM Rational Test Virtualization Server"},"Component":"","Platform":[{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"9.2","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
07 January 2019

UID

ibm10794157