OSDN Git Service

[webserver] - Listen on only IPv4 explicitly.
authorDaigo Moriwaki <daigo@debian.org>
Sun, 15 Dec 2013 02:34:20 +0000 (11:34 +0900)
committerDaigo Moriwaki <daigo@debian.org>
Sun, 15 Dec 2013 02:34:20 +0000 (11:34 +0900)
changelog
webserver

index d17e925..8721d51 100644 (file)
--- a/changelog
+++ b/changelog
@@ -1,3 +1,12 @@
+2013-12-15  Daigo Moriwaki <daigo at debian dot org>
+
+       * [webserver]
+         - Listen on only IPv4 explicitly. Under ruby 1.9.3p194, without
+           any bind addresses, ruby attempts to listen on both "0.0.0.0"
+           and "::". Specifying "::" on Linux leads to listen on both IPv4
+           and IPv6, which results in a warning message saying "Address
+           already in use - bind(2)".
+
 2013-12-13  Daigo Moriwaki <daigo at debian dot org>
 
        * [shogi-server]
 2013-12-13  Daigo Moriwaki <daigo at debian dot org>
 
        * [shogi-server]
index 97f8059..1c5acbd 100755 (executable)
--- a/webserver
+++ b/webserver
@@ -151,6 +151,7 @@ def main
   http_log_file            = File.join($options["dir"], "shogi-server-httpd.log")
   http_access_log_file     = File.join($options["dir"], "shogi-server-access.log")
   http_config = {}
   http_log_file            = File.join($options["dir"], "shogi-server-httpd.log")
   http_access_log_file     = File.join($options["dir"], "shogi-server-access.log")
   http_config = {}
+  http_config[:BindAddress] = "0.0.0.0"
   http_config[:Port]       = $options["port"]
   http_config[:ServerType] = WEBrick::Daemon if $options["daemon"]
   http_config[:Logger]     = WEBrick::Log.new(http_log_file)
   http_config[:Port]       = $options["port"]
   http_config[:ServerType] = WEBrick::Daemon if $options["daemon"]
   http_config[:Logger]     = WEBrick::Log.new(http_log_file)