Invalid file name for use with -Xloggc: Filename can only contain the characters [A-Z][a-z][0-9]-_.%[p|t]


Issue:

WebLogic manged server does not start with below error


Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Invalid file name for use with -Xloggc: Filename can only contain the characters [A-Z][a-z][0-9]-_.%[p|t] but it has been /tmp/gc_wls$$.log


Thoughts:

I was passing '-Xloggc:/tmp/gc_wls$$.log' as part of Arguments under 'Server Start' under my managed server in WebLogic Console.

Generally $$ evaluates to PID of the process for which the memory arguments are passed to.

But the values that are sent using Arguments section for a server as i did above will be sent as Java Arguments instead of Memory Argument which then failed to evaluate to process ID.

Resolution:

The memory arguments which are passed in Arguments section should be refactored. In my case, i created a new executable file in my domain home  setUserOverrides.sh(A file if exists processed by startWeblogic.sh) and passed my user specific memory arguments using

USER_MEM_ARGS="-Xms4096m -Xmx4096m -Xloggc:/tmp/gc_wls$$.log'

Comments

Popular posts from this blog

weblogic.socket.NIOSocketMuxer$2 cannot be cast to javax.net.ssl.SSLSocket - OUAF application

SSL issue deploying REST project on SOA 12c