View Issue Details

IDProjectCategoryView StatusLast Update
0001655SymmetricDSBugpublic2014-06-16 20:27
ReportercronjefourieAssigned Toelong 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version3.5.17 
Target Version3.6.0Fixed in Version3.6.0 
Summary0001655: host.bind.name has no effect when running stand-alone
DescriptionSetting the value host.bind.name in symmetric-server.properties has NO effect on the binding name. This makes it impossible to run the service on a specific IP when using standalone mode.
Steps To ReproduceInstall and config sym-ds as stand-alone system & windows service
Set host.bind.name to a preferred IP
Start service
Service will bind to ALL IP's
TagsNo tags attached.

Activities

cronjefourie

2014-03-27 10:42

reporter  

issue-1655.patch (2,562 bytes)
Index: symmetric-server/src/main/java/org/jumpmind/symmetric/SymmetricLauncher.java
===================================================================
--- symmetric-server/src/main/java/org/jumpmind/symmetric/SymmetricLauncher.java	(revision 8112)
+++ symmetric-server/src/main/java/org/jumpmind/symmetric/SymmetricLauncher.java	(working copy)
@@ -25,6 +25,8 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.slf4j.MDC;
+
+import com.mysql.jdbc.StringUtils;
 
 /**
  * Launch the SymmetricDS engine as a stand alone client or server.
@@ -196,8 +198,10 @@
         } else {
             SymmetricWebServer webServer = new SymmetricWebServer(chooseWebDir(line, webDir),
                     maxIdleTime, propertiesFile != null ? propertiesFile.getCanonicalPath() : null,
-                    true, noNio, noDirectBuffer);
-            webServer.setHost(host);
+                    true, noNio, noDirectBuffer);
+            if (!StringUtils.isNullOrEmpty(host)) {
+            	webServer.setHost(host);
+            }
             webServer.setBasicAuthUsername(httpBasicAuthUser);
             webServer.setBasicAuthPassword(httpBasicAuthPassword);
             
Index: symmetric-server/src/main/java/org/jumpmind/symmetric/SymmetricWebServer.java
===================================================================
--- symmetric-server/src/main/java/org/jumpmind/symmetric/SymmetricWebServer.java	(revision 8112)
+++ symmetric-server/src/main/java/org/jumpmind/symmetric/SymmetricWebServer.java	(working copy)
@@ -382,7 +382,7 @@
             connector.setHost(host);
             connector.setMaxIdleTime(maxIdleTime);
             connectors.add(connector);
-            log.info("About to start {} web server on port {}", name, port);
+            log.info(String.format("About to start %s web server on host:port %s:%s", name, host, port));
         }
         if (mode.equals(Mode.HTTPS) || mode.equals(Mode.MIXED)) {
             ISecurityService securityService = SecurityServiceFactory.create(SecurityServiceType.SERVER, new TypedProperties(System.getProperties()));
@@ -402,7 +402,7 @@
             connector.setPort(securePort);
             connector.setHost(host);
             connectors.add(connector);
-            log.info("About to start SymmetricDS web server on secure port {}", securePort);
+            log.info(String.format("About to start SymmetricDS web server on secure host:port %s:%s", host,securePort));
         }
         return connectors.toArray(new Connector[connectors.size()]);
     }
issue-1655.patch (2,562 bytes)

cronjefourie

2014-03-27 10:42

reporter   ~0000502

I've created a patch issue-1655.patch to fix this problem, by correctly setting the host of the socket if it is supplied.

Related Changesets

SymmetricDS: master 29eaa199

2014-03-27 11:43:08

erilong

Details Diff
0001655: host.bind.name has no effect when running stand-alone
0001655
mod - symmetric-server/src/main/java/org/jumpmind/symmetric/SymmetricLauncher.java Diff File
mod - symmetric-server/src/main/java/org/jumpmind/symmetric/SymmetricWebServer.java Diff File

Issue History

Date Modified Username Field Change
2014-03-27 10:41 cronjefourie New Issue
2014-03-27 10:42 cronjefourie File Added: issue-1655.patch
2014-03-27 10:42 cronjefourie Note Added: 0000502
2014-03-27 12:00 Changeset attached => SymmetricDS trunk r8113
2014-03-27 15:23 elong Assigned To => elong
2014-03-27 15:23 elong Status new => resolved
2014-03-27 15:23 elong Fixed in Version => 3.6.0
2014-03-27 15:23 elong Target Version => 3.6.0
2014-03-27 15:24 elong Status resolved => closed
2014-03-27 15:24 elong Resolution open => fixed
2014-03-27 15:25 admin Status closed => resolved
2014-06-16 20:27 chenson Status resolved => closed
2015-07-30 21:49 Changeset attached => SymmetricDS master 29eaa199