[ 
https://issues.apache.org/jira/browse/QPID-7512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15666529#comment-15666529
 ] 

wuxinyu commented on QPID-7512:
-------------------------------

Thanks for your suggestions , and now my port section in config,json is as 
follows:
"ports" : [ {
"id" : "0425f08c-0b3d-4e3e-8560-82eb6d458099",
"name" : "AMQP",
"port" : "$
{qpid.amqp_port}
",
"authenticationProvider" : "passwordFile",
"virtualhostaliases" : [
{ "id" : "19cfbe00-bc19-4043-85e5-2db15b689fc6", "name" : "defaultAlias", 
"type" : "defaultAlias" }
,
{ "id" : "a9aa5b74-b678-4571-a170-66078b08ea01", "name" : "hostnameAlias", 
"type" : "hostnameAlias" }
,
{ "id" : "4a39dc5a-d97b-4467-afd4-7a4f9f6c18d9", "name" : "nameAlias", "type" : 
"nameAlias" }
,
{ "name" : "patternAlias", "type" : "patternMatchingAlias", "pattern" : ".*" }
]


Unfortunately ,error still occurs :
Caught exception, exiting.
org.apache.qpid.jms.JmsResourceNotFoundException: Unknown hostname in 
connection open: '10.46.181.220' [condition = amqp:not-found]
at 
org.apache.qpid.jms.provider.amqp.AmqpSupport.convertToException(AmqpSupport.java:132)
at 
org.apache.qpid.jms.provider.amqp.AmqpSupport.convertToException(AmqpSupport.java:103)
at 
org.apache.qpid.jms.provider.amqp.AmqpAbstractResource.remotelyClosed(AmqpAbstractResource.java:147)
at 
org.apache.qpid.jms.provider.amqp.AmqpAbstractResource.processRemoteClose(AmqpAbstractResource.java:240)
at 
org.apache.qpid.jms.provider.amqp.AmqpProvider.processUpdates(AmqpProvider.java:772)
at 
org.apache.qpid.jms.provider.amqp.AmqpProvider.access$1900(AmqpProvider.java:92)
at org.apache.qpid.jms.provider.amqp.AmqpProvider$17.run(AmqpProvider.java:700)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Connection ExceptionListener fired, exiting.

But ,i can resolve my problem by configure my client to explicitly provide the 
name of the virtual host using the amqp.vhost option in the configuration URL .
My qpid docker container id is 5e8c7e480f6c,so the connection url can be this :
connectionfactory.myFactoryLookup = 
amqp://10.46.181.220:32781?amqp.vhost=5e8c7e480f6c
Then it works perfectly.

Our team perfer to solve this problem by editing config.json .
Please give me some more guidance,thanks a lot !

> EOOR :"Dangling meta character '*' near index 0 " when adding to config.json 
> a pattern matching alias  with the "simplest" change .
> -----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: QPID-7512
>                 URL: https://issues.apache.org/jira/browse/QPID-7512
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Broker
>    Affects Versions: qpid-java-6.0.5
>         Environment: qpid-jms-discovery-0.9.0.jar
> qpid-jms-client-0.9.0.jar
> proton-j-0.12.1.jar
>            Reporter: wuxinyu
>              Labels: performance
>             Fix For: qpid-java-6.0.5
>
>
>  I added to qpid config.json a pattern matching alias so that any request to 
> connect to a host for the mapped port/address also matches. With the 
> "simplest" change ,it will simply match all provided host names to the 
> default virtual host. 
> The  port section in config.json is as follows:
> "ports" : [ {
>     "id" : "0425f08c-0b3d-4e3e-8560-82eb6d458099",
>     "name" : "AMQP",
>     "port" : "${qpid.amqp_port}",
>     "authenticationProvider" : "passwordFile",
>     "virtualhostaliases" : [ {
>       "id" : "19cfbe00-bc19-4043-85e5-2db15b689fc6",
>       "name" : "defaultAlias",
>       "type" : "defaultAlias"
>     }, {
>       "id" : "a9aa5b74-b678-4571-a170-66078b08ea01",
>       "name" : "hostnameAlias",
>       "type" : "hostnameAlias"
>     }, {
>       "id" : "4a39dc5a-d97b-4467-afd4-7a4f9f6c18d9",
>       "name" : "nameAlias",
>       "type" : "nameAlias"
>     }, {
>       "name" : "patternAlias",
>       "type" : "patternMatchingAlias",
>       "pattern" : "*"
>     }  ]
>   }, {
>     "id" : "c8451811-143d-47c9-8a86-5e939c506dbc",
>     "name" : "HTTP",
>     "port" : "${qpid.http_port}",
>     "authenticationProvider" : "passwordFile",
>     "protocols" : [ "HTTP" ]
>   } ],
> But when cilent connected ,the error occurred like this:
> Caught exception, exiting.
> javax.jms.JMSException: java.util.regex.PatternSyntaxException: Dangling meta 
> character '*' near index 0
> *
> ^ [condition = amqp:connection:forced]
>       at 
> org.apache.qpid.jms.provider.amqp.AmqpSupport.convertToException(AmqpSupport.java:148)
>       at 
> org.apache.qpid.jms.provider.amqp.AmqpSupport.convertToException(AmqpSupport.java:103)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to