diff --git a/akka-core/src/main/scala/remote/RemoteServer.scala b/akka-core/src/main/scala/remote/RemoteServer.scala
index f905f69b26..e37edbc5d3 100755
--- a/akka-core/src/main/scala/remote/RemoteServer.scala
+++ b/akka-core/src/main/scala/remote/RemoteServer.scala
@@ -105,20 +105,22 @@ class RemoteServer extends Logging {
def start(_hostname: String, _port: Int): Unit = start(_hostname, _port, None)
def start(_hostname: String, _port: Int, loader: Option[ClassLoader]): Unit = synchronized {
- if (!isRunning) {
- hostname = _hostname
- port = _port
- log.info("Starting remote server at [%s:%s]", hostname, port)
- bootstrap.setPipelineFactory(new RemoteServerPipelineFactory(name, openChannels, loader))
-
- // FIXME make these RemoteServer options configurable
- bootstrap.setOption("child.tcpNoDelay", true)
- bootstrap.setOption("child.keepAlive", true)
- bootstrap.setOption("child.reuseAddress", true)
- bootstrap.setOption("child.connectTimeoutMillis", RemoteServer.CONNECTION_TIMEOUT_MILLIS)
- openChannels.add(bootstrap.bind(new InetSocketAddress(hostname, port)))
- isRunning = true
- Cluster.registerLocalNode(hostname,port)
+ try {
+ if (!isRunning) {
+ hostname = _hostname
+ port = _port
+ log.info("Starting remote server at [%s:%s]", hostname, port)
+ bootstrap.setPipelineFactory(new RemoteServerPipelineFactory(name, openChannels, loader))
+ bootstrap.setOption("child.tcpNoDelay", true)
+ bootstrap.setOption("child.keepAlive", true)
+ bootstrap.setOption("child.reuseAddress", true)
+ bootstrap.setOption("child.connectTimeoutMillis", RemoteServer.CONNECTION_TIMEOUT_MILLIS)
+ openChannels.add(bootstrap.bind(new InetSocketAddress(hostname, port)))
+ isRunning = true
+ Cluster.registerLocalNode(hostname,port)
+ }
+ } catch {
+ case e => log.error(e, "Could not start up remote server")
}
}
diff --git a/config/akka-reference.conf b/config/akka-reference.conf
index 3d6a9106a9..0f6c137195 100644
--- a/config/akka-reference.conf
+++ b/config/akka-reference.conf
@@ -34,6 +34,14 @@
distributed = off # not implemented yet
+
+ service = on
+ hostname = "localhost"
+ port = 9998
+ filters = "[se.scalablesolutions.akka.security.AkkaSecurityFilterFactory]" # List with all jersey filters to use
+ authenticator = "se.scalablesolutions.akka.security.samples.BasicAuthenticationService" # The authentication service to use
+
+
compression-scheme = "zlib" # Options: "zlib" (lzf to come), leave out for no compression
zlib-compression-level = 6 # Options: 0-9 (1 being fastest and 9 being the most compressed), default is 6
@@ -57,14 +65,6 @@
-
- service = on
- hostname = "localhost"
- port = 9998
- filters = "[se.scalablesolutions.akka.security.AkkaSecurityFilterFactory]" # List with all jersey filters to use
- authenticator = "se.scalablesolutions.akka.security.samples.BasicAuthenticationService" # The authentication service to use
-
-
hostname = "127.0.0.1" # IP address or hostname of one of the Cassandra cluster's seeds