New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to start spring-cloud-azure-servicebus-integration-sample #236

Closed
sophiaso opened this Issue Sep 11, 2018 · 3 comments

Comments

Projects
None yet
3 participants
@sophiaso
Member

sophiaso commented Sep 11, 2018

Start failed with exception, post request with curl failed too with curl: (7) Failed to connect to localhost port 8080: Connection refused

[main] INFO com.microsoft.azure.servicebus.QueueClient - Created queue client to connection string 'Endpoint=sb://xxxxxxxxx.servicebus.windows.net/;EntityPath=example;'
[main] INFO com.microsoft.azure.servicebus.MessageAndSessionPump - Registering message handler on entity 'example' with 'MessageHandlerOptions - AutoComplete:false, MaxConcurrentCalls:1, MaxAutoRenewDuration:PT5M'
[ForkJoinPool.commonPool-worker-1] INFO com.microsoft.azure.servicebus.MessageReceiver - Creating MessageReceiver to entity 'example', ReceiveMode 'PEEKLOCK'
[ForkJoinPool.commonPool-worker-1] INFO com.microsoft.azure.servicebus.primitives.CoreMessageReceiver - Creating core message receiver to 'example'
[ForkJoinPool.commonPool-worker-2] INFO com.microsoft.azure.servicebus.primitives.RequestResponseLink - Opened requestresponselink to $cbs
[ForkJoinPool.commonPool-worker-2] INFO com.microsoft.azure.servicebus.primitives.MessagingFactory - Created CBS link to $cbs
[ReactorThread9b62a5a8-ac54-4302-8a1a-7dca8efc74f9] INFO com.microsoft.azure.servicebus.primitives.CoreMessageReceiver - Creating receive link to 'example'
[ReactorThread9b62a5a8-ac54-4302-8a1a-7dca8efc74f9] INFO com.microsoft.azure.servicebus.primitives.CoreMessageReceiver - Receive link to 'example' opened.
[ForkJoinPool.commonPool-worker-2] INFO com.microsoft.azure.servicebus.MessageReceiver - Created MessageReceiver to entity 'example'
[ForkJoinPool.commonPool-worker-2] INFO com.microsoft.azure.servicebus.MessageReceiver - Created MessageBrowser to entity 'example'
[main] INFO com.microsoft.azure.servicebus.MessageAndSessionPump - Created MessageReceiver to entity 'example'
[main] INFO com.microsoft.azure.spring.integration.servicebus.inbound.ServiceBusQueueInboundChannelAdapter - started queueMessageChannelAdapter
[main] WARN org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Failed to start bean 'topicMessageChannelAdapter'; nested exception is java.lang.IllegalArgumentException: Service bus topic 'topic' not existed
[main] INFO org.springframework.jmx.export.annotation.AnnotationMBeanExporter - Unregistering JMX-exposed beans on shutdown
[main] INFO org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler - Shutting down ExecutorService 'taskScheduler'
Sep 11, 2018 4:28:55 PM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service [Tomcat]
[main] INFO org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener - 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
[main] ERROR org.springframework.boot.SpringApplication - Application run failed
org.springframework.context.ApplicationContextException: Failed to start bean 'topicMessageChannelAdapter'; nested exception is java.lang.IllegalArgumentException: Service bus topic 'topic' not existed
	at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:184)
	at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:52)
	at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:356)
	at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:157)
	at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:121)
	at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:885)
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh(ServletWebServerApplicationContext.java:161)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:553)
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140)
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759)
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:395)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:327)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1255)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1243)
	at example.ServiceBusIntegrationApplication.main(ServiceBusIntegrationApplication.java:23)
Caused by: java.lang.IllegalArgumentException: Service bus topic 'topic' not existed
	at org.springframework.util.Assert.notNull(Assert.java:210)
	at com.microsoft.azure.spring.integration.servicebus.factory.DefaultServiceBusTopicClientFactory.createSubscriptionClient(DefaultServiceBusTopicClientFactory.java:55)
	at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660)
	at com.microsoft.azure.spring.cloud.context.core.util.Memoizer.lambda$memoize$0(Memoizer.java:21)
	at com.microsoft.azure.spring.integration.servicebus.topic.ServiceBusTopicTemplate.internalSubscribe(ServiceBusTopicTemplate.java:69)
	at com.microsoft.azure.spring.integration.servicebus.topic.ServiceBusTopicTemplate.subscribe(ServiceBusTopicTemplate.java:54)
	at com.microsoft.azure.spring.integration.core.api.SubscribeByGroupOperation.subscribe(SubscribeByGroupOperation.java:30)
	at com.microsoft.azure.spring.integration.core.AbstractInboundChannelAdapter.doStart(AbstractInboundChannelAdapter.java:40)
	at org.springframework.integration.endpoint.AbstractEndpoint.start(AbstractEndpoint.java:162)
	at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:181)
	... 14 more
[pool-10-thread-2] WARN com.microsoft.azure.servicebus.primitives.CoreMessageReceiver - No messages received from 'example'. Pending receive request timed out. Returning null to the client.
[pool-10-thread-4] WARN com.microsoft.azure.servicebus.primitives.CoreMessageReceiver - No messages received from 'example'. Pending receive request timed out. Returning null to the client.

@sophiaso

This comment has been minimized.

Member

sophiaso commented Sep 11, 2018

Same issue happened for sample spring-cloud-azure-eventhub-operation-sample

@warrenzhu25

This comment has been minimized.

Contributor

warrenzhu25 commented Sep 11, 2018

Please create service bus topic manually since integration and operation doesn't support auto resource creation. This have already been in the sample doc.

@yaweiw

This comment has been minimized.

Member

yaweiw commented Sep 11, 2018

@warrenzhu25 do we make it clear in doc that users need to manually create resources? Auto provision isn't working?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment