Rob, you are a genius!

In the past I got it to work once and then never again and I couldn't
figure out why. the config file is updated after the first run. I'll
work some maven magic to have a master config, then copy it to the
working one before building. That should get me going. Thanks again
for the help

On Wed, Feb 3, 2016 at 8:33 PM, Rob Godfrey <rob.j.godf...@gmail.com> wrote:
> So, what about the virtual host configuration? After the first start
> there'll be a <work dir>/default/config/default.json file written... Are
> you blowing this away each time?  If you are then you'll need to change
> your system.config so that it always populates the initial virtual host
> configuration... e.g. change the line:
>
>     "virtualHostInitialConfiguration" : "{}",
>
> to something the default from the initial configuration:
>
>     "virtualHostInitialConfiguration" :
> "${qpid.initial_config_virtualhost_config}"
>
> (or you can craft you own).
>
> The first time a given virtual host is initialised the broker takes the
> virtualHostInitialConfiguration and writes it to the virtual host config
> file.  It then clears the virtualHostInitialConfiguration attribute so it
> doesn't try to do the same thing next time it starts (which would be bad as
> you don't want to overwrite the now updated virtual host config).
>
> Hope this helps,
> Rob
>
> On 4 February 2016 at 00:55, Alex O'Ree <spyhunte...@gmail.com> wrote:
>
>> here's the config. looks ok to me. strange since it works ok with the
>> distro. i'm thinking its a classpath issue
>>
>> {
>>   "id" : "1b8cbf11-972d-48f5-a6d5-eb9ed2b2d781",
>>   "name" : "${broker.name}",
>>   "modelVersion" : "6.0",
>>   "authenticationproviders" : [ {
>>     "id" : "6d9f1d6d-d0df-4f2c-a068-d8ac413dc4df",
>>     "name" : "passwordFile",
>>     "type" : "PlainPasswordFile",
>>     "path" : ".${file.separator}etc${file.separator}passwd",
>>     "preferencesproviders" : [ {
>>       "id" : "cdcedd31-974c-4711-a8ef-16cef6369e16",
>>       "name" : "fileSystemPreferences",
>>       "type" : "FileSystemPreferences",
>>       "path" : "${qpid.work_dir}${file.separator}user.preferences.json"
>>     } ]
>>   } ],
>>   "brokerloggers" : [ {
>>     "id" : "c3828453-c670-419e-9f5e-bc8a575b09ae",
>>     "name" : "logfile",
>>     "type" : "File",
>>     "fileName" :
>> "${qpid.work_dir}${file.separator}log${file.separator}qpid.log",
>>     "brokerloginclusionrules" : [ {
>>       "id" : "7ed0b467-7b14-47dc-b894-96419ea3206b",
>>       "name" : "Operational",
>>       "type" : "NameAndLevel",
>>       "level" : "INFO",
>>       "loggerName" : "qpid.message.*"
>>     }, {
>>       "id" : "7be75727-f432-4d86-99d8-3f6386e30c1f",
>>       "name" : "Qpid",
>>       "type" : "NameAndLevel",
>>       "level" : "INFO",
>>       "loggerName" : "org.apache.qpid.*"
>>     }, {
>>       "id" : "ee995bf5-2aa6-4368-a1c1-881e16d51c9b",
>>       "name" : "Root",
>>       "type" : "NameAndLevel",
>>       "level" : "WARN",
>>       "loggerName" : "ROOT"
>>     } ]
>>   }, {
>>     "id" : "2e98f904-09b0-4e9d-82ae-9f7426aad96a",
>>     "name" : "memory",
>>     "type" : "Memory",
>>     "brokerloginclusionrules" : [ {
>>       "id" : "cf4e069d-42f0-4eee-a197-49a51a83617b",
>>       "name" : "Operational",
>>       "type" : "NameAndLevel",
>>       "level" : "INFO",
>>       "loggerName" : "qpid.message.*"
>>     }, {
>>       "id" : "027986a5-e630-43eb-9ff6-ab1216db07e8",
>>       "name" : "Qpid",
>>       "type" : "NameAndLevel",
>>       "level" : "INFO",
>>       "loggerName" : "org.apache.qpid.*"
>>     }, {
>>       "id" : "5072bb7b-a5e0-4890-9976-eed392bc0334",
>>       "name" : "Root",
>>       "type" : "NameAndLevel",
>>       "level" : "WARN",
>>       "loggerName" : "ROOT"
>>     } ]
>>   } ],
>>   "plugins" : [ {
>>     "id" : "5e501ec6-baa5-4909-9d5c-8c5c905f03e2",
>>     "type" : "MANAGEMENT-HTTP",
>>     "name" : "httpManagement"
>>   }, {
>>     "id" : "248144a5-d944-4c90-b065-e3eab65a890c",
>>     "type" : "MANAGEMENT-JMX",
>>     "name" : "jmxManagement"
>>   } ],
>>   "ports" : [ {
>>     "id" : "4452303a-14d9-47e2-b29e-61d7eadf75cf",
>>     "name" : "AMQP",
>>     "port" : "${qpid.amqp_port}",
>>     "authenticationProvider" : "passwordFile",
>>     "virtualhostaliases" : [ {
>>       "id" : "7c41f279-07b2-4451-b4fe-c90f6741e310",
>>       "name" : "defaultAlias",
>>       "type" : "defaultAlias"
>>     }, {
>>       "id" : "5eec600c-d03c-431e-9781-85991d32287f",
>>       "name" : "hostnameAlias",
>>       "type" : "hostnameAlias"
>>     }, {
>>       "id" : "4453ccc8-6f98-4ff5-ae14-d2d6ab79c176",
>>       "name" : "nameAlias",
>>       "type" : "nameAlias"
>>     } ]
>>   }, {
>>     "id" : "3689494b-f416-4de3-8fc8-2bfab746339e",
>>     "name" : "HTTP",
>>     "type" : "HTTP",
>>     "authenticationProvider" : "passwordFile",
>>     "port" : "9090",
>>     "protocols" : [ "HTTP" ],
>>     "transports" : [ "TCP" ],
>>     "lastUpdatedBy" : "admin",
>>     "lastUpdatedTime" : 1454502274259,
>>     "createdBy" : null,
>>     "createdTime" : 0
>>   } ],
>>   "virtualhostnodes" : [ {
>>     "id" : "ec4b3d05-5003-4082-9643-d23cdccdad91",
>>     "name" : "default",
>>     "type" : "JSON",
>>     "defaultVirtualHostNode" : "true",
>>     "virtualHostInitialConfiguration" : "{}",
>>     "lastUpdatedBy" : null,
>>     "lastUpdatedTime" : 1454501993417,
>>     "createdBy" : null,
>>     "createdTime" : 0
>>   } ]
>> }
>>
>> On Wed, Feb 3, 2016 at 4:17 PM, Rob Godfrey <rob.j.godf...@gmail.com>
>> wrote:
>> > Can you post the config here?  "Unknown virtualhost" might indicate
>> > improperly configured virtual host aliases... or it may be some other
>> issue
>> >
>> >
>> > Correctly configured virtualhostaliases would look something like this:
>> >
>> > "ports" : [ {
>> >     "id" : "3b415494-4c58-4fe1-a972-fea7f84b0c74",
>> >     "name" : "AMQP",
>> >     "port" : "${qpid.amqp_port}",
>> >     "authenticationProvider" : "passwordFile",
>> >     "virtualhostaliases" : [ {
>> >       "id" : "b13cf37a-1a9f-40d2-9670-72f444403452",
>> >       "name" : "defaultAlias",
>> >       "type" : "defaultAlias"
>> >     }, {
>> >       "id" : "ccf359fa-3988-4517-925a-a3be24163783",
>> >       "name" : "hostnameAlias",
>> >       "type" : "hostnameAlias"
>> >     }, {
>> >       "id" : "b19c5aa1-587d-4a51-8528-aee49747b475",
>> >       "name" : "nameAlias",
>> >       "type" : "nameAlias"
>> >     } ]
>> >   }
>> >
>> > You need to configure at least a nameAlias (and probably a defaultAlias)
>> > for each AMQP port you define to get the "expected" behaviour... Virtual
>> > Host Aliases are used to convert the name in the connection string to the
>> > virtual host to use, in theory two different users requesting the same
>> > virtual host may get connected to different places... in practice the
>> more
>> > common case  is to allow multiple names to match to the same virtual
>> host.
>> > For AMQP 1.0 the expected behaviour is that the name put in the "host"
>> > field is the DNS host of the server.  The "nameAlias" uses exact string
>> > matching against the actual name of the virtual host.  The "defaultAlias"
>> > matches the empty string to the virtual host which is marked as the
>> default.
>> >
>> > In terms of the rendering of the HTML console, make sure you have the
>> dojo
>> > zip file in the classpath.
>> >
>> > Hope this helps,
>> > Rob
>> >
>> > On 3 February 2016 at 12:37, Alex O'Ree <spyhunte...@gmail.com> wrote:
>> >
>> >> Again, with the thread of an embedded qpid server in a unit test...
>> >> I can get the test case (connect to amqp and wait for a reply) to run
>> >> fine with qpid running from the distro. When running the server in the
>> >> unit test, I'm now running into the follow error.
>> >>
>> >>
>> >> Connecting to amqp://guest:guest@
>> >> /default?brokerlist='tcp://localhost:5672'
>> >>
>> >> org.apache.qpid.AMQConnectionFailureException: Unknown virtualhost
>> >> 'default'
>> >>
>> >> I took the ~/config.json used by the distro server and was able to get
>> >> the unit test version to read from it and the etc password files. Only
>> >> change was the http port and the location of the password files. The
>> >> name "default" is definitely in the config file so I'm not really sure
>> >> what's going on. In terms of maven dependencies, I have the following,
>> >> all at 6.0.0
>> >> qpid-client
>> >> qpid-broker
>> >> qpid-broker-core
>> >>
>> >>
>> >>
>> >>
>> >> Aside from the above error, the http web management portion doesn't
>> >> render correctly while in embedded mode (no username/password box),
>> >> maybe i'm missing a dependency?
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
>> >> For additional commands, e-mail: users-h...@qpid.apache.org
>> >>
>> >>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
>> For additional commands, e-mail: users-h...@qpid.apache.org
>>
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org

Reply via email to