AMBARI-6479. Add Services can cause service start failure due to not trimming extra spaces in log4j property configs. (yusaku)
diff --git a/ambari-web/app/controllers/wizard/step8_controller.js b/ambari-web/app/controllers/wizard/step8_controller.js
index 9985c5d..04c55a4 100644
--- a/ambari-web/app/controllers/wizard/step8_controller.js
+++ b/ambari-web/app/controllers/wizard/step8_controller.js
@@ -835,6 +835,9 @@
     serviceNames.forEach(function (serviceName) {
       var serviceConfigs = configs.filterProperty('serviceName', serviceName);
       var tagName = 'version' + (new Date).getTime();
+      serviceConfigs.forEach(function(config) {
+        config.value = App.config.trimProperty(config, false);
+      });
       serviceConfigs.mapProperty('filename').uniq().forEach(function (siteName) {
         configsMap.push(configurationController.createSiteObj(siteName.replace(".xml", ""), tagName, serviceConfigs.filterProperty('filename', siteName)));
       });