You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Sebastien Briquet <sb...@apache.org> on 2018/06/07 08:54:17 UTC
vhost default policy issue (Cannot load configuration file)
Hi,
I’m trying to configure Qpid dispatch to allow all users have simple
connection limits like this
https://qpid.apache.org/releases/qpid-dispatch-1.0.1/book/index.html#example2
I always get the error:
MAIN (critical) Router start-up failed: Python: Exception: Cannot load
configuration file /conf/4_policy_vhost.conf: Expecting property name: line
36 column 1 (char 530)
qdrouterd: Python: Exception: Cannot load configuration file
/conf/4_policy_vhost.conf: Expecting property name: line 36 column 1 (char
530)
The configuration file I use:
policy {
maxConnections: 1024
}
#Listener for the dispatch-router management connections - qdstat
listener {
host: 0.0.0.0
port: amqp
authenticatePeer: no
}
router {
mode: standalone
id: Router.notif
}
listener {
host: 0.0.0.0
port: 5673
authenticatePeer: no
}
connector {
name: broker
role: route-container
host: 172.17.0.3
port: 5672
#sasl-mechanisms: ANONYMOUS
#### use user and pass
saslUsername: vhost_user
saslPassword: password
}
vhost {
hostname: $default
maxConnectionsPerUser: 10
allowUnknownUser: true
groups: {
$default: {
remoteHosts: *
sources: *
targets: *
}
}
}
address {
prefix: queue
waypoint: yes
}
autoLink {
addr: queue.toto
dir: in
connection: broker
}
autoLink {
dir: out
connection: broker
addr: queue.toto
}
The version I used is the master branch.
Would you have any clues on how I can solve this?
Thanks in advance,
Sebastien.
Re: vhost default policy issue (Cannot load configuration file)
Posted by Sebastien Briquet <sb...@apache.org>.
Hi Chuck,
Thanks for your quick response!
I've pulled the latest commits from master and it fixed the issue! :)
Thanks again,
Sebastien.
On Fri, Jun 8, 2018 at 2:31 AM, Chuck Rolke <cr...@redhat.com> wrote:
> Hi,
>
> I cut and pasted your configuration and it came up OK. The console trace
> for startup is appended.
>
> In the policy section you will need the clause:
> enableVhostPolicy: true
> to get the policy turned on. But I don't see anything in your
> configuration that should be a problem
>
> Are you sure you are running a qdrouterd from the master branch? Until
> about a week ago the 'vhost' section
> was not supported in a .conf file. Make sure you are running a router with
> sources after
> commit a62be32f, DISPATCH-1013 - Enable vhost policies to be defined on
> router config.
>
> -Chuck
>
Re: vhost default policy issue (Cannot load configuration file)
Posted by Chuck Rolke <cr...@redhat.com>.
Hi,
I cut and pasted your configuration and it came up OK. The console trace for startup is appended.
In the policy section you will need the clause:
enableVhostPolicy: true
to get the policy turned on. But I don't see anything in your configuration that should be a problem
Are you sure you are running a qdrouterd from the master branch? Until about a week ago the 'vhost' section
was not supported in a .conf file. Make sure you are running a router with sources after
commit a62be32f, DISPATCH-1013 - Enable vhost policies to be defined on router config.
-Chuck
1 (M=1c8f7 ?7) chug@ratchet users-issue> qdrouterd -c A.conf
2018-06-07 20:13:55.829741 -0400 AGENT (warning) Attribute 'dir' of entity 'autoLink' has been deprecated. Use 'direction' instead
2018-06-07 20:13:55.829856 -0400 AGENT (warning) Attribute 'dir' of entity 'autoLink' has been deprecated. Use 'direction' instead
2018-06-07 20:13:56.191877 -0400 SERVER (info) Container Name: Router.notif
2018-06-07 20:13:56.192054 -0400 ROUTER (info) Router started in Standalone mode
2018-06-07 20:13:56.192067 -0400 ROUTER (info) Version: 1.2.0-SNAPSHOT
2018-06-07 20:13:56.192640 -0400 ROUTER_CORE (info) Router Core thread running. 0/Router.notif
2018-06-07 20:13:56.192672 -0400 ROUTER_CORE (info) In-process subscription M/$management
2018-06-07 20:13:56.203341 -0400 AGENT (info) Activating management agent on $_management_internal
2018-06-07 20:13:56.203404 -0400 ROUTER_CORE (info) In-process subscription L/$management
2018-06-07 20:13:56.203422 -0400 ROUTER_CORE (info) In-process subscription L/$_management_internal
2018-06-07 20:13:56.203618 -0400 POLICY (info) Policy configured maxConnections: 1024, policyDir: '',access rules enabled: 'false', use hostname patterns: 'false'
2018-06-07 20:13:56.204167 -0400 POLICY (info) Policy fallback defaultVhost is defined: '$default'
2018-06-07 20:13:56.204388 -0400 CONN_MGR (info) Configured Listener: 0.0.0.0:amqp proto=any, role=normal
2018-06-07 20:13:56.205224 -0400 CONN_MGR (info) Configured Listener: 0.0.0.0:5673 proto=any, role=normal
2018-06-07 20:13:56.206013 -0400 CONN_MGR (info) Configured Connector: 172.17.0.3:5672 proto=any, role=route-container
2018-06-07 20:13:56.208696 -0400 POLICY (info) Created policy rules for vhost $default
2018-06-07 20:13:56.209129 -0400 SERVER (notice) Operational, 4 Threads Running (process ID 398)
2018-06-07 20:13:56.209139 -0400 SERVER (info) Running in DEBUG Mode
2018-06-07 20:13:56.209403 -0400 SERVER (notice) Listening on 0.0.0.0:5673
2018-06-07 20:13:56.209420 -0400 SERVER (notice) Listening on 0.0.0.0:amqp
2018-06-07 20:13:59.298611 -0400 SERVER (info) Connection to 172.17.0.3:5672 failed: proton:io No route to host - disconnected 172.17.0.3:5672
2018-06-07 20:14:07.362433 -0400 SERVER (info) Connection to 172.17.0.3:5672 failed: proton:io No route to host - disconnected 172.17.0.3:5672
2018-06-07 20:14:15.426504 -0400 SERVER (info) Connection to 172.17.0.3:5672 failed: proton:io No route to host - disconnected 172.17.0.3:5672
2018-06-07 20:14:23.490496 -0400 SERVER (info) Connection to 172.17.0.3:5672 failed: proton:io No route to host - disconnected 172.17.0.3:5672
2018-06-07 20:14:31.554578 -0400 SERVER (info) Connection to 172.17.0.3:5672 failed: proton:io No route to host - disconnected 172.17.0.3:5672
2018-06-07 20:14:39.618495 -0400 SERVER (info) Connection to 172.17.0.3:5672 failed: proton:io No route to host - disconnected 172.17.0.3:5672
2018-06-07 20:14:47.682439 -0400 SERVER (info) Connection to 172.17.0.3:5672 failed: proton:io No route to host - disconnected 172.17.0.3:5672
^C2018-06-07 20:14:52.421758 -0400 SERVER (notice) Shut Down
2018-06-07 20:14:52.421878 -0400 ROUTER_CORE (info) Router Core thread exited
----- Original Message -----
> From: "Sebastien Briquet" <sb...@apache.org>
> To: users@qpid.apache.org
> Sent: Thursday, June 7, 2018 4:54:17 AM
> Subject: vhost default policy issue (Cannot load configuration file)
>
> Hi,
>
> I’m trying to configure Qpid dispatch to allow all users have simple
> connection limits like this
> https://qpid.apache.org/releases/qpid-dispatch-1.0.1/book/index.html#example2
>
> I always get the error:
>
> MAIN (critical) Router start-up failed: Python: Exception: Cannot load
> configuration file /conf/4_policy_vhost.conf: Expecting property name: line
> 36 column 1 (char 530)
> qdrouterd: Python: Exception: Cannot load configuration file
> /conf/4_policy_vhost.conf: Expecting property name: line 36 column 1 (char
> 530)
>
> The configuration file I use:
>
> policy {
> maxConnections: 1024
> }
>
> #Listener for the dispatch-router management connections - qdstat
> listener {
> host: 0.0.0.0
> port: amqp
> authenticatePeer: no
> }
>
> router {
> mode: standalone
> id: Router.notif
> }
>
>
> listener {
> host: 0.0.0.0
> port: 5673
> authenticatePeer: no
> }
>
> connector {
> name: broker
> role: route-container
> host: 172.17.0.3
> port: 5672
> #sasl-mechanisms: ANONYMOUS
> #### use user and pass
> saslUsername: vhost_user
> saslPassword: password
> }
>
> vhost {
> hostname: $default
> maxConnectionsPerUser: 10
> allowUnknownUser: true
> groups: {
> $default: {
> remoteHosts: *
> sources: *
> targets: *
> }
> }
> }
>
> address {
> prefix: queue
> waypoint: yes
> }
>
> autoLink {
> addr: queue.toto
> dir: in
> connection: broker
> }
>
> autoLink {
> dir: out
> connection: broker
> addr: queue.toto
> }
>
> The version I used is the master branch.
> Would you have any clues on how I can solve this?
>
> Thanks in advance,
> Sebastien.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org