[
https://issues.apache.org/jira/browse/DISPATCH-804?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16123536#comment-16123536
]
Gordon Sim commented on DISPATCH-804:
-------------------------------------
Possible fix:
{noformat}
diff --git a/src/connection_manager.c b/src/connection_manager.c
index 513b16c..041f231 100644
--- a/src/connection_manager.c
+++ b/src/connection_manager.c
@@ -165,6 +165,10 @@ static void set_config_host(qd_server_config_t *config,
qd_entity_t* entity)
config->host = host;
free(addr);
}
+ else if (host && addr && strcmp(host, addr) != 0 && strcmp(host,
"127.0.0.1") == 0) {
+ config->host = addr;
+ free(host);
+ }
else if (host && strcmp(host, "") != 0 ) {
config->host = host;
free(addr);
{noformat}
> connectors ignore addr
> ----------------------
>
> Key: DISPATCH-804
> URL: https://issues.apache.org/jira/browse/DISPATCH-804
> Project: Qpid Dispatch
> Issue Type: Bug
> Affects Versions: 1.0.0
> Reporter: Gordon Sim
> Assignee: Ganesh Murthy
> Priority: Blocker
> Fix For: 1.0.0
>
>
> The addr field of connector appears to be entirely ignored, with 127.0.0.1
> used instead. E.g. with the following config:
> {noformat}
> router {
> mode: standalone
> routerId: myrouter
> }
> listener {
> addr: 0.0.0.0
> port: amqp
> authenticatePeer: no
> }
> connector {
> name: myconnector
> addr: google.com
> port: 5673
> }
> {noformat}
> you see
> {noformat}
> 2017-08-11 16:27:13.184 +0100 AGENT (warning) routerId is deprecated, use id
> instead
> 2017-08-11 16:27:13.555 +0100 SERVER (warning) HTTP support is not available
> 2017-08-11 16:27:13.563 +0100 SERVER (info) Container Name: myrouter
> 2017-08-11 16:27:13.651 +0100 ROUTER (info) Router started in Standalone mode
> 2017-08-11 16:27:13.679 +0100 ROUTER_CORE (info) Allow Unsettled Multicast: no
> 2017-08-11 16:27:13.1033 +0100 ROUTER_CORE (info) Router Core thread running.
> 0/myrouter
> 2017-08-11 16:27:13.1049 +0100 ROUTER_CORE (info) In-process subscription
> M/$management
> 2017-08-11 16:27:13.7044 +0100 AGENT (info) Activating management agent on
> $_management_internal
> 2017-08-11 16:27:13.7099 +0100 ROUTER_CORE (info) In-process subscription
> L/$management
> 2017-08-11 16:27:13.7122 +0100 ROUTER_CORE (info) In-process subscription
> L/$_management_internal
> 2017-08-11 16:27:13.7410 +0100 CONN_MGR (info) Configured Listener:
> 0.0.0.0:amqp proto=any, role=normal
> 2017-08-11 16:27:13.8007 +0100 CONN_MGR (info) Configured Connector:
> 127.0.0.1:5673 proto=any, role=normal <----- NOTE: Wrong hostname!!
> 2017-08-11 16:27:13.8460 +0100 POLICY (info) Policy configured
> maxConnections: 65535, policyDir: '', access rules enabled: 'false'
> 2017-08-11 16:27:13.9149 +0100 POLICY (info) Policy fallback defaultVhost is
> defined: '$default'
> 2017-08-11 16:27:13.9175 +0100 SERVER (notice) Operational, 4 Threads Running
> (process ID 3236)
> 2017-08-11 16:27:13.9286 +0100 SERVER (notice) Listening on 0.0.0.0:amqp
> {noformat}
> And indeed it connects to a broker on the local host.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]