赞
踩
1、springboot配置文件 application.peroproperties
- spring.rabbitmq.username=guest
- spring.rabbitmq.password=guest
- spring.rabbitmq.host=192.168.0.125
- #spring.rabbitmq.host=localhost
- spring.rabbitmq.port=5672
- spring.rabbitmq.virtual-host=/
- spring.rabbitmq.listener.simple.acknowledge-mode=manual
2、错误栈
- "C:\Program Files\Java\jdk1.8.0_211\bin\java.exe" -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true "-javaagent:D:\work\IntelliJ IDEA 2019.1\lib\idea_rt.jar=54709:D:\work\IntelliJ IDEA 2019.1\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Java\jdk1.8.0_211\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\zipfs.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_211\jre\lib\rt.jar;D:\work\workspace\sp2\target\classes;D:\work\maven2\repository\org\springframework\boot\spring-boot-starter-amqp\2.1.4.RELEASE\spring-boot-starter-amqp-2.1.4.RELEASE.jar;D:\work\maven2\repository\org\springframework\boot\spring-boot-starter\2.1.4.RELEASE\spring-boot-starter-2.1.4.RELEASE.jar;D:\work\maven2\repository\org\springframework\boot\spring-boot\2.1.4.RELEASE\spring-boot-2.1.4.RELEASE.jar;D:\work\maven2\repository\org\springframework\boot\spring-boot-autoconfigure\2.1.4.RELEASE\spring-boot-autoconfigure-2.1.4.RELEASE.jar;D:\work\maven2\repository\org\springframework\boot\spring-boot-starter-logging\2.1.4.RELEASE\spring-boot-starter-logging-2.1.4.RELEASE.jar;D:\work\maven2\repository\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;D:\work\maven2\repository\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;D:\work\maven2\repository\org\apache\logging\log4j\log4j-to-slf4j\2.11.2\log4j-to-slf4j-2.11.2.jar;D:\work\maven2\repository\org\apache\logging\log4j\log4j-api\2.11.2\log4j-api-2.11.2.jar;D:\work\maven2\repository\org\slf4j\jul-to-slf4j\1.7.26\jul-to-slf4j-1.7.26.jar;D:\work\maven2\repository\javax\annotation\javax.annotation-api\1.3.2\javax.annotation-api-1.3.2.jar;D:\work\maven2\repository\org\yaml\snakeyaml\1.23\snakeyaml-1.23.jar;D:\work\maven2\repository\org\springframework\spring-messaging\5.1.6.RELEASE\spring-messaging-5.1.6.RELEASE.jar;D:\work\maven2\repository\org\springframework\spring-beans\5.1.6.RELEASE\spring-beans-5.1.6.RELEASE.jar;D:\work\maven2\repository\org\springframework\amqp\spring-rabbit\2.1.5.RELEASE\spring-rabbit-2.1.5.RELEASE.jar;D:\work\maven2\repository\org\springframework\amqp\spring-amqp\2.1.5.RELEASE\spring-amqp-2.1.5.RELEASE.jar;D:\work\maven2\repository\org\springframework\retry\spring-retry\1.2.4.RELEASE\spring-retry-1.2.4.RELEASE.jar;D:\work\maven2\repository\com\rabbitmq\amqp-client\5.4.3\amqp-client-5.4.3.jar;D:\work\maven2\repository\org\springframework\spring-context\5.1.6.RELEASE\spring-context-5.1.6.RELEASE.jar;D:\work\maven2\repository\org\springframework\spring-tx\5.1.6.RELEASE\spring-tx-5.1.6.RELEASE.jar;D:\work\maven2\repository\com\alibaba\fastjson\1.2.46\fastjson-1.2.46.jar;D:\work\maven2\repository\org\springframework\boot\spring-boot-starter-web\2.1.4.RELEASE\spring-boot-starter-web-2.1.4.RELEASE.jar;D:\work\maven2\repository\org\springframework\boot\spring-boot-starter-json\2.1.4.RELEASE\spring-boot-starter-json-2.1.4.RELEASE.jar;D:\work\maven2\repository\com\fasterxml\jackson\core\jackson-databind\2.9.8\jackson-databind-2.9.8.jar;D:\work\maven2\repository\com\fasterxml\jackson\core\jackson-annotations\2.9.0\jackson-annotations-2.9.0.jar;D:\work\maven2\repository\com\fasterxml\jackson\core\jackson-core\2.9.8\jackson-core-2.9.8.jar;D:\work\maven2\repository\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.9.8\jackson-datatype-jdk8-2.9.8.jar;D:\work\maven2\repository\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.9.8\jackson-datatype-jsr310-2.9.8.jar;D:\work\maven2\repository\com\fasterxml\jackson\module\jackson-module-parameter-names\2.9.8\jackson-module-parameter-names-2.9.8.jar;D:\work\maven2\repository\org\springframework\boot\spring-boot-starter-tomcat\2.1.4.RELEASE\spring-boot-starter-tomcat-2.1.4.RELEASE.jar;D:\work\maven2\repository\org\apache\tomcat\embed\tomcat-embed-core\9.0.17\tomcat-embed-core-9.0.17.jar;D:\work\maven2\repository\org\apache\tomcat\embed\tomcat-embed-el\9.0.17\tomcat-embed-el-9.0.17.jar;D:\work\maven2\repository\org\apache\tomcat\embed\tomcat-embed-websocket\9.0.17\tomcat-embed-websocket-9.0.17.jar;D:\work\maven2\repository\org\hibernate\validator\hibernate-validator\6.0.16.Final\hibernate-validator-6.0.16.Final.jar;D:\work\maven2\repository\javax\validation\validation-api\2.0.1.Final\validation-api-2.0.1.Final.jar;D:\work\maven2\repository\org\jboss\logging\jboss-logging\3.3.2.Final\jboss-logging-3.3.2.Final.jar;D:\work\maven2\repository\com\fasterxml\classmate\1.4.0\classmate-1.4.0.jar;D:\work\maven2\repository\org\springframework\spring-web\5.1.6.RELEASE\spring-web-5.1.6.RELEASE.jar;D:\work\maven2\repository\org\springframework\spring-webmvc\5.1.6.RELEASE\spring-webmvc-5.1.6.RELEASE.jar;D:\work\maven2\repository\org\springframework\spring-aop\5.1.6.RELEASE\spring-aop-5.1.6.RELEASE.jar;D:\work\maven2\repository\org\springframework\spring-expression\5.1.6.RELEASE\spring-expression-5.1.6.RELEASE.jar;D:\work\maven2\repository\org\slf4j\slf4j-api\1.7.26\slf4j-api-1.7.26.jar;D:\work\maven2\repository\org\springframework\spring-core\5.1.6.RELEASE\spring-core-5.1.6.RELEASE.jar;D:\work\maven2\repository\org\springframework\spring-jcl\5.1.6.RELEASE\spring-jcl-5.1.6.RELEASE.jar" me.zhao.Sp2Application
-
- . ____ _ __ _ _
- /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
- ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
- \\/ ___)| |_)| | | | | || (_| | ) ) ) )
- ' |____| .__|_| |_|_| |_\__, | / / / /
- =========|_|==============|___/=/_/_/_/
- :: Spring Boot :: (v2.1.4.RELEASE)
-
- 2019-04-28 19:24:39.155 INFO 12676 --- [ main] me.zhao.Sp2Application : Starting Sp2Application on DESKTOP-R8ILOJH with PID 12676 (D:\work\workspace\sp2\target\classes started by zhaobs in D:\work\workspace\sp2)
- 2019-04-28 19:24:39.178 INFO 12676 --- [ main] me.zhao.Sp2Application : No active profile set, falling back to default profiles: default
- 2019-04-28 19:24:41.684 INFO 12676 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
- 2019-04-28 19:24:41.718 INFO 12676 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
- 2019-04-28 19:24:41.718 INFO 12676 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.17]
- 2019-04-28 19:24:41.919 INFO 12676 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
- 2019-04-28 19:24:41.919 INFO 12676 --- [ main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 2575 ms
- 2019-04-28 19:24:42.401 INFO 12676 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
- 2019-04-28 19:24:42.933 INFO 12676 --- [ main] o.s.a.r.c.CachingConnectionFactory : Attempting to connect to: [192.168.0.125:5672]
- 2019-04-28 19:24:42.980 WARN 12676 --- [.168.0.125:5672] c.r.c.impl.ForgivingExceptionHandler : An unexpected connection driver error occured (Exception message: Connection reset)
- 2019-04-28 19:24:42.982 INFO 12676 --- [ main] o.s.a.r.l.SimpleMessageListenerContainer : Broker not available; cannot force queue declarations during start: com.rabbitmq.client.AuthenticationFailureException: ACCESS_REFUSED - Login was refused using authentication mechanism PLAIN. For details see the broker logfile.
- 2019-04-28 19:24:42.991 INFO 12676 --- [ntContainer#0-1] o.s.a.r.c.CachingConnectionFactory : Attempting to connect to: [192.168.0.125:5672]
- 2019-04-28 19:24:43.004 ERROR 12676 --- [.168.0.125:5672] c.r.c.impl.ForgivingExceptionHandler : An unexpected connection driver error occured
-
- java.net.SocketException: socket closed
- at java.net.SocketInputStream.socketRead0(Native Method) ~[na:1.8.0_211]
- at java.net.SocketInputStream.socketRead(SocketInputStream.java:116) ~[na:1.8.0_211]
- at java.net.SocketInputStream.read(SocketInputStream.java:171) ~[na:1.8.0_211]
- at java.net.SocketInputStream.read(SocketInputStream.java:141) ~[na:1.8.0_211]
- at java.io.BufferedInputStream.fill(BufferedInputStream.java:246) ~[na:1.8.0_211]
- at java.io.BufferedInputStream.read(BufferedInputStream.java:265) ~[na:1.8.0_211]
- at java.io.DataInputStream.readUnsignedByte(DataInputStream.java:288) ~[na:1.8.0_211]
- at com.rabbitmq.client.impl.Frame.readFrom(Frame.java:91) ~[amqp-client-5.4.3.jar:5.4.3]
- at com.rabbitmq.client.impl.SocketFrameHandler.readFrame(SocketFrameHandler.java:164) ~[amqp-client-5.4.3.jar:5.4.3]
- at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:596) ~[amqp-client-5.4.3.jar:5.4.3]
- at java.lang.Thread.run(Thread.java:748) [na:1.8.0_211]
-
- 2019-04-28 19:24:43.005 ERROR 12676 --- [ntContainer#0-1] o.s.a.r.l.SimpleMessageListenerContainer : Failed to check/redeclare auto-delete queue(s).
-
- org.springframework.amqp.AmqpAuthenticationException: com.rabbitmq.client.AuthenticationFailureException: ACCESS_REFUSED - Login was refused using authentication mechanism PLAIN. For details see the broker logfile.
- at org.springframework.amqp.rabbit.support.RabbitExceptionTranslator.convertRabbitAccessException(RabbitExceptionTranslator.java:65) ~[spring-rabbit-2.1.5.RELEASE.jar:2.1.5.RELEASE]
- at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.createBareConnection(AbstractConnectionFactory.java:509) ~[spring-rabbit-2.1.5.RELEASE.jar:2.1.5.RELEASE]
- at org.springframework.amqp.rabbit.connection.CachingConnectionFactory.createConnection(CachingConnectionFactory.java:682) ~[spring-rabbit-2.1.5.RELEASE.jar:2.1.5.RELEASE]
- at org.springframework.amqp.rabbit.connection.ConnectionFactoryUtils.createConnection(ConnectionFactoryUtils.java:214) ~[spring-rabbit-2.1.5.RELEASE.jar:2.1.5.RELEASE]
- at org.springframework.amqp.rabbit.core.RabbitTemplate.doExecute(RabbitTemplate.java:2073) ~[spring-rabbit-2.1.5.RELEASE.jar:2.1.5.RELEASE]
- at org.springframework.amqp.rabbit.core.RabbitTemplate.execute(RabbitTemplate.java:2047) ~[spring-rabbit-2.1.5.RELEASE.jar:2.1.5.RELEASE]
- at org.springframework.amqp.rabbit.core.RabbitTemplate.execute(RabbitTemplate.java:2027) ~[spring-rabbit-2.1.5.RELEASE.jar:2.1.5.RELEASE]
- at org.springframework.amqp.rabbit.core.RabbitAdmin.getQueueProperties(RabbitAdmin.java:403) ~[spring-rabbit-2.1.5.RELEASE.jar:2.1.5.RELEASE]
- at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.attemptDeclarations(AbstractMessageListenerContainer.java:1787) ~[spring-rabbit-2.1.5.RELEASE.jar:2.1.5.RELEASE]
- at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.redeclareElementsIfNecessary(AbstractMessageListenerContainer.java:1768) ~[spring-rabbit-2.1.5.RELEASE.jar:2.1.5.RELEASE]
- at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.initialize(SimpleMessageListenerContainer.java:1195) [spring-rabbit-2.1.5.RELEASE.jar:2.1.5.RELEASE]
- at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run(SimpleMessageListenerContainer.java:1041) [spring-rabbit-2.1.5.RELEASE.jar:2.1.5.RELEASE]
- at java.lang.Thread.run(Thread.java:748) [na:1.8.0_211]
- Caused by: com.rabbitmq.client.AuthenticationFailureException: ACCESS_REFUSED - Login was refused using authentication mechanism PLAIN. For details see the broker logfile.
- at com.rabbitmq.client.impl.AMQConnection.start(AMQConnection.java:362) ~[amqp-client-5.4.3.jar:5.4.3]
- at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1104) ~[amqp-client-5.4.3.jar:5.4.3]
- at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1054) ~[amqp-client-5.4.3.jar:5.4.3]
- at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:994) ~[amqp-client-5.4.3.jar:5.4.3]
- at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.createBareConnection(AbstractConnectionFactory.java:462) ~[spring-rabbit-2.1.5.RELEASE.jar:2.1.5.RELEASE]
- ... 11 common frames omitted
-
- 2019-04-28 19:24:43.009 INFO 12676 --- [ntContainer#0-1] o.s.a.r.c.CachingConnectionFactory : Attempting to connect to: [192.168.0.125:5672]
- 2019-04-28 19:24:43.018 ERROR 12676 --- [.168.0.125:5672] c.r.c.impl.ForgivingExceptionHandler : An unexpected connection driver error occured
-
- java.net.SocketException: socket closed
- at java.net.SocketInputStream.socketRead0(Native Method) ~[na:1.8.0_211]
- at java.net.SocketInputStream.socketRead(SocketInputStream.java:116) ~[na:1.8.0_211]
- at java.net.SocketInputStream.read(SocketInputStream.java:171) ~[na:1.8.0_211]
- at java.net.SocketInputStream.read(SocketInputStream.java:141) ~[na:1.8.0_211]
- at java.io.BufferedInputStream.fill(BufferedInputStream.java:246) ~[na:1.8.0_211]
- at java.io.BufferedInputStream.read(BufferedInputStream.java:265) ~[na:1.8.0_211]
- at java.io.DataInputStream.readUnsignedByte(DataInputStream.java:288) ~[na:1.8.0_211]
- at com.rabbitmq.client.impl.Frame.readFrom(Frame.java:91) ~[amqp-client-5.4.3.jar:5.4.3]
- at com.rabbitmq.client.impl.SocketFrameHandler.readFrame(SocketFrameHandler.java:164) ~[amqp-client-5.4.3.jar:5.4.3]
- at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:596) ~[amqp-client-5.4.3.jar:5.4.3]
- at java.lang.Thread.run(Thread.java:748) [na:1.8.0_211]
-
- 2019-04-28 19:24:43.020 ERROR 12676 --- [ntContainer#0-1] o.s.a.r.l.SimpleMessageListenerContainer : Consumer received fatal exception on startup
-
- org.springframework.amqp.rabbit.listener.exception.FatalListenerStartupException: Authentication failure
- at org.springframework.amqp.rabbit.listener.BlockingQueueConsumer.start(BlockingQueueConsumer.java:576) ~[spring-rabbit-2.1.5.RELEASE.jar:2.1.5.RELEASE]
- at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.initialize(SimpleMessageListenerContainer.java:1196) ~[spring-rabbit-2.1.5.RELEASE.jar:2.1.5.RELEASE]
- at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run(SimpleMessageListenerContainer.java:1041) ~[spring-rabbit-2.1.5.RELEASE.jar:2.1.5.RELEASE]
- at java.lang.Thread.run(Thread.java:748) [na:1.8.0_211]
- Caused by: org.springframework.amqp.AmqpAuthenticationException: com.rabbitmq.client.AuthenticationFailureException: ACCESS_REFUSED - Login was refused using authentication mechanism PLAIN. For details see the broker logfile.
- at org.springframework.amqp.rabbit.support.RabbitExceptionTranslator.convertRabbitAccessException(RabbitExceptionTranslator.java:65) ~[spring-rabbit-2.1.5.RELEASE.jar:2.1.5.RELEASE]
- at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.createBareConnection(AbstractConnectionFactory.java:509) ~[spring-rabbit-2.1.5.RELEASE.jar:2.1.5.RELEASE]
- at org.springframework.amqp.rabbit.connection.CachingConnectionFactory.createConnection(CachingConnectionFactory.java:682) ~[spring-rabbit-2.1.5.RELEASE.jar:2.1.5.RELEASE]
- at org.springframework.amqp.rabbit.connection.ConnectionFactoryUtils.createConnection(ConnectionFactoryUtils.java:214) ~[spring-rabbit-2.1.5.RELEASE.jar:2.1.5.RELEASE]
- at org.springframework.amqp.rabbit.connection.ConnectionFactoryUtils$RabbitResourceFactory.createConnection(ConnectionFactoryUtils.java:293) ~[spring-rabbit-2.1.5.RELEASE.jar:2.1.5.RELEASE]
- at org.springframework.amqp.rabbit.connection.ConnectionFactoryUtils.doGetTransactionalResourceHolder(ConnectionFactoryUtils.java:131) ~[spring-rabbit-2.1.5.RELEASE.jar:2.1.5.RELEASE]
- at org.springframework.amqp.rabbit.connection.ConnectionFactoryUtils.getTransactionalResourceHolder(ConnectionFactoryUtils.java:93) ~[spring-rabbit-2.1.5.RELEASE.jar:2.1.5.RELEASE]
- at org.springframework.amqp.rabbit.connection.ConnectionFactoryUtils.getTransactionalResourceHolder(ConnectionFactoryUtils.java:76) ~[spring-rabbit-2.1.5.RELEASE.jar:2.1.5.RELEASE]
- at org.springframework.amqp.rabbit.listener.BlockingQueueConsumer.start(BlockingQueueConsumer.java:570) ~[spring-rabbit-2.1.5.RELEASE.jar:2.1.5.RELEASE]
- ... 3 common frames omitted
- Caused by: com.rabbitmq.client.AuthenticationFailureException: ACCESS_REFUSED - Login was refused using authentication mechanism PLAIN. For details see the broker logfile.
- at com.rabbitmq.client.impl.AMQConnection.start(AMQConnection.java:362) ~[amqp-client-5.4.3.jar:5.4.3]
- at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1104) ~[amqp-client-5.4.3.jar:5.4.3]
- at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1054) ~[amqp-client-5.4.3.jar:5.4.3]
- at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:994) ~[amqp-client-5.4.3.jar:5.4.3]
- at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.createBareConnection(AbstractConnectionFactory.java:462) ~[spring-rabbit-2.1.5.RELEASE.jar:2.1.5.RELEASE]
- ... 10 common frames omitted
-
- 2019-04-28 19:24:43.023 WARN 12676 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Failed to start bean 'org.springframework.amqp.rabbit.config.internalRabbitListenerEndpointRegistry'; nested exception is org.springframework.amqp.AmqpIllegalStateException: Fatal exception on listener startup
- 2019-04-28 19:24:43.026 INFO 12676 --- [ main] o.s.a.r.l.SimpleMessageListenerContainer : Waiting for workers to finish.
- 2019-04-28 19:24:43.026 ERROR 12676 --- [ntContainer#0-1] o.s.a.r.l.SimpleMessageListenerContainer : Stopping container from aborted consumer
- 2019-04-28 19:24:43.026 INFO 12676 --- [ main] o.s.a.r.l.SimpleMessageListenerContainer : Successfully waited for workers to finish.
- 2019-04-28 19:24:43.026 INFO 12676 --- [ntContainer#0-1] o.s.a.r.l.SimpleMessageListenerContainer : Shutdown ignored - container is not active already
- 2019-04-28 19:24:43.027 INFO 12676 --- [ main] o.s.a.r.l.SimpleMessageListenerContainer : Shutdown ignored - container is not active already
- 2019-04-28 19:24:43.028 INFO 12676 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down ExecutorService 'applicationTaskExecutor'
- 2019-04-28 19:24:43.034 INFO 12676 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
- 2019-04-28 19:24:43.053 INFO 12676 --- [ main] ConditionEvaluationReportLoggingListener :
-
- Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
- 2019-04-28 19:24:43.064 ERROR 12676 --- [ main] o.s.boot.SpringApplication : Application run failed
-
- org.springframework.context.ApplicationContextException: Failed to start bean 'org.springframework.amqp.rabbit.config.internalRabbitListenerEndpointRegistry'; nested exception is org.springframework.amqp.AmqpIllegalStateException: Fatal exception on listener startup
- at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:185) ~[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE]
- at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:53) ~[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE]
- at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:360) ~[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE]
- at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:158) ~[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE]
- at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:122) ~[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE]
- at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:893) ~[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE]
- at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh(ServletWebServerApplicationContext.java:163) ~[spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]
- at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:552) ~[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE]
- at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142) ~[spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]
- at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775) [spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]
- at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]
- at org.springframework.boot.SpringApplication.run(SpringApplication.java:316) [spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]
- at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260) [spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]
- at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248) [spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]
- at me.zhao.Sp2Application.main(Sp2Application.java:9) [classes/:na]
- Caused by: org.springframework.amqp.AmqpIllegalStateException: Fatal exception on listener startup
- at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.waitForConsumersToStart(SimpleMessageListenerContainer.java:553) ~[spring-rabbit-2.1.5.RELEASE.jar:2.1.5.RELEASE]
- at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.doStart(SimpleMessageListenerContainer.java:511) ~[spring-rabbit-2.1.5.RELEASE.jar:2.1.5.RELEASE]
- at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.start(AbstractMessageListenerContainer.java:1296) ~[spring-rabbit-2.1.5.RELEASE.jar:2.1.5.RELEASE]
- at org.springframework.amqp.rabbit.listener.RabbitListenerEndpointRegistry.startIfNecessary(RabbitListenerEndpointRegistry.java:294) ~[spring-rabbit-2.1.5.RELEASE.jar:2.1.5.RELEASE]
- at org.springframework.amqp.rabbit.listener.RabbitListenerEndpointRegistry.start(RabbitListenerEndpointRegistry.java:249) ~[spring-rabbit-2.1.5.RELEASE.jar:2.1.5.RELEASE]
- at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:182) ~[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE]
- ... 14 common frames omitted
- Caused by: org.springframework.amqp.rabbit.listener.exception.FatalListenerStartupException: Authentication failure
- at org.springframework.amqp.rabbit.listener.BlockingQueueConsumer.start(BlockingQueueConsumer.java:576) ~[spring-rabbit-2.1.5.RELEASE.jar:2.1.5.RELEASE]
- at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.initialize(SimpleMessageListenerContainer.java:1196) ~[spring-rabbit-2.1.5.RELEASE.jar:2.1.5.RELEASE]
- at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run(SimpleMessageListenerContainer.java:1041) ~[spring-rabbit-2.1.5.RELEASE.jar:2.1.5.RELEASE]
- at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_211]
- Caused by: org.springframework.amqp.AmqpAuthenticationException: com.rabbitmq.client.AuthenticationFailureException: ACCESS_REFUSED - Login was refused using authentication mechanism PLAIN. For details see the broker logfile.
- at org.springframework.amqp.rabbit.support.RabbitExceptionTranslator.convertRabbitAccessException(RabbitExceptionTranslator.java:65) ~[spring-rabbit-2.1.5.RELEASE.jar:2.1.5.RELEASE]
- at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.createBareConnection(AbstractConnectionFactory.java:509) ~[spring-rabbit-2.1.5.RELEASE.jar:2.1.5.RELEASE]
- at org.springframework.amqp.rabbit.connection.CachingConnectionFactory.createConnection(CachingConnectionFactory.java:682) ~[spring-rabbit-2.1.5.RELEASE.jar:2.1.5.RELEASE]
- at org.springframework.amqp.rabbit.connection.ConnectionFactoryUtils.createConnection(ConnectionFactoryUtils.java:214) ~[spring-rabbit-2.1.5.RELEASE.jar:2.1.5.RELEASE]
- at org.springframework.amqp.rabbit.connection.ConnectionFactoryUtils$RabbitResourceFactory.createConnection(ConnectionFactoryUtils.java:293) ~[spring-rabbit-2.1.5.RELEASE.jar:2.1.5.RELEASE]
- at org.springframework.amqp.rabbit.connection.ConnectionFactoryUtils.doGetTransactionalResourceHolder(ConnectionFactoryUtils.java:131) ~[spring-rabbit-2.1.5.RELEASE.jar:2.1.5.RELEASE]
- at org.springframework.amqp.rabbit.connection.ConnectionFactoryUtils.getTransactionalResourceHolder(ConnectionFactoryUtils.java:93) ~[spring-rabbit-2.1.5.RELEASE.jar:2.1.5.RELEASE]
- at org.springframework.amqp.rabbit.connection.ConnectionFactoryUtils.getTransactionalResourceHolder(ConnectionFactoryUtils.java:76) ~[spring-rabbit-2.1.5.RELEASE.jar:2.1.5.RELEASE]
- at org.springframework.amqp.rabbit.listener.BlockingQueueConsumer.start(BlockingQueueConsumer.java:570) ~[spring-rabbit-2.1.5.RELEASE.jar:2.1.5.RELEASE]
- ... 3 common frames omitted
- Caused by: com.rabbitmq.client.AuthenticationFailureException: ACCESS_REFUSED - Login was refused using authentication mechanism PLAIN. For details see the broker logfile.
- at com.rabbitmq.client.impl.AMQConnection.start(AMQConnection.java:362) ~[amqp-client-5.4.3.jar:5.4.3]
- at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1104) ~[amqp-client-5.4.3.jar:5.4.3]
- at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1054) ~[amqp-client-5.4.3.jar:5.4.3]
- at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:994) ~[amqp-client-5.4.3.jar:5.4.3]
- at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.createBareConnection(AbstractConnectionFactory.java:462) ~[spring-rabbit-2.1.5.RELEASE.jar:2.1.5.RELEASE]
- ... 10 common frames omitted
-
-
- Process finished with exit code -1
3、解决办法
我这里犯了一个错误是使用 guest 进行远程连接,guest用户是rabbitMQ的默认用户,拥有很大的权限,并且被限制为只能进行本地登录即(localhost),应新建用户配置权限进行远程访问,这里用的是windows环境。
- rabbitmqctl.bat add_user zhao root
- rabbitmqctl.bat set_user_tags zhao administrator
- rabbitmqctl.bat set_permissions -p / zhao ".*" ".*" ".*"
完成上述操作后,修改application.properties文件的用户名、密码即可成功连接。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。