Closed om26er closed 2 years ago
I can do a PR if copying the config file from https://github.com/crossbario/crossbar/blob/master/crossbar/master/node/config.json makes sense
The error can be reproduced with this config
{
"version": 2,
"controller": {
"id": "center1"
},
"workers": [
{
"id": "cfrouter1",
"type": "router",
"options": {
"expose_controller": true
},
"realms": [
{
"name": "com.crossbario.fabric",
"roles": [
{
"name": "authenticator",
"permissions": [
{
"uri": "com.crossbario.fabric.authenticate",
"match": "exact",
"allow": {
"call": true,
"register": true
}
},
{
"uri": "crossbarfabriccenter.node.",
"match": "prefix",
"allow": {
"subscribe": true
}
},
{
"uri": "crossbarfabriccenter.mrealm.",
"match": "prefix",
"allow": {
"subscribe": true
}
}
]
}
]
}
],
"transports": [
{
"type": "rawsocket",
"serializers": ["cbor"],
"endpoint": {
"type": "unix",
"path": "sock1"
},
"options": {
"max_message_size": 1048576
},
"auth": {
"anonymous": {
"type": "static",
"role": "trusted"
}
}
},
{
"type": "rawsocket",
"serializers": ["cbor"],
"endpoint": {
"type": "unix",
"path": "sock2"
},
"options": {
"max_message_size": 1048576
},
"auth": {
"anonymous": {
"type": "static",
"role": "user",
"authid": "superuser"
}
}
},
{
"type": "web",
"endpoint": {
"type": "tcp",
"port": 9000
},
"paths": {
"/": {
"type": "nodeinfo"
},
"ws": {
"type": "websocket",
"serializers": [
"cbor", "msgpack", "json"
],
"auth": {
"anonymous": {
"type": "static",
"role": "public"
},
"cryptosign": {
"type": "dynamic",
"authenticator": "com.crossbario.fabric.authenticate",
"authenticator-realm": "com.crossbario.fabric",
"authenticator-role": "authenticator"
}
}
}
}
}
],
"components": [
{
"type": "class",
"classname": "crossbar.master.node.authenticator.Authenticator",
"realm": "com.crossbario.fabric",
"role": "authenticator",
"extra": {
"mailgun": {
"submit_url": "https://api.mailgun.net/v3/mailing.crossbar.io/messages",
"access_key": null
}
}
}
]
},
{
"id": "cfrealmmanager1",
"type": "container",
"options": {
"pythonpath": [".."],
"expose_shared": true,
"expose_controller": true,
"restart": "restart-always",
"shutdown": "shutdown-manual"
},
"components": [
{
"type": "class",
"classname": "crossbar.master.node.DomainController",
"realm": "com.crossbario.fabric",
"transport": {
"type": "rawsocket",
"serializer": "cbor",
"endpoint": {
"type": "unix",
"path": "sock1"
},
"options": {
"max_message_size": 1048576
}
}
}
]
}
]
}
It should rather copy this config file https://github.com/crossbario/crossbar/blob/master/crossbar/master/node/config.json and put it in the newly created .crossbar directory.
no, the problem actually is:
thing is: normally a master node is started with (almost) no local config at all.
thing is: normally a master node is started with (almost) no local config at all.
this ..
Maybe we could change the config checking code to throw if a stanza is changed that shouldn't be ? The current behavior is somewhat misleading and something we can improve
Currently running
crossbar master init
produces a config that is broken. It should rather copy this config file https://github.com/crossbario/crossbar/blob/master/crossbar/master/node/config.json and put it in the newly created.crossbar
directory.Below are the logs of the current behavior