Inleiding
Dit document beschrijft de procedure om problemen op te lossen hoe u de wachtrij voor ABBYY Advance Message Queuing Protocol (AMQP) kunt reinigen
Bijgedragen Aswathi Surendran, Gustavo Bell Cisco TAC-engineers.
Voorwaarden
Vereisten
Cisco raadt kennis van de volgende onderwerpen aan:
- Linux-interface
- Virtuele machineconversiemodules
- konijn
Gebruikte componenten
De informatie in dit document is gebaseerd op deze softwareversies:
- Cloud Center versie 4.3.x tot 4.6.x
- CloudCenter Message Buss (RabbitMQ_Server)
De informatie in dit document is gebaseerd op de apparaten in een specifieke laboratoriumomgeving. Alle apparaten die in dit document worden beschreven, hadden een opgeschoonde (standaard)configuratie. Als uw netwerk live is, moet u de potentiële impact van elke opdracht begrijpen.
Achtergrondinformatie
De actieve schroefdraad van de pool is 64, waarbij de draden die corresponderen met de banen meer dan 3000 waren, wat zal worden verworpen omdat de code niet meer dan 64 draden tegelijk kan verwerken, zodat hij zal wachten tot de vorige taak is voltooid en de andere taak zal uitvoeren.
Elke taak die groter is dan wat een derde geëxecuteerd kan consumeren, zal worden afgewezen.
Probleem
de filecliqr-verbinding.log bevindt zich in /usr/local/tomcatgua/logs/rapporteert een fout:
Caused by: org.springframework.core.task.TaskRejectedException: Executor [java.util.concurrent.ThreadPoolExecutor@6737f4fb[Running, pool size = 64, active threads = 64, queued tasks = 3000, completed tasks = 413]] did not accept task: org.springframework.aop.interceptor.AsyncExecutionInterceptor$1@6b0517b3
at org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor.submit(ThreadPoolTaskExecutor.java:284)
at org.springframework.aop.interceptor.AsyncExecutionAspectSupport.doSubmit(AsyncExecutionAspectSupport.java:186)
at org.springframework.aop.interceptor.AsyncExecutionInterceptor.invoke(AsyncExecutionInterceptor.java:123)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)
at com.sun.proxy.$Proxy84.processMessage(Unknown Source)
at com.osmosix.commons.messaging.listeners.impl.DefaultNodeMessageListener.handleMessage(DefaultNodeMessageListener.java:35)
at sun.reflect.GeneratedMethodAccessor78.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:269)
at org.springframework.amqp.rabbit.listener.adapter.MessageListenerAdapter.invokeListenerMethod(MessageListenerAdapter.java:383)
... 12 more
Caused by: java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.FutureTask@3911a213 rejected from java.util.concurrent.ThreadPoolExecutor@6737f4fb[Running, pool size = 64, active threads = 64, queued tasks = 3000, completed tasks = 413]
at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2047)
at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:823)
at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1369)
at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
at org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor.submit(ThreadPoolTaskExecutor.java:281)
... 23 more
2016-10-19 02:32:32,205 INFO annotation.RequestMappingHandlerMapping [localhost-startStop-1] - Mapped "{[/image/service/dltargetlocal],methods=[POST]}" onto public java.util.Map<java.lang.String, ?> com.osmosix.gateway.image.transform.ImageTransformController.downloadToTargetLocal(com.osmosix.commons.image.transform.DownloadImageFileRequest)
2016-10-19 02:32:32,206 WARN listener.ConditionalRejectingErrorHandler [SimpleAsyncTaskExecutor-1] - Execution of Rabbit message listener failed.
org.springframework.amqp.rabbit.listener.exception.ListenerExecutionFailedException: Listener method 'handleMessage' threw exception
at org.springframework.amqp.rabbit.listener.adapter.MessageListenerAdapter.invokeListenerMethod(MessageListenerAdapter.java:391)
at org.springframework.amqp.rabbit.listener.adapter.MessageListenerAdapter.onMessage(MessageListenerAdapter.java:294)
at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:757)
at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:680)
at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.access$001(SimpleMessageListenerContainer.java:93)
at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$1.invokeListener(SimpleMessageListenerContainer.java:183)
at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.invokeListener(SimpleMessageListenerContainer.java:1352)
at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.executeListener(AbstractMessageListenerContainer.java:661)
at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.doReceiveAndExecute(SimpleMessageListenerContainer.java:1096)
at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.receiveAndExecute(SimpleMessageListenerContainer.java:1080)
at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.access$800(SimpleMessageListenerContainer.java:93)
at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run(SimpleMessageListenerContainer.java:1197)
at java.lang.Thread.run(Thread.java:745)
Resolutie
Stap 1. Aanmelden bij RabbitMQ server via SSH.
Stap 2. Schakelt over naar basisgebruiker.
# sudo -i
Stap 3. Schakel de stekker in.
# rabbitmq-plugins enable rabbitmq_management
Stap 4. Toegang tot de opdracht rabbitmqadmin inschakelen.
# chmod +x `find /var/lib/rabbitmq/ -name "rabbitmqadmin"`
# ln -s `find /var/lib/rabbitmq/ -name "rabbitmqadmin"` /usr/sbin
Stap 5. RabbitMQ is toegankelijk via GUI.
http://
:15672 (username=cliqr password=cliqr)
Opmerking: Vervang RabbitMQ_Server_IP in de configuratie met uw RabbitMQ server-adres
Navigeren in wachtrijen om de details te zien
of
CLI:
# rabbitmqadmin -V /cliqr -u cliqr -p cliqr list queues
# rabbitmqadmin -V /cliqr -u cliqr -p cliqr list exchanges
# rabbitmqadmin -V /cliqr -u cliqr -p cliqr list channels
Stap 6. Om de gateway in de wachtrij te verwijderen.
#rabbitmqadmin -V /cliqr delete queue name=cliqr.gateway.heartbeat.queue --username=cliqr --password=cliqr
Stap 7. Herstart de dienstverlening in RabbitServer.
#/etc/init.d/tomcatgua stop
#/etc/init.d/tomcatgua start
Opmerking: Als cliqr.gateway.harartbeat.wachtrij ontbreekt, dient u de CCO tomcat-service opnieuw te starten volgens de onderstaande stappen:
Stap 8. Aanmelden bij CCO-server via SSH.
Stap 9. Schakelt over naar basisgebruiker.
# sudo -i
Stap 10. Start de Tomcat-server opnieuw.
#/etc/init.d/tomcat stop
#/etc/init.d/tomcat start