title: JBoss 7 in CentOS 7 always looks for jboss-as-standalone.pid in path /var/run/jboss-as
body: <p>I am running JBoss 7 in CentOS 7. When I run a single JBoss instance (X), where the PID path is set to JBOSS_PIDFILE=/var/run/jboss-as/jboss-as-standalone.pid (in the instance X service file, in /etc/init.d/), it all works fine.</p>
  
  <p>I am setting up an another instance (Y), so I cannot use the same path for the PID file, so I set the PID path for both the instances as follows in it's respective service file in /etc/init.d/.</p>
  
  <p>For Instance X: JBOSS_PIDFILE=/var/run/x-service/jboss-as-standalone.pid
  For Instance Y: JBOSS_PIDFILE=/var/run/y-service/jboss-as-standalone.pid</p>
  
  <p>However, when I start the service (service x-instance start or service y-instance start), it always looks for /var/run/jboss-as/jboss-as-standalone.pid which is removed now, if not removed, both instances overwrites each other's pid file and causes conflicts. </p>
  
  <p>I suspect that this might be due to some other error, hence JBoss falls back to the default directory.. but not exactly sure. Any help would be greatly appreciated.</p>
  
  <p>Thanks</p>