Consumer queue remove even though cachelevel is set to CACHE_CONSUMER - activemq
I realized, even after explicitly setting the property
<property name="cacheLevelName" value="CACHE_CONSUMER"/>
my consumer is still removed.
See log below:
23:14:25,180 | Usage | 49 - org.apache.activemq.activemq-core - 5.5.0.fuse-00-43 | Main:memory:queue://reply:memory: usage change from: 0% of available memory, to: 1% of available memory
23:14:25,180 | Queue | 49 - org.apache.activemq.activemq-core - 5.5.0.fuse-00-43 | reply toPageIn: 1, Inflight: 0, pagedInMessages.size 2, enqueueCount: 2, dequeueCount: 1
23:14:25,180 | Queue | 49 - org.apache.activemq.activemq-core - 5.5.0.fuse-00-43 | reply toPageIn: 0, Inflight: 0, pagedInMessages.size 3, enqueueCount: 2, dequeueCount: 1
23:14:25,180 | Queue | 49 - org.apache.activemq.activemq-core - 5.5.0.fuse-00-43 | reply toPageIn: 0, Inflight: 0, pagedInMessages.size 3, enqueueCount: 2, dequeueCount: 1
23:14:25,649 | ActiveMQMessageConsumer | 49 - org.apache.activemq.activemq-core - 5.5.0.fuse-00-43 | remove: ID:TestESB-3364-1321307776420-8:1:1:84, lastDeliveredSequenceId:0
23:14:25,649 | AbstractRegion | 49 - org.apache.activemq.activemq-core - 5.5.0.fuse-00-43 | default removing consumer: ID:TestESB-3364-1321307776420-8:1:1:84 for destination: queue://routerResponse
23:14:25,649 | Queue | 49 - org.apache.activemq.activemq-core - 5.5.0.fuse-00-43 | queue://routerResponse remove sub: QueueSubscription: consumer=ID:TestESB-3364-1321307776420-8:1:1:84, destinations=1, dispatched=0, delivered=0, pending=0, lastDeliveredSeqId: 0, dequeues: 0, dispatched: 0, inflight: 0
23:14:25,649 | AbstractRegion | 49 - org.apache.activemq.activemq-core - 5.5.0.fuse-00-43 | default adding consumer: ID:TestESB-3364-1321307776420-8:1:1:85 for destination: queue://routerResponse
23:14:25,649 | Queue | 49 - org.apache.activemq.activemq-core - 5.5.0.fuse-00-43 | queue://routerResponse add sub: QueueSubscription: consumer=ID:TestESB-3364-1321307776420-8:1:1:85, destinations=0, dispatched=0, delivered=0, pending=0, dequeues: 0, dispatched: 0, inflight: 0
23:14:26,165 | ActiveMQMessageConsumer | 49 - org.apache.activemq.activemq-core - 5.5.0.fuse-00-43 | remove: ID:TestESB-3364-1321307776420-14:1:1:4, lastDeliveredSequenceId:0
23:14:26,165 | AbstractRegion | 49 - org.apache.activemq.activemq-core - 5.5.0.fuse-00-43 | default removing consumer: ID:TestESB-3364-1321307776420-14:1:1:4 for destination: queue://reply
23:14:26,165 | Queue | 49 - org.apache.activemq.activemq-core - 5.5.0.fuse-00-43 | queue://reply remove sub: QueueSubscription: consumer=ID:TestESB-3364-1321307776420-14:1:1:4, destinations=1, dispatched=0, delivered=0, pending=0, lastDeliveredSeqId: 0, dequeues: 1, dispatched: 1, inflight: 0
23:14:26,165 | Queue | 49 - org.apache.activemq.activemq-core - 5.5.0.fuse-00-43 | reply toPageIn: 0, Inflight: 0, pagedInMessages.size 3, enqueueCount: 2, dequeueCount: 1
23:14:26,165 | AbstractRegion | 49 - org.apache.activemq.activemq-core - 5.5.0.fuse-00-43 | default adding consumer: ID:TestESB-3364-1321307776420-14:1:1:5 for destination: queue://reply
23:14:26,165 | Queue | 49 - org.apache.activemq.activemq-core - 5.5.0.fuse-00-43 | queue://reply add sub: QueueSubscription: consumer=ID:TestESB-3364-1321307776420-14:1:1:5, destinations=0, dispatched=0, delivered=0, pending=0, dequeues: 1, dispatched: 1, inflight: 0
23:14:26,165 | Queue | 49 - org.apache.activemq.activemq-core - 5.5.0.fuse-00-43 | reply toPageIn: 0, Inflight: 0, pagedInMessages.size 3, enqueueCount: 2, dequeueCount: 1
23:14:26,649 | ActiveMQMessageConsumer | 49 - org.apache.activemq.activemq-core - 5.5.0.fuse-00-43 | remove: ID:TestESB-3364-1321307776420-8:1:1:85, lastDeliveredSequenceId:0
See my camel spring config below:
<bean id="providerConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
<!--<property name="brokerURL"><value>${aero-provider-broker-url}</value></property>-->
<bean id="providerActiveMQConfig" class="org.apache.activemq.camel.component.ActiveMQConfiguration">
<property name="connectionFactory" ref="providerConnectionFactory"/>
<property name="cacheLevelName" value="CACHE_CONSUMER"/>
<property name="concurrentConsumers" value="${jms-concurrent-consumers}"/>
<property name="requestTimeout" value="${jms-request-timeout}"/>
<property name="priority" value="${jms-message-priority}"/>
</bean>
<bean id="providerActivemq" class="org.apache.activemq.camel.component.ActiveMQComponent">
<property name="configuration" ref="providerActiveMQConfig"/>
<property name="brokerURL"><value>${provider-broker-url}</value></property>
</bean>
Edit here >>>>
BEan definition:
<bean id="localJMSConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="alwaysSessionAsync" value="false"/>
<property name="alwaysSyncSend" value="true"/>
<property name="brokerURL"><value>${local-broker-url}</value></property>
<property name="closeTimeout" value="150000"/>
<property name="copyMessageOnSend" value="true"/>
<property name="disableTimeStampsByDefault" value="false"/>
<property name="dispatchAsync" value="false"/>
<property name="objectMessageSerializationDefered" value="false"/>
<property name="optimizeAcknowledge" value="false"/>
<property name="optimizedMessageDispatch" value="true"/>
<property name="producerWindowSize" value="0"/>
<property name="statsEnabled" value="false"/>
<property name="useAsyncSend" value="false"/>
<property name="useCompression" value="false"/>
<property name="sendTimeout" value="0"/>
</bean>
<bean id="localJMSTransactionManager" class="org.springframework.jms.connection.JmsTransactionManager">
<property name="connectionFactory" ref="localJMSConnectionFactory" />
</bean>
<bean id="localRequestJMSConfig" class="org.apache.camel.component.jms.JmsConfiguration">
<property name="connectionFactory" ref="localJMSConnectionFactory"/>
<property name="concurrentConsumers" value="${jms-concurrent-consumers}"/>
<property name="deliveryPersistent" value="true"/>
<property name="priority" value="9"/>
</bean>
<bean id="localRequestJMS" class="org.apache.camel.component.jms.JmsComponent">
<property name="configuration" ref="localRequestJMSConfig"/>
</bean>
Camel Enpoint Definition:
<camel:endpoint id="jmsEndpoint" camelContextId="bohProcessorCC" uri="localRequestJMS:queue:${boh-processor-queue}"/>
<camel:endpoint id="providerEndpoint" camelContextId="bohProcessorCC" uri="providerActivemq:queue:${generic-http-provider-queue}?exchangePattern=InOut&requestTimeout=${jms-request-timeout}&replyTo=reply"/>
Camel Route:
<from ref="jmsEndpoint"/>
<bean ref="service" method="getSignInRequest"/>
<transform><simple>XML=${in.body}</simple></transform>
<inOut ref="providerEndpoint"/>
<bean ref="service" method="getSignInResponseData"/>
<bean ref="utilityServicesBean" method="process"/>
<bean ref="service" method="getPassword"/>
<inOut ref="providerEndpoint"/>
<bean ref="camelPropertyEnricherBean" method="addCustReference"/>
<bean ref="camelPropertyEnricherBean" method="normalizeXML"/>
<inOut ref="providerEndpoint"/>
On the second call, the exchange times out, usually saying timeout. Typically there is response on the reply queue but the log says correlation id doesnt match. I noticed that if I ask camel to set the message id as correlation id just before calling the provider endpoint, it usually returns with a message. Even that fails sometimes when there are high traffic.
You use request/reply over JMS with Camel, eg yo do an inOut ref="providerEndpoint", which also uses a fixed replyTo queue name, as you specify replyTo=reply.
That means Camel forces to uses CACHE_SESSION as the reply queue is considered a shared reply queue, and Camel uses a JMS Message selector to pickup the expected reply message based on correlation IDs. And for the JMS message selector to be updated, you need to re-create the consumer. And that is why you see the a consumer is removed in the logs. Its that reply consumer.
In Camel 2.9 onwards we introduced a replyToType option, which you can set to replyToType=Exclusive. And then the reply queue is considered exclusive, which means Camel uses CACHE_CONSUMER instead.
Related
QFIL "ERROR: the operation is not allowed to write"
when trying to flash STOCK rom for my hard bricked Vivo Nex 3s in EDL mode, I get that error. I even put the firmware folder into the same one as QFIL, but to no avail. I'm using rawprogram_unsparse0.xml and patch0.xml. the firmware file doesnt have rawprogram0.xml, so I'm using the one I mentioned. My phone is stuck in bootloop, because I accidentaly downgraded my phone, and now its stuck at saying "updating", and constantly reboots. PLEASE SEE LOG IN ATTACHMENT!! Any help is greatly appreciated. choose flat build and storage type: UFS choose programmer path (installed to SD card): F:\PD1950_A_1.14.7_vivo_qcom_LA.UM.8.12.r1- 02100_sm8250_split\prog_firehose_ddr.elf choose xml file rawprogram_unsparse0.xml and patch0.xml put phone into EDL mode (through short point) and immediatly click "Download" once port is recognized receive Frhose Fail error "the operation is not allowed to write" 11:17:16: INFO: FH_LOADER WAS CALLED EXACTLY LIKE THIS ************************************************ C:\Program Files (x86)\Qualcomm\QPST\bin\fh_loader.exe --port=\\.\COM5 --sendxml=rawprogram_unsparse0.xml --search_path=C:\Program Files (x86)\Qualcomm\QPST\bin\PD1950_A_5.13.8_vivo_qcom_LA.UM.8.12.r1-02100_sm8250_split --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs ************************************************ 11:17:16: DEBUG: Binary build date: Jun 25 2019 # 03:16:10 11:17:16: DEBUG: Build Version: 19.06.25.03.16.10 11:17:16: INFO: Current working dir (cwd): C:\Users\bison\AppData\Roaming\Qualcomm\QFIL\COMPORT_5\ 11:17:16: INFO: Showing network mappings to allow debugging 11:17:16: DEBUG: New connections will be remembered. 11:17:16: DEBUG: 11:17:16: DEBUG: There are no entries in the list. 11:17:16: DEBUG: 11:17:16: INFO: 11:17:16: INFO: Trying to store 'rawprogram_unsparse0.xml' in string table 11:17:16: DEBUG: ================================================================================== 11:17:16: DEBUG: ================================================================================== 11:17:16: INFO: Looking for file 'rawprogram_unsparse0.xml' 11:17:16: DEBUG: 1. Calling stat('C:\Program Files (x86)\Qualcomm\QPST\bin\PD1950_A_5.13.8_vivo_qcom_LA.UM.8.12.r1-02100_sm8250_split\rawprogram_unsparse0.xml') 11:17:16: DEBUG: 2. Calling fopen('C:\Program Files (x86)\Qualcomm\QPST\bin\PD1950_A_5.13.8_vivo_qcom_LA.UM.8.12.r1-02100_sm8250_split\rawprogram_unsparse0.xml') with AccessMode='rb' 11:17:16: DEBUG: Trying get filesize, calling fseek() 11:17:16: DEBUG: Found 'C:\Program Files (x86)\Qualcomm\QPST\bin\PD1950_A_5.13.8_vivo_qcom_LA.UM.8.12.r1-02100_sm8250_split\rawprogram_unsparse0.xml' (13060 bytes) 11:17:16: DEBUG: 2. Calling fopen('C:\Program Files (x86)\Qualcomm\QPST\bin\PD1950_A_5.13.8_vivo_qcom_LA.UM.8.12.r1-02100_sm8250_split\rawprogram_unsparse0.xml') with AccessMode='r' 11:17:16: DEBUG: Trying get filesize, calling fseek() 11:17:16: DEBUG: User set ZLPAWAREHOST to 1 11:17:16: INFO: User wants to talk to port '\\.\COM5' 11:17:16: DEBUG: port_fd=0x10C (cut out this part, due to lack of space) 11:17:16: DEBUG: XML FILE (117 bytes): CharsInBuffer=2736-117=2619 ------------------------------------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8" ?> <data> <log value="INFO: Binary build date: Dec 15 2021 # 16:17:01" /></data> ------------------------------------------------------------------------------------------- 11:17:16: INFO: TARGET SAID: 'INFO: Binary build date: Dec 15 2021 # 16:17:01' 11:17:16: DEBUG: XML FILE (118 bytes): CharsInBuffer=2619-118=2501 ------------------------------------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8" ?> <data> <log value="INFO: Binary build date: Dec 15 2021 # 16:17:01 " /></data> ------------------------------------------------------------------------------------------- 11:17:16: INFO: TARGET SAID: 'INFO: Binary build date: Dec 15 2021 # 16:17:01 ' 11:17:16: DEBUG: XML FILE (114 bytes): CharsInBuffer=2501-114=2387 ------------------------------------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8" ?> <data> <log value="INFO: Chip serial num: 229327202 (0xdab4162)" /></data> ------------------------------------------------------------------------------------------- 11:17:16: INFO: TARGET SAID: 'INFO: Chip serial num: 229327202 (0xdab4162)' 11:17:16: DEBUG: XML FILE (101 bytes): CharsInBuffer=2387-101=2286 ------------------------------------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8" ?> <data> <log value="INFO: Supported Functions (20):" /></data> ------------------------------------------------------------------------------------------- 11:17:16: INFO: TARGET SAID: 'INFO: Supported Functions (20):' 11:17:16: DEBUG: XML FILE (83 bytes): CharsInBuffer=2286-83=2203 ------------------------------------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8" ?> <data> <log value="INFO: program" /></data> ------------------------------------------------------------------------------------------- 11:17:16: INFO: TARGET SAID: 'INFO: program' 11:17:16: DEBUG: XML FILE (80 bytes): CharsInBuffer=2203-80=2123 ------------------------------------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8" ?> <data> <log value="INFO: read" /></data> ------------------------------------------------------------------------------------------- 11:17:16: INFO: TARGET SAID: 'INFO: read' 11:17:16: DEBUG: XML FILE (79 bytes): CharsInBuffer=2123-79=2044 ------------------------------------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8" ?> <data> <log value="INFO: nop" /></data> ------------------------------------------------------------------------------------------- 11:17:16: INFO: TARGET SAID: 'INFO: nop' 11:17:16: DEBUG: XML FILE (81 bytes): CharsInBuffer=2044-81=1963 ------------------------------------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8" ?> <data> <log value="INFO: patch" /></data> ------------------------------------------------------------------------------------------- 11:17:16: INFO: TARGET SAID: 'INFO: patch' 11:17:16: DEBUG: XML FILE (85 bytes): CharsInBuffer=1963-85=1878 ------------------------------------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8" ?> <data> <log value="INFO: configure" /></data> ------------------------------------------------------------------------------------------- 11:17:16: INFO: TARGET SAID: 'INFO: configure' 11:17:16: DEBUG: XML FILE (99 bytes): CharsInBuffer=1878-99=1779 ------------------------------------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8" ?> <data> <log value="INFO: setbootablestoragedrive" /></data> ------------------------------------------------------------------------------------------- 11:17:16: INFO: TARGET SAID: 'INFO: setbootablestoragedrive' 11:17:16: DEBUG: XML FILE (81 bytes): CharsInBuffer=1779-81=1698 ------------------------------------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8" ?> <data> <log value="INFO: erase" /></data> ------------------------------------------------------------------------------------------- 11:17:16: INFO: TARGET SAID: 'INFO: erase' 11:17:16: DEBUG: XML FILE (81 bytes): CharsInBuffer=1698-81=1617 ------------------------------------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8" ?> <data> <log value="INFO: power" /></data> ------------------------------------------------------------------------------------------- 11:17:16: INFO: TARGET SAID: 'INFO: power' 11:17:16: DEBUG: XML FILE (89 bytes): CharsInBuffer=1617-89=1528 ------------------------------------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8" ?> <data> <log value="INFO: firmwarewrite" /></data> ------------------------------------------------------------------------------------------- 11:17:16: INFO: TARGET SAID: 'INFO: firmwarewrite' 11:17:16: DEBUG: XML FILE (90 bytes): CharsInBuffer=1528-90=1438 ------------------------------------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8" ?> <data> <log value="INFO: getstorageinfo" /></data> ------------------------------------------------------------------------------------------- 11:17:16: INFO: TARGET SAID: 'INFO: getstorageinfo' 11:17:16: DEBUG: XML FILE (85 bytes): CharsInBuffer=1438-85=1353 ------------------------------------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8" ?> <data> <log value="INFO: benchmark" /></data> ------------------------------------------------------------------------------------------- 11:17:16: INFO: TARGET SAID: 'INFO: benchmark' 11:17:16: DEBUG: XML FILE (80 bytes): CharsInBuffer=1353-80=1273 ------------------------------------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8" ?> <data> <log value="INFO: peek" /></data> ------------------------------------------------------------------------------------------- 11:17:16: INFO: TARGET SAID: 'INFO: peek' 11:17:16: DEBUG: XML FILE (80 bytes): CharsInBuffer=1273-80=1193 ------------------------------------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8" ?> <data> <log value="INFO: poke" /></data> ------------------------------------------------------------------------------------------- 11:17:16: INFO: TARGET SAID: 'INFO: poke' 11:17:16: DEBUG: XML FILE (80 bytes): CharsInBuffer=1193-80=1113 ------------------------------------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8" ?> <data> <log value="INFO: emmc" /></data> ------------------------------------------------------------------------------------------- 11:17:16: INFO: TARGET SAID: 'INFO: emmc' 11:17:16: DEBUG: XML FILE (79 bytes): CharsInBuffer=1113-79=1034 ------------------------------------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8" ?> <data> <log value="INFO: ufs" /></data> ------------------------------------------------------------------------------------------- 11:17:16: INFO: TARGET SAID: 'INFO: ufs' 11:17:16: DEBUG: XML FILE (82 bytes): CharsInBuffer=1034-82=952 ------------------------------------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8" ?> <data> <log value="INFO: fixgpt" /></data> ------------------------------------------------------------------------------------------- 11:17:16: INFO: TARGET SAID: 'INFO: fixgpt' 11:17:16: DEBUG: XML FILE (94 bytes): CharsInBuffer=952-94=858 ------------------------------------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8" ?> <data> <log value="INFO: query_auth_id_info" /></data> ------------------------------------------------------------------------------------------- 11:17:16: INFO: TARGET SAID: 'INFO: query_auth_id_info' 11:17:16: DEBUG: XML FILE (88 bytes): CharsInBuffer=858-88=770 ------------------------------------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8" ?> <data> <log value="INFO: parse_sig_ex" /></data> ------------------------------------------------------------------------------------------- 11:17:16: INFO: TARGET SAID: 'INFO: parse_sig_ex' 11:17:16: DEBUG: XML FILE (85 bytes): CharsInBuffer=770-85=685 ------------------------------------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8" ?> <data> <log value="INFO: parse_sig" /></data> ------------------------------------------------------------------------------------------- 11:17:16: INFO: TARGET SAID: 'INFO: parse_sig' 11:17:16: DEBUG: XML FILE (91 bytes): CharsInBuffer=685-91=594 ------------------------------------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8" ?> <data> <log value="INFO: getsha256digest" /></data> ------------------------------------------------------------------------------------------- 11:17:16: INFO: TARGET SAID: 'INFO: getsha256digest' 11:17:16: DEBUG: XML FILE (105 bytes): CharsInBuffer=594-105=489 ------------------------------------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8" ?> <data> <log value="INFO: End of supported functions 20" /></data> ------------------------------------------------------------------------------------------- 11:17:16: INFO: TARGET SAID: 'INFO: End of supported functions 20' 11:17:16: DEBUG: XML FILE (105 bytes): CharsInBuffer=489-105=384 ------------------------------------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8" ?> <data> <log value="INFO: Calling handler for configure" /></data> ------------------------------------------------------------------------------------------- 11:17:16: INFO: TARGET SAID: 'INFO: Calling handler for configure' 11:17:16: DEBUG: XML FILE (105 bytes): CharsInBuffer=384-105=279 ------------------------------------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8" ?> <data> <log value="INFO: Storage type set to value UFS" /></data> ------------------------------------------------------------------------------------------- 11:17:16: INFO: TARGET SAID: 'INFO: Storage type set to value UFS' 11:17:16: DEBUG: XML FILE (279 bytes): CharsInBuffer=279-279=0 ------------------------------------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8" ?> <data> <response value="ACK" MemoryName="UFS" MinVersionSupported="1" Version="1" MaxPayloadSizeToTargetInBytes="1048576" MaxPayloadSizeToTargetInBytesSupported="1048576" MaxXMLSizeInBytes="4096" DateTime="Dec 15 2021 - 16:17:01" /></data> ------------------------------------------------------------------------------------------- 11:17:16: DEBUG: Response was 'ACK' 11:17:16: INFO: fh.attrs.MaxPayloadSizeToTargetInBytes = 1048576 11:17:16: INFO: fh.attrs.MaxPayloadSizeToTargetInBytesSupported = 1048576 11:17:16: DEBUG: Got the ACK for the <configure> 11:17:16: INFO: In handleProgram('persist_1.img') 11:17:16: DEBUG: ================================================================================== 11:17:16: DEBUG: ================================================================================== 11:17:16: INFO: Looking for file 'persist_1.img' 11:17:16: DEBUG: 1. Calling stat('C:\Program Files (x86)\Qualcomm\QPST\bin\PD1950_A_5.13.8_vivo_qcom_LA.UM.8.12.r1-02100_sm8250_split\persist_1.img') 11:17:16: DEBUG: 2. Calling fopen('C:\Program Files (x86)\Qualcomm\QPST\bin\PD1950_A_5.13.8_vivo_qcom_LA.UM.8.12.r1-02100_sm8250_split\persist_1.img') with AccessMode='rb' 11:17:16: DEBUG: Trying get filesize, calling fseek() 11:17:16: DEBUG: Found 'C:\Program Files (x86)\Qualcomm\QPST\bin\PD1950_A_5.13.8_vivo_qcom_LA.UM.8.12.r1-02100_sm8250_split\persist_1.img' (24576 bytes) 11:17:16: DEBUG: 2. Calling fopen('C:\Program Files (x86)\Qualcomm\QPST\bin\PD1950_A_5.13.8_vivo_qcom_LA.UM.8.12.r1-02100_sm8250_split\persist_1.img') with AccessMode='rb' 11:17:16: DEBUG: Trying get filesize, calling fseek() 11:17:16: DEBUG: File size is 24576 bytes 11:17:16: DEBUG: NumSectors needed 6 11:17:16: INFO: ======================================================= 11:17:16: INFO: {<program> FILE: 'C:\Program Files (x86)\Qualcomm\QPST\bin\PD1950_A_5.13.8_vivo_qcom_LA.UM.8.12.r1-02100_sm8250_split\persist_1.img'} 11:17:16: INFO: {<program> (24.00 KB) 6 sectors needed at location 8 on LUN 0} 11:17:16: INFO: ======================================================= 11:17:16: DEBUG: CHANNEL DATA (P0001) (H00203) ( 281 bytes) - HOST TO TARGET --> =========================================================================================================== <?xml version="1.0" encoding="UTF-8" ?> <data> <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="persist_1.img" label="persist" num_partition_sectors="6" partofsingleimage="false" physical_partition_number="0" readbackverify="false" start_sector="8" /> </data> ============================================================================================================ 11:17:16: DEBUG: CharsInBuffer=0 Trying to read from USB 8192 bytes 11:17:17: DEBUG: CHANNEL DATA (315 bytes) <-- TARGET to HOST 11:17:17: DEBUG: CharsInBuffer = 315 11:17:17: DEBUG: printBuffer:6017 PRETTYPRINT Buffer is 315 bytes 11:17:17: DEBUG: printBuffer:6094 3C 3F 78 6D 6C 20 76 65 72 73 69 6F 6E 3D 22 31 <?xml version="1 11:17:17: DEBUG: printBuffer:6094 2E 30 22 20 65 6E 63 6F 64 69 6E 67 3D 22 55 54 .0" encoding="UT 11:17:17: DEBUG: printBuffer:6094 46 2D 38 22 20 3F 3E 0A 3C 64 61 74 61 3E 0A 3C F-8" ?>.<data>.< 11:17:17: DEBUG: printBuffer:6094 6C 6F 67 20 76 61 6C 75 65 3D 22 49 4E 46 4F 3A log value="INFO: 11:17:17: DEBUG: printBuffer:6094 20 43 61 6C 6C 69 6E 67 20 68 61 6E 64 6C 65 72 Calling handler 11:17:17: DEBUG: printBuffer:6094 20 66 6F 72 20 70 72 6F 67 72 61 6D 22 20 2F 3E for program" /> 11:17:17: DEBUG: printBuffer:6094 3C 2F 64 61 74 61 3E 3C 3F 78 6D 6C 20 76 65 72 </data><?xml ver 11:17:17: DEBUG: printBuffer:6094 73 69 6F 6E 3D 22 31 2E 30 22 20 65 6E 63 6F 64 sion="1.0" encod 11:17:17: DEBUG: printBuffer:6094 69 6E 67 3D 22 55 54 46 2D 38 22 20 3F 3E 0A 3C ing="UTF-8" ?>.< 11:17:17: DEBUG: printBuffer:6094 64 61 74 61 3E 0A 3C 6C 6F 67 20 76 61 6C 75 65 data>.<log value 11:17:17: DEBUG: printBuffer:6094 3D 22 45 52 52 4F 52 3A 20 54 68 65 20 6F 70 65 ="ERROR: The ope 11:17:17: DEBUG: printBuffer:6094 72 61 74 69 6F 6E 20 69 73 20 6E 6F 74 20 61 6C ration is not al 11:17:17: DEBUG: printBuffer:6094 6C 6F 77 65 64 20 66 6F 72 20 77 72 69 74 65 2E lowed for write. 11:17:17: DEBUG: printBuffer:6094 2E 2E 22 20 2F 3E 3C 2F 64 61 74 61 3E 3C 3F 78 .." /></data><?x 11:17:17: DEBUG: printBuffer:6094 6D 6C 20 76 65 72 73 69 6F 6E 3D 22 31 2E 30 22 ml version="1.0" 11:17:17: DEBUG: printBuffer:6094 20 65 6E 63 6F 64 69 6E 67 3D 22 55 54 46 2D 38 encoding="UTF-8 11:17:17: DEBUG: printBuffer:6094 22 20 3F 3E 0A 3C 64 61 74 61 3E 0A 3C 72 65 73 " ?>.<data>.<res 11:17:17: DEBUG: printBuffer:6094 70 6F 6E 73 65 20 76 61 6C 75 65 3D 22 4E 41 4B ponse value="NAK 11:17:17: DEBUG: printBuffer:6094 22 20 72 61 77 6D 6F 64 65 3D 22 66 61 6C 73 65 " rawmode="false 11:17:17: DEBUG: printBuffer:6094 22 20 2F 3E 3C 2F 64 61 74 61 3E " /></data> 11:17:17: DEBUG: printBuffer:6107 11:17:17: DEBUG: XML FILE (103 bytes): CharsInBuffer=315-103=212 ------------------------------------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8" ?> <data> <log value="INFO: Calling handler for program" /></data> ------------------------------------------------------------------------------------------- 11:17:17: INFO: TARGET SAID: 'INFO: Calling handler for program' 11:17:17: DEBUG: XML FILE (118 bytes): CharsInBuffer=212-118=94 ------------------------------------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8" ?> <data> <log value="ERROR: The operation is not allowed for write..." /></data> ------------------------------------------------------------------------------------------- 11:17:17: INFO: TARGET SAID: 'ERROR: The operation is not allowed for write...' 11:17:17: DEBUG: XML FILE (94 bytes): CharsInBuffer=94-94=0 ------------------------------------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8" ?> <data> <response value="NAK" rawmode="false" /></data> ------------------------------------------------------------------------------------------- 11:17:17: DEBUG: Response was 'NAK' _____ | ___| | |__ _ __ _ __ ___ _ __ | __| '__| '__/ _ \| '__| | |__| | | | | (_) | | \____/_| |_| \___/|_| 11:17:17: {ERROR: handleProgram:9521 program FAILED - Please see log
Erroneous and inconsistent output from env.render() in openai gym Taxi-v3 in Google Colab
I am trying to set up the OpenAI gym environment for the Taxi - V3 application in Google Colab and using the following code : from IPython.display import clear_output import gym env = gym.make("Taxi-v3", render_mode = 'ansi').env #env = gym.make("Taxi-v3", render_mode = 'ansi') Then I have a function that shows the Taxi position in the Colab cell def showStateVec(txR=3, txC=1,pxI=2,des=0): env.reset() state = env.encode(txR,txC,pxI,des) env.s = state print("State ", env.s, list(env.decode(env.s))) env.s = state p = env.render() print(p[0]) for k,v in env.P[state].items(): print(v) When I call # taxi at 3,1, passenger at 2, destination = 0 # note, moving to the WEST is not possible, the position does not change showStateVec(3,1,2,0) I get the following output ( i have replaced the yellow box with 'x'). Evidently, this is not correct. The taxi is being somewhere else State 328 [3, 1, 2, 0] +---------+ |R: |x: :G| | : | : : | | : : : : | | | : | : | |Y| : |B: | +---------+ [(1.0, 428, -1, False)] [(1.0, 228, -1, False)] [(1.0, 348, -1, False)] [(1.0, 328, -1, False)] [(1.0, 328, -10, False)] [(1.0, 328, -10, False)] However if I run the command again a second time, the yellow box moves elsewhere, even though the rest of the output is identical State 328 [3, 1, 2, 0] +---------+ |R: | : :G| | : | : : | | : : : : | | | : | : | |Y| :x|B: | +---------+ [(1.0, 428, -1, False)] [(1.0, 228, -1, False)] [(1.0, 348, -1, False)] [(1.0, 328, -1, False)] [(1.0, 328, -10, False)] [(1.0, 328, -10, False)] Here is the link to the Colab notebook where you can replicate the problem. I have also seen this and other solutions in stackoverflow but none seem to work. What should I do to ensure that the taxi ( or the yellow box representing the taxi) is displayed exactly where the state of the taxi says it should be. Please help.
JMeter how to disable summariser.name=summary while running from command prompt
I am running Jmeter scripts from the command line. While running I get this summary after every request. I understood from the documentation that we need comment or set summariser.name=summary to none. I don't want to see this summary. Pl. let me know how to disable it. 00:44:10.785 summary + 6 in 00:00:32 = 0.2/s Avg: 241 Min: 2 Max: 1239 Err: 1 (16.67%) Active: 1 Started: 1 Finished: 0 00:44:10.785 summary = 498 in 00:39:27 = 0.2/s Avg: 126 Min: 0 Max: 2851 Err: 32 (6.43%) 00:44:42.892 summary + 7 in 00:00:31 = 0.2/s Avg: 88 Min: 0 Max: 418 Err: 0 (0.00%) Active: 1 Started: 1 Finished: 0 00:44:42.892 summary = 505 in 00:39:57 = 0.2/s Avg: 126 Min: 0 Max: 2851 Err: 32 (6.34%) 00:45:14.999 summary + 6 in 00:00:31 = 0.2/s Avg: 73 Min: 2 Max: 216 Err: 0 (0.00%) Active: 1 Started: 1 Finished: 0 00:45:14.999 summary = 511 in 00:40:28 = 0.2/s Avg: 125 Min: 0 Max: 2851 Err: 32 (6.26%) 00:45:41.565 summary + 6 in 00:00:31 = 0.2/s Avg: 68 Min: 2 Max: 205 Err: 0 (0.00%) Active: 1 Started: 1 Finished: 0 00:45:41.565 summary = 517 in 00:40:58 = 0.2/s Avg: 125 Min: 0 Max: 2851 Err: 32 (6.19%) 00:46:13.681 summary + 6 in 00:00:31 = 0.2/s Avg: 103 Min: 2 Max: 384 Err: 0 (0.00%) Active: 1 Started: 1 Finished: 0 00:46:13.681 summary = 523 in 00:41:29 = 0.2/s Avg: 124 Min: 0 Max: 2851 Err: 32 (6.12%)
If you don't want to see the summariser output in the console you can amend your command to jmeter -Jsummariser.out=false -n -t test.jmx -l result.jtl in order to make the change permanent - put this line: summariser.out=false to user.properties file. If you want to turn off the summariser completely: Open jmeter.properties file with your favourite text editor Locate this line summariser.name=summary and either comment it by putting # character in front of it: #summariser.name=summary or just simply delete it That's it, you won't see summariser output on next execution More information: Summariser - Generate Summary Results - configuration Configuring JMeter Apache JMeter Properties Customization Guide
Redis timeout issue
I am getting timeout issue with redis. Following is the exception System.TimeoutException: Timeout performing EVAL, inst: 1, mgr: ProcessReadQueue, err: never, queue: 7, qu: 0, qs: 7, qc: 0, wr: 0, wq: 0, in: 507, ar: 1, clientName: EG-APP04, serverEndpoint: Unspecified/####, keyHashSlot: 12598, IOCP: (Busy=0,Free=1600,Min=800,Max=1600), WORKER: (Busy=187,Free=1413,Min=800,Max=1600), Local-CPU: unavailable Configuration: Connection string connectionString="####,connectRetry=10, abortConnect=false, allowAdmin=true, ssl=false" Am I missing something?
Try increasing your syncTimeout to a high value like below: connectionString="####,connectRetry=10, abortConnect=false, allowAdmin=true, ssl=false, syncTimeout=30000
Printing out a SQL table in an R Sweave PDF
This seems like it should be very simple but I can't seem to find the answer anywhere I look. This seems like it has just as much chance being easier to solve using clever SQL queries as it is to use R code. The table is being pulled into the script with this code: dbhandle <- SQLConn_remote(DBName = "DATABASE", ServerName = "SERVER") Testdf<-sqlQuery(dbhandle, 'select * from TABLENAME order by FileName, Number, Category', stringsAsFactors = FALSE) I want to print out a SQL Table on a R Sweave PDF. I'd like to do it with the following conditions: Printing only specific columns. This seems simple enough using sqlQuery but I've already created a variable in my script called Testdf that contains all of the table so I'd rather just subset that if I can. The reason I'm not satisfied to simply do this, is because the next condition seems beyond me in queries. Here's the tricky part. In the sample table I gave below, There is a list of File names that are organized by Version numbers and group Numbers. I'd like to print the table in the .Rnw file so that there are 3 columns. The 1st column is the FileName column, the 2nd column is a column of all Values where Number == 2, and the final (3rd) column is a column of all Values where Number == 3. Here's what the table looks like: | Name | Version | Category | Value | Date | Number | Build | Error | |:-----:|:-------:|:--------:|:-----:|:------:|:------:|:---------:|:-----:| | File1 | 0.01 | Time | 123 | 1-1-12 | 1 | Iteration | None | | File1 | 0.01 | Size | 456 | 1-1-12 | 1 | Iteration | None | | File1 | 0.01 | Final | 789 | 1-1-12 | 1 | Iteration | None | | File2 | 0.01 | Time | 312 | 1-1-12 | 1 | Iteration | None | | File2 | 0.01 | Size | 645 | 1-1-12 | 1 | Iteration | None | | File2 | 0.01 | Final | 978 | 1-1-12 | 1 | Iteration | None | | File3 | 0.01 | Time | 741 | 1-1-12 | 1 | Iteration | None | | File3 | 0.01 | Size | 852 | 1-1-12 | 1 | Iteration | None | | File3 | 0.01 | Final | 963 | 1-1-12 | 1 | Iteration | None | | File1 | 0.02 | Time | 369 | 1-1-12 | 2 | Iteration | None | | File1 | 0.02 | Size | 258 | 1-1-12 | 2 | Iteration | None | | File1 | 0.02 | Final | 147 | 1-1-12 | 2 | Iteration | None | | File2 | 0.02 | Time | 753 | 1-1-12 | 2 | Iteration | None | | File2 | 0.02 | Size | 498 | 1-1-12 | 2 | Iteration | None | | File2 | 0.02 | Final | 951 | 1-1-12 | 2 | Iteration | None | | File3 | 0.02 | Time | 753 | 1-1-12 | 2 | Iteration | None | | File3 | 0.02 | Size | 915 | 1-1-12 | 2 | Iteration | None | | File3 | 0.02 | Final | 438 | 1-1-12 | 2 | Iteration | None | Here's what I'd like it to look like: | Name | 0.01 | 0.02 | |:-----:|:----:|:----:| | File1 | 123 | 369 | | File1 | 456 | 258 | | File1 | 789 | 147 | | File2 | 312 | 753 | | File2 | 645 | 498 | | File2 | 978 | 951 | | File3 | 741 | 753 | | File3 | 852 | 915 | | File3 | 963 | 438 | The middle and right column titles are derived from the original Version column. The values in the middle column are all of the entries in the Value column that correspond to both 0.01 in the Version column and 1 in the Number column. The values in the right column are all of the entries in the Value column that correspond to both 0.02 in the Version column and 2 in the Number column. Here's a sample database for reference and if you'd like to reproduce this using R: rw1 <- c("File1", "File1", "File1", "File2", "File2", "File2", "File3", "File3", "File3", "File1", "File1", "File1", "File2", "File2", "File2", "File3", "File3", "File3", "File1", "File1", "File1", "File2", "File2", "File2", "File3", "File3", "File3") rw2 <- c("0.01", "0.01", "0.01", "0.01", "0.01", "0.01", "0.01", "0.01", "0.01", "0.02", "0.02", "0.02", "0.02", "0.02", "0.02", "0.02", "0.02", "0.02", "0.03", "0.03", "0.03", "0.03", "0.03", "0.03", "0.03", "0.03", "0.03") rw3 <- c("Time", "Size", "Final", "Time", "Size", "Final", "Time", "Size", "Final", "Time", "Size", "Final", "Time", "Size", "Final", "Time", "Size", "Final", "Time", "Size", "Final", "Time", "Size", "Final", "Time", "Size", "Final") rw4 <- c(123, 456, 789, 312, 645, 978, 741, 852, 963, 369, 258, 147, 753, 498, 951, 753, 915, 438, 978, 741, 852, 963, 369, 258, 147, 753, 498) rw5 <- c("01/01/12", "01/01/12", "01/01/12", "01/01/12", "01/01/12", "01/01/12", "01/01/12", "01/01/12", "01/01/12", "01/01/12", "01/01/12", "01/01/12", "01/01/12", "01/01/12", "01/01/12", "01/01/12", "01/01/12", "01/01/12", "01/01/12", "01/01/12", "01/01/12", "01/01/12", "01/01/12", "01/01/12", "01/01/12", "01/01/12", "01/01/12") rw6 <- c(1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3) rw7 <- c("Iteration", "Iteration", "Iteration", "Iteration", "Iteration", "Iteration", "Iteration", "Iteration", "Iteration", "Iteration", "Iteration", "Iteration", "Iteration", "Iteration", "Iteration", "Iteration", "Iteration", "Iteration", "Release", "Release", "Release", "Release", "Release", "Release", "Release", "Release", "Release") rw8 <- c("None", "None", "None", "None", "None", "None", "None", "None", "None", "None", "None", "None", "None", "None", "None", "None", "None", "None", "Cannot Connect to Database", "None", "None", "None", "None", "None", "None", "None", "None") Testdf = data.frame(rw1, rw2, rw3, rw4, rw5, rw6, rw7, rw8) colnames(Testdf) <- c("FileName", "Version", "Category", "Value", "Date", "Number", "Build", "Error")
Here's a solution using dplyr and tidyr. The relevant variables are selected. An index column is then added to allow for the data to be spread without issues around duplicate indices. The data is then reshaped with spread, and finally the Index column removed. library("dplyr") library("tidyr") Testdf %>% select(FileName, Version, Value) %>% group_by(FileName, Version) %>% mutate(Index = 1:n()) %>% spread(Version, Value) %>% select(-Index) If it can always be assumed that for each FileName there will be 9 Values, one for each combination of Version and Category, then this would work: Testdf %>% select(FileName, Category, Version, Value) %>% spread(Version, Value) %>% select(-Category) If you wanted to use data.table, you could do: setDT(Testdf)[, split(Value, Version), by = FileName] If you want LaTeX output, then you could further pipe the output to xtable::xtable.