Question & Answer
Question
What can I do to stop message JVMSHRC020E from occurring after a system IPL? I am running z/OS Connect Enterprise Edition (zCEE) Version 3 and following an IPL of the LPAR our zCEE server joglog now shows these messages:
JVMSHRC020E An error has occurred while opening semaphore
JVMSHRC336E Port layer error code = -197210
JVMSHRC337E Platform error message: semget : EDC5129I No such file or
directory.
JVMSHRC670I Error recovery: attempting to use shared cache in readonly
mode if the shared memory region exists, in response to "-Xshareclasses:
nonfatal" option.
JVMSHRC659E An error has occurred while opening shared memory
JVMSHRC336E Port layer error code = -393818
JVMSHRC337E Platform error message: shmget : EDC5129I No such file or
directory.
JVMSHRC627I Recreation of shared memory control file is not allowed
when running in read-only mode.
JVMSHRC686I Failed to startup shared class cache. Continue without
using it as -Xshareclasses:nonfatal is specified
I have issued the following commands in an attempt to manually remove the JVM semaphore and shared memory control files associated with the non-persistent shared class cache:
java -Xshareclasses:destroyAll,cacheDir=/tmp/javasharedresources
java -Xshareclasses:destroyAll,cacheDir=/produits/zosconnect/servers/.
classCache/javasharedresources
Some files were deleted but I still always get the messages.
Answer
Liberty (and therefore z/OS Connect EE) run servers as UNIX System Services (USS) processes. Servers use shared memory. By default the -Xshareclasses JVM option is specified to enable the shared class cache on supported IBM J9 virtual machines. The cache directory is set to WLP_OUTPUT_DIR/.classCache as described in the topic Liberty profile: Server command options of the WebSphere Application Server (WAS) Liberty for z/OS documentation.
When you start a server from USS using the /bin/zosconnect a shared memory segment and semaphore entry are created, but not removed when the server is shutdown. This can be seen using OMVS command:
ipcs -a
(look for entries under your userid)
IPLing, or killing ASID's can orphan semaphores over time then at startup of z/OS Connect EE you can get the message JVMSHRC020E.
Each time you start or stop the server it will reuse the existing shared memory segment and semaphore entry. If, however, you delete the cache directory (which might happen if you delete the directory structure in order to test a new version) then the shared memory segment and semaphore entries become orphaned and new entries are created next time. This can cause a leak and eventually run out of semaphores. To avoid this, BEFORE deleting the cache directory, run the following command from the userid who owns the ipcs entries:
java -Xshareclasses:destroyAll,cacheDir=<WLP_OUTPUT_DIR>/.classcache
If you still get message JVMSHRC020E, then I suspect there might be a permissions problem related to the userid that originally created the classcache and the sequence of zCEE server startups after the IPL.
You might want to give permission 777 to the /tmp/javasharedresources and /var/zosconnect/servers/.classCache/javasharedresources and then enter the commands:
java -Xshareclasses:destroyAll,cacheDir=/tmp/javasharedresources
java -Xshareclasses:destroyAll,cacheDir=/var/zosconnect/servers/.classCache/javasharedresources
Bill Bulfin
IBM zCEE Level2 Support
Product Synonym
zCEE
Was this topic helpful?
Document Information
Modified date:
14 February 2023
UID
dwa1432200