Wednesday 26 April 2017

'No such file or directory' on starting your domain

Today I was triggered by this question. Earlier I had a similar problem, where I searched, and searched and searched and found the last section on this blogpost. Yes indeed, that is how it works when you blog: you might find your self finding your own blogposts again.

What is it about? Last year I wrote a nice set of scripts on installing Fusion Middleware and creating Fusion Middleware Weblogic domains.

I created the domain-creation-script based on scripts of Edwin Biemond, to get the credits straight.

However, in those scripts the  managed servers as wel as the admin server get Java Arguments set.

Those arguments refer to the logsHome property. I found that if you set JavaArgs you need to set redirects for weblogic.Stdout and weblogic.Stderr as well, like:
'-XX:PermSize=256m -XX:MaxPermSize=512m -Xms1024m -Xmx1532m -Dweblogic.Stdout='+logsHome+'AdminServer.out -Dweblogic.Stderr='+logsHome+'AdminServer_err.out'

Where logFolder should be an absolute path. This has to do with the context in which the nodemanager is starting the server. From that context the relative reference apparently does not evaluate to the proper location. You can however, leave the Java args empty.

So I changed my scripts to not use the getServerJavaArgs function, anymore, but get them from the property file. I replaced the xxxJavaArgsBase with xxxJavaArgs variables. And left them empty. Or you could simply hash-out the lines:
  #cd('ServerStart/'+server)
  #print ('. Set Arguments to: '+javaArgs)
  #set('Arguments' , javaArgs)

for both the AdminServer and ManagedServers.
The configurator doesn't set the JavaArgs, it leaves them over to the setDomain.sh/.cmd and setStartupEnv.sh/.cmd or setUserOverrides.sh/.cmd . If you do so, you can use a relative path, and the servers will start properly.

No comments :