[Groonga-commit] droonga/droonga-engine at 9fdeb79 [master] Use port for the bind address, not the rpc address.

Back to archive index

YUKI Hiroshi null+****@clear*****
Fri Jun 27 13:35:09 JST 2014


YUKI Hiroshi	2014-06-27 13:35:09 +0900 (Fri, 27 Jun 2014)

  New Revision: 9fdeb79dff4bc8c36ee3ab69c5777b1253ec8532
  https://github.com/droonga/droonga-engine/commit/9fdeb79dff4bc8c36ee3ab69c5777b1253ec8532

  Message:
    Use port for the bind address, not the rpc address.
    
    It was wrongly used for rpc.

  Modified files:
    lib/droonga/command/serf_event_handler.rb
    lib/droonga/serf.rb

  Modified: lib/droonga/command/serf_event_handler.rb (+1 -2)
===================================================================
--- lib/droonga/command/serf_event_handler.rb    2014-06-27 13:11:41 +0900 (a1f18d5)
+++ lib/droonga/command/serf_event_handler.rb    2014-06-27 13:35:09 +0900 (23b7d6b)
@@ -33,8 +33,7 @@ module Droonga
 
       def initialize
         @serf = ENV["SERF"] || Serf.path
-        @serf_port = ENV["SERF_PORT"] || Serf.default_port
-        @serf_rpc_address = ENV["SERF_RPC_ADDRESS"] || "127.0.0.1:#{@serf_port}"
+        @serf_rpc_address = ENV["SERF_RPC_ADDRESS"] || "127.0.0.1:7373"
         @serf_name = ENV["SERF_SELF_NAME"]
       end
 

  Modified: lib/droonga/serf.rb (+5 -7)
===================================================================
--- lib/droonga/serf.rb    2014-06-27 13:11:41 +0900 (2c1a1e4)
+++ lib/droonga/serf.rb    2014-06-27 13:35:09 +0900 (7f4d0df)
@@ -33,15 +33,15 @@ module Droonga
       end
 
       def default_port
-        7373
+        7946
       end
 
       def dump_source_port
-        7374
+        7947
       end
 
       def dump_destination_port
-        7375
+        7948
       end
     end
 
@@ -57,8 +57,6 @@ module Droonga
       logger.trace("start: start")
       ensure_serf
       ENV["SERF"] = @serf
-      @port = port
-      ENV["SERF_PORT"] = "#{@port}"
       ENV["SERF_RPC_ADDRESS"] = rpc_address
       retry_joins = []
       detect_other_hosts.each do |other_host|
@@ -66,7 +64,7 @@ module Droonga
       end
       @agent = run("agent",
                    "-node", @name,
-                   "-bind", extract_host(@name),
+                   "-bind", "#{extract_host(@name)}:#{port}",
                    "-event-handler", "droonga-engine-serf-event-handler",
                    "-log-level", log_level,
                    *retry_joins)
@@ -131,7 +129,7 @@ module Droonga
     end
 
     def rpc_address
-      "#{extract_host(@name)}:#{@port}"
+      "#{extract_host(@name)}:7373"
     end
 
     def port
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index