From 7a6043b1248b67a6cb6ff1190b7fce8d2464126c Mon Sep 17 00:00:00 2001 From: "Parker, Peter G" Date: Wed, 24 Feb 2016 15:50:13 -0500 Subject: [PATCH] Test whether or not passing the passwordfile to asadmin when starting a domain solves the problem. --- manifests/create_service.pp | 3 ++- templates/glassfish-init-domain-el.erb | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/manifests/create_service.pp b/manifests/create_service.pp index dd14f56..e3a93b2 100644 --- a/manifests/create_service.pp +++ b/manifests/create_service.pp @@ -52,7 +52,8 @@ $mode = 'domain', $das_port = undef, $status_cmd = undef, - $service_name = undef) { + $service_name = undef, + $asadmin_passfile = $glassfish::asadmin_passfile) { # Check that we've got a domain name if domain mode. if $mode == 'domain' and !$domain_name { fail('Domain name must be specified to install service for domain mode.') diff --git a/templates/glassfish-init-domain-el.erb b/templates/glassfish-init-domain-el.erb index e644516..2c10dd6 100644 --- a/templates/glassfish-init-domain-el.erb +++ b/templates/glassfish-init-domain-el.erb @@ -13,11 +13,12 @@ GLASSFISH_BIN="<%= scope.lookupvar('glassfish::glassfish_dir') %>/glassfish/bin" # Setup Domain and User values DOMAIN="<%= @domain_name %>" +PWFILE="<%= @asadmin_passfile %>" USER="<%= @runuser %>" start() { echo -n "Starting glassfish domain $DOMAIN: " - daemon --user $USER --pidfile /var/run/glassfish_$DOMAIN.pid "$GLASSFISH_BIN/asadmin start-domain $DOMAIN" + daemon --user $USER --pidfile /var/run/glassfish_$DOMAIN.pid "$GLASSFISH_BIN/asadmin start-domain --passwordfile $PWFILE $DOMAIN" RETVAL=$? if [ $RETVAL -eq 0 ]; then PID=`ps U $USER | grep $DOMAIN | awk '{ print $1}'`