Maximo Anywhere Map Location Issue - maximo-anywhere
I am using Maximo Anywhere 7.5.2 (Work Execution App). I have made the necessary changes in .properties files for MAP. I need to see some location in Map (Online), I have added some location data (Lat,Long) in MAM but couldn't get the same in device.
Logs:
2016-01-22 10:46:51.400 WorkExecution[1689:755353] got show busy call
2016-01-22 10:46:51.401 WorkExecution[1689:755353] showing busy indicator
2016-01-22 10:46:51.401 WorkExecution[1689:755353] WARN: Loading message showed by application = true
2016-01-22 10:46:51.403 WorkExecution[1689:755353] WARN: Show View WorkExecution.MapView
2016-01-22 10:46:51.404 WorkExecution[1689:755353] WLReachability Flag Status: -R ------- networkStatusForFlags
2016-01-22 10:46:51.407 WorkExecution[1689:755353] [TIMER] Create Resources:WorkExecution.MapView: 9ms
2016-01-22 10:46:51.407 WorkExecution[1689:755353] [TRACE] [MapHandler] added listener, count 1
2016-01-22 10:46:51.407 WorkExecution[1689:755353] [TRACE] MapHandler setCurrentMarker
2016-01-22 10:46:51.408 WorkExecution[1689:755353] asked to hide busy indicator
2016-01-22 10:46:51.432 WorkExecution[1689:755353] got managebusy call busystate=false, busy window visible=true
2016-01-22 10:46:51.432 WorkExecution[1689:755695] [DEBUG] [NONE] establishSSLClientAuth
2016-01-22 10:46:51.433 WorkExecution[1689:755353] taking down busy window
2016-01-22 10:46:51.433 WorkExecution[1689:755353] WARN: Loading message hidden by application = true
2016-01-22 10:46:51.433 WorkExecution[1689:755353] WARN: Loading message hidden
2016-01-22 10:46:51.437 WorkExecution[1689:755353] [DEBUG] [WORKLIGHT] -[NotificationEx loadingStop:] in NotificationEx.m:150 :: Loading stop
2016-01-22 10:46:51.444 WorkExecution[1689:755353] THREAD WARNING: ['NotificationEx'] took '11.097900' ms. Plugin should use a background thread.
2016-01-22 10:46:51.461 WorkExecution[1689:755353] [WARN] [USER_CERT_AUTH] +[WLUserAuthManager getCertificateIdentifier] in WLUserAuthManager.m:68 :: Certificate Identifier Key: com.worklight.userenrollment.certificate:com.WorkExecution
2016-01-22 10:46:51.472 WorkExecution[1689:755353] THREAD WARNING: ['UserAuth'] took '11.177979' ms. Plugin should use a background thread.
2016-01-22 10:46:51.494 WorkExecution[1689:755695] [DEBUG] [NONE] establishSSLClientAuth isCertificateExists: false
2016-01-22 10:46:51.569 WorkExecution[1689:755353] [DEBUG] [WL_AFHTTPCLIENTWRAPPER_PACKAGE] -[WLAFHTTPClientWrapper requestFinished:] in WLAFHTTPClientWrapper.m:196 :: Request Success
2016-01-22 10:46:51.571 WorkExecution[1689:755353] [DEBUG] [WL_AFHTTPCLIENTWRAPPER_PACKAGE] -[WLAFHTTPClientWrapper requestFinished:] in WLAFHTTPClientWrapper.m:197 :: Response Status Code : 200
2016-01-22 10:46:51.574 WorkExecution[1689:755353] [DEBUG] [WL_AFHTTPCLIENTWRAPPER_PACKAGE] -[WLAFHTTPClientWrapper requestFinished:] in WLAFHTTPClientWrapper.m:198 :: Response Content : /*-secure-
{"userInfo":{"wl_directUpdateRealm":{"userId":"null","attributes":{},"isUserAuthenticated":1,"displayName":"null","deviceId":"null"},"CustomAuthenticationRealm":{"isSuccessful":true,"userId":"maxadmin","attributes":{"Cookie":"JSESSIONID=0000-SkE1FAXWL8ftNRYI9N1xmN:-1; Path=\/; HttpOnly","AuthenticationDate":"Fri Jan 22 10:46:04 MYT 2016"},"isUserAuthenticated":1,"displayName":null,"deviceId":"maxadmin"},"wl_authenticityRealm":{"userId":null,"attributes":{},"isUserAuthenticated":0,"displayName":null,"deviceId":null},"wl_remoteDisableRealm":{"userId":"null","attributes":{},"isUserAuthenticated":1,"displayName":"null","deviceId":"null"},"wl_antiXSRFRealm":{"userId":"c41pcfh3e92rspokaktj2be62i","attributes":{},"isUserAuthenticated":1,"displayName":"c41pcfh3e92rspokaktj2be62i","deviceId":"c41pcfh3e92rspokaktj2be62i"},"wl_deviceAutoProvisioningRealm":{"userId":null,"attributes":{},"isUserAuthenticated":0,"displayName":null,"deviceId":null},"wl_deviceNoProvisioningRealm":{"userId":"0F2EE785-4184-4BC2-8C76-3B7CE840F38D","attributes":{"mobileClientData":"com.worklight.core.auth.ext.MobileClientData#dfd2569f"},"isUserAuthenticated":1,"displayName":"0F2EE785-4184-4BC2-8C76-3B7CE840F38D","deviceId":"0F2EE785-4184-4BC2-8C76-3B7CE840F38D"},"myserver":{"userId":"fcd2bad6-4ca1-4d40-9e02-ea3f23ec61c1","attributes":{},"isUserAuthenticated":1,"displayName":"fcd2bad6-4ca1-4d40-9e02-ea3f23ec61c1","deviceId":"fcd2bad6-4ca1-4d40-9e02-ea3f23ec61c1"},"wl_anonymousUserRealm":{"userId":"fcd2bad6-4ca1-4d40-9e02-ea3f23ec61c1","attributes":{},"isUserAuthenticated":1,"displayName":"fcd2bad6-4ca1-4d40-9e02-ea3f23ec61c1","deviceId":"fcd2bad6-4ca1-4d40-9e02-ea3f23ec61c1"}},"userPrefs":{},"gadgetProps":{"ENVIRONMENT":"iphone"}}*/
2016-01-22 10:46:51.679 WorkExecution[1689:755353] [TRACE] [CustomChallangeHandler.isCustomResponse] false
2016-01-22 10:46:51.680 WorkExecution[1689:755353] No matching configurations found from the server. Defaulting to local configuration
2016-01-22 10:46:51.680 WorkExecution[1689:755353] [TIMER] [COMM] Fetching device for connectivity: 549ms
2016-01-22 10:46:51.681 WorkExecution[1689:755695] [DEBUG] [NONE] response [/apps/services/api/WorkExecution/iphone/init] success: /*-secure-
{"userInfo":{"wl_directUpdateRealm":{"userId":"null","attributes":{},"isUserAuthenticated":1,"displayName":"null","deviceId":"null"},"CustomAuthenticationRealm":{"isSuccessful":true,"userId":"maxadmin","attributes":{"Cookie":"JSESSIONID=0000-SkE1FAXWL8ftNRYI9N1xmN:-1; Path=\/; HttpOnly","AuthenticationDate":"Fri Jan 22 10:46:04 MYT 2016"},"isUserAuthenticated":1,"displayName":null,"deviceId":"maxadmin"},"wl_authenticityRealm":{"userId":null,"attributes":{},"isUserAuthenticated":0,"displayName":null,"deviceId":null},"wl_remoteDisableRealm":{"userId":"null","attributes":{},"isUserAuthenticated":1,"displayName":"null","deviceId":"null"},"wl_antiXSRFRealm":{"userId":"c41pcfh3e92rspokaktj2be62i","attributes":{},"isUserAuthenticated":1,"displayName":"c41pcfh3e92rspokaktj2be62i","deviceId":"c41pcfh3e92rspokaktj2be62i"},"wl_deviceAutoProvisioningRealm":{"userId":null,"attributes":{},"isUserAuthenticated":0,"displayName":null,"deviceId":null},"wl_deviceNoProvisioningRealm":{"userId":"0F2EE785-4184-4BC2-8C76-3B7CE840F38D","attributes":{"mobileClientData":"com.worklight.core.auth.ext.MobileClientData#dfd2569f"},"isUserAuthenticated":1,"displayName":"0F2EE785-4184-4BC2-8C76-3B7CE840F38D","deviceId":"0F2EE785-4184-4BC2-8C76-3B7CE840F38D"},"myserver":{"userId":"fcd2bad6-4ca1-4d40-9e02-ea3f23ec61c1","attributes":{},"isUserAuthenticated":1,"displayName":"fcd2bad6-4ca1-4d40-9e02-ea3f23ec61c1","deviceId":"fcd2bad6-4ca1-4d40-9e02-ea3f23ec61c1"},"wl_anonymousUserRealm":{"userId":"fcd2bad6-4ca1-4d40-9e02-ea3f23ec61c1","attributes":{},"isUserAuthenticated":1,"displayName":"fcd2bad6-4ca1-4d40-9e02-ea3f23ec61c1","deviceId":"fcd2bad6-4ca1-4d40-9e02-ea3f23ec61c1"}},"userPrefs":{},"gadgetProps":{"ENVIRONMENT":"iphone"}}*/
2016-01-22 10:46:51.691 WorkExecution[1689:755742] [DEBUG] [NONE] wlclient connect success
2016-01-22 10:46:51.737 WorkExecution[1689:755353] [TIMER] PersistenceManager - add - Adding data into jsonstore - PlatformViewQueryResource: 65ms
2016-01-22 10:46:51.746 WorkExecution[1689:755353] [TIMER] PersistenceManager _findRecordsOnStore: (ignore if querybase exists)PlatformViewQueryResource queryBase: null query: [{"__tempId":1453430764565}]: 8ms
2016-01-22 10:46:51.747 WorkExecution[1689:755353] [TIMER] _JsonInMemoryFindMixin - _arrayFilter: 1ms
2016-01-22 10:46:51.747 WorkExecution[1689:755353] [TIMER] PersistenceManager - _filterExactMatchesIfNeeded: 1ms
2016-01-22 10:46:52.357 WorkExecution[1689:755353] [TRACE] [MapHandler] showmap
2016-01-22 10:46:52.358 WorkExecution[1689:755353] [TRACE] [platform.map.MapFactoryHelper] providerUrl is blank, trying to find a localMapUrl...
2016-01-22 10:46:52.358 WorkExecution[1689:755353] [TRACE] [platform.map.MapFactoryHelper] localMapUrl found: Manhattan.tpk
2016-01-22 10:46:52.358 WorkExecution[1689:755353] [TRACE] [platform.map.MapFactory] creating new map platform.map.EsriMap
2016-01-22 10:46:52.434 WorkExecution[1689:755353] [platform.map.MapFactory] Found bridgeConstructor
2016-01-22 10:46:52.435 WorkExecution[1689:755353] [TRACE] [platform.map.EsriMap] bridgeConstructor: {"specificParameters":{"id":"aw16755748","adjustToTop":"true","iosMapAccessMethod":"useDocumentsFolder","layoutInsertAt":"map","localMapUrl":"Manhattan.tpk","artifactId":"WorkExecution.MapView_esri_true","provider":"esri","workOfflineResource":"workOrder","currentLocationMessage":"Current Location"}}
2016-01-22 10:46:52.435 WorkExecution[1689:755353] [TRACE] [platform.map.nativeBridge.NativeBridgeHelper] Sending request using
2016-01-22 10:46:52.435 WorkExecution[1689:755353] [TRACE] [platform.map.nativeBridge.NativeBridgeHelper] mapType: esri
2016-01-22 10:46:52.435 WorkExecution[1689:755353] [TRACE] [platform.map.nativeBridge.NativeBridgeHelper] action: bridgeConstructor
2016-01-22 10:46:52.435 WorkExecution[1689:755353] [TRACE] [platform.map.nativeBridge.NativeBridgeHelper] method do NOT have cache
2016-01-22 10:46:52.435 WorkExecution[1689:755353] [TRACE] [platform.map.nativeBridge.NativeBridgeHelper] deferred found!
2016-01-22 10:46:52.436 WorkExecution[1689:755353] [TRACE] [platform.map.MapPlugin] entering sendRequest...
2016-01-22 10:46:52.436 WorkExecution[1689:755353] [TRACE] [platform.map.MapPlugin] deferred is: [object Deferred]
2016-01-22 10:46:52.436 WorkExecution[1689:755353] [TRACE] [platform.map.MapPlugin] method is: [bridgeConstructor]
2016-01-22 10:46:52.436 WorkExecution[1689:755353] [TRACE] [platform.map.MapPlugin] action is: [esri:bridgeConstructor]
2016-01-22 10:46:52.436 WorkExecution[1689:755353] [TRACE] [platform.map.MapPlugin] parameters is: [object Object]
2016-01-22 10:46:52.437 WorkExecution[1689:755353] [TRACE] [platform.map.MapPlugin] Calling MapPlugin with deferred object
2016-01-22 10:46:52.438 WorkExecution[1689:755353] DEBUG: -[ISIMapPlugin respondsToSelector:]:26:super does not have a selector to esri:bridgeConstructor:
2016-01-22 10:46:52.438 WorkExecution[1689:755353] DEBUG: -[ISIMapPlugin respondsToSelector:]:33:Found a map selector for esri:bridgeConstructor:
2016-01-22 10:46:52.438 WorkExecution[1689:755353] DEBUG: -[ISIMapPlugin methodSignatureForSelector:]:49:Unable to find signature for selector esri:bridgeConstructor:
2016-01-22 10:46:52.438 WorkExecution[1689:755353] DEBUG: -[ISIMapPlugin methodSignatureForSelector:]:50:Try to forward invocation
2016-01-22 10:46:52.439 WorkExecution[1689:755353] DEBUG: -[ISIMapPlugin forwardInvocation:]:92:Processing forward invocation
2016-01-22 10:46:52.439 WorkExecution[1689:755353] DEBUG: -[ISIMapPlugin forwardInvocation:]:93:Invocation signature: <NSMethodSignature: 0x15541cd0>
2016-01-22 10:46:52.439 WorkExecution[1689:755353] DEBUG: -[ISIMapPlugin forwardInvocation:]:102:MainThread - command.callbackId: MapPlugin27923582
2016-01-22 10:46:52.439 WorkExecution[1689:755353] DEBUG: -[ISIMapPlugin forwardInvocation:]:112:Receiving cordova request esri:bridgeConstructor:
2016-01-22 10:46:52.440 WorkExecution[1689:755353] DEBUG: -[ISIMapPlugin forwardInvocation:]:113:MapType is: esri
2016-01-22 10:46:52.440 WorkExecution[1689:755353] DEBUG: -[ISIMapPlugin forwardInvocation:]:114:Method selector is: bridgeConstructor:
2016-01-22 10:46:52.440 WorkExecution[1689:755353] DEBUG: -[ISIMapPlugin forwardInvocation:]:115:BackgroundThread - command.callbackId: MapPlugin27923582
2016-01-22 10:46:52.440 WorkExecution[1689:755353] DEBUG: -[ISIMapPlugin forwardInvocation:]:118:Begin applying the license of esri map
2016-01-22 10:46:52.444 WorkExecution[1689:755353] DEBUG: -[ISIMapPlugin forwardInvocation:]:125:End of applying the license of esri map
2016-01-22 10:46:52.924 WorkExecution[1689:755353] DEBUG: -[ISIMapPlugin forwardInvocation:]:180:EsriMap instance created
2016-01-22 10:46:52.925 WorkExecution[1689:755353] DEBUG: -[ISIEsriMap loadSpecificParameters:]:114:map params {
adjustToTop = true;
artifactId = "WorkExecution.MapView_esri_true";
currentLocationMessage = "Current Location";
id = aw16755748;
iosMapAccessMethod = useDocumentsFolder;
layoutInsertAt = map;
localMapUrl = "Manhattan.tpk";
provider = esri;
workOfflineResource = workOrder;
}
2016-01-22 10:46:52.926 WorkExecution[1689:755353] DEBUG: -[ISIEsriMap loadSpecificParameters:]:129:path resolved to load /var/mobile/Containers/Data/Application/1E7497A1-72B5-410C-A1E3-A35995D725AB/Documents/Manhattan.tpk
2016-01-22 10:46:52.928 WorkExecution[1689:755353] DEBUG: -[ISIEsriMap loadSpecificParameters:]:132:tiledlayer loaded? 0
2016-01-22 10:46:52.928 WorkExecution[1689:755353] DEBUG: -[ISIEsriMap loadSpecificParameters:]:133:error on the tiledlayer? Cache at path '/var/mobile/Containers/Data/Application/1E7497A1-72B5-410C-A1E3-A35995D725AB/Documents/Manhattan.tpk' not found.
2016-01-22 10:46:52.928 WorkExecution[1689:755353] DEBUG: -[ISIEsriMap loadSpecificParameters:]:136:The map file /var/mobile/Containers/Data/Application/1E7497A1-72B5-410C-A1E3-A35995D725AB/Documents/Manhattan.tpk for this view is not available.
2016-01-22 10:46:52.935 WorkExecution[1689:755353] THREAD WARNING: ['MapPlugin'] took '496.894043' ms. Plugin should use a background thread.
2016-01-22 10:46:52.951 WorkExecution[1689:755353] WARN: [platform.map.MapPlugin] failed to resolve, error message: [object Object]
2016-01-22 10:46:52.952 WorkExecution[1689:755353] [TRACE] [platform.map.MapFactory] [object Object]
2016-01-22 10:46:52.952 WorkExecution[1689:755353] [TRACE] IN Image watch: HIDING
2016-01-22 10:46:52.952 WorkExecution[1689:755353] === Global promise rejection handling ===
2016-01-22 10:46:52.953 WorkExecution[1689:755353] === handled: true
2016-01-22 10:46:52.954 WorkExecution[1689:755353] Hiding the "Loading..." message in 8 seconds
2016-01-22 10:46:52.954 WorkExecution[1689:755353] === Global promise rejection handling ===
2016-01-22 10:46:52.954 WorkExecution[1689:755353] === handled: true
2016-01-22 10:46:52.955 WorkExecution[1689:755353] Hiding the "Loading..." message in 8 seconds
2016-01-22 10:46:53.668 WorkExecution[1689:755517] [DEBUG] [NONE] Piggybacking event transmission
2016-01-22 10:46:53.671 WorkExecution[1689:755695] [DEBUG] [NONE] Flush called
2016-01-22 10:47:00.939 WorkExecution[1689:755353] WARN: Loading message hidden by application = true
2016-01-22 10:47:00.939 WorkExecution[1689:755353] WARN: Loading message hidden
2016-01-22 10:47:00.940 WorkExecution[1689:755353] WARN: Loading message hidden by application = true
2016-01-22 10:47:00.940 WorkExecution[1689:755353] WARN: Loading message hidden
Please help. Thanks in advance.
follow this link
http://www-01.ibm.com/support/knowledgecenter/SSPJLC_7.5.0/com.ibm.si.mpl.doc_7.5.0/maps/t_configure_map_apps.html?lang=en
You need .tpk file on your device on right location, One of the things you can look at for device is where you put your tpk ,
edit the app.xml and update the attribute localMapUrl="file://folder_structure/map_file_name.tpk" with the location and name of the map file on the mobile device. For example: localMapUrl="file://mnt/sdcard/basemaps/Manhattan.tpk" The folder /mnt/sdcard is a public folder that is accessible by any Android application.
for example on device you are putting your tpk part of /basemaps/Manhatton.tpk
You need tpk file on device , follow 7.5.2 link
http://www-01.ibm.com/support/knowledgecenter/SSPJLC_7.5.2/com.ibm.si.mpl.doc_7.5.2/maps/t_configure_map_apps.html?lang=en
From the maximoanywhere_home\MaximoAnywhere\apps\WorkExecution\artifact directory, edit the app.xml and update the attribute for the map control. You can also update the attribute by using the Anywhere Administration application if it is enabled.
For offline maps, update the LocalMapUrl attribute with the location and name of the TPK file on the mobile device. Also, for iOS devices, update the iosMapAccessMethod attribute to use either the Documents folder or the bundle.
For Android devices, this is androidLocalMapUrl="file://folder_path/map_file_name.tpk".
For iOS devices, this is iosLocalMapUrl="file://folder_path/map_file_name.tpk". You must also enter either useDocumentsFolder or useBundle for the iosMapAccessMethod attribute.
For online maps, set the providerUrl attribute. The value can be any valid ArcGIS tile service. If you do not set the providerUrl attribute, the user-defined TPK file is used.
If you need the online maps working, you got to do the following:
Enable Map View. Follow this
Enable the cron task in Maximo. This is required in order to get the coordinates sent to the device properly. I believe you have missed this step. Follow this link for this.
Related
Reactor Kafka: Consumption is stopped with out of order commit enabled (maxDeferredCommits>0)
We use reactiveKafkaConsumerTemplate to receive messages, then Acknowledge the offset after processing the message. We enabled the out of order commit (maxDeferredCommits=250) and noticed the consumer paused infinitely in certain situations. The events pattern are: There might be some network glitch or kafka server maintenance. RetriableCommitFailedException triggered Consumer pause with “Paused - commits are retrying” Consumer “Resume” and “Emitting records”. But there is no more “Async committing” log. (no message acknowledgement exception identify) After some “Emitting records” logs, Consumer pause with “Paused - too many deferred commits” No more “ConsumerEventLoop” log Rebalance fixes the issue. (We have 3 consumers deployed on 3 hosts, remove 1 host fix the issue) reactor-kafka-1.3.13.jar logging: level: reactor: kafka: receiver: DEBUG maxDeferredCommits: 250 ConsumerConfig auto.commit.interval.ms = 1000 auto.offset.reset = earliest connections.max.idle.ms = 540000 enable.auto.commit = false heartbeat.interval.ms = 1000 max.poll.interval.ms = 300000 max.poll.records = 500 request.timeout.ms = 30000 session.timeout.ms = 10000 Logs: 11/24/22 6:50:06.386 AM DEBUG r.k.r.internals.ConsumerEventLoop Async committing: { test-0=OffsetAndMetadata{offset=12206778, leaderEpoch=null, metadata=''}, test-1=OffsetAndMetadata{offset=12253822, leaderEpoch=null, metadata=''} test-2=OffsetAndMetadata{offset=12257066, leaderEpoch=null, metadata=''} test-3=OffsetAndMetadata{offset=12265134, leaderEpoch=null, metadata=''}} No more “Async committing” after this 11/24/22 6:50:06.451 AM WARN r.k.r.internals.ConsumerEventLoop Commit failed with org.apache.kafka.clients.consumer.RetriableCommitFailedException: Offset commit failed with a retriable exception. You should retry committing the latest consumed offsets. Caused by: org.apache.kafka.common.errors.DisconnectException: null 11/24/22 6:50:06.452 AM WARN r.k.r.internals.ConsumerEventLoop Commit failed with exceptionorg.apache.kafka.clients.consumer.RetriableCommitFailedException: Offset commit failed with a retriable exception. You should retry committing the latest consumed offsets., retries remaining 99 … 11/24/22 6:50:06.452 AM WARN r.k.r.internals.Commit failed with exceptionorg.apache.kafka.clients.consumer.RetriableCommitFailedException: Offset commit failed with a retriable exception. You should retry committing the latest consumed offsets., retries remaining 93 11/24/22 6:50:06.486 DEBUG r.k.r.internals.ConsumerEventLoop -Paused - commits are retrying 11/24/22 6:50:06.987 DEBUG r.k.r.internals.ConsumerEventLoop -Resumed 11/24/22 6:50:07.387 DEBUG r.k.r.internals.ConsumerEventLoop -Emitting 1 records, requested now 1 11/24/22 6:50:07.387 DEBUG r.k.r.internals.ConsumerEventLoop -onRequest.toAdd 1, paused false … 11/24/22 6:51:05.248 DEBUG r.k.r.internals.ConsumerEventLoop -Paused - too many deferred commits 11/24/22 6:51:05.248 DEBUG r.k.r.internals.ConsumerEventLoop -Consumer woken No more “ConsumerEventLoop” log after this until rebalance code detail: consumeMessge() { ReceiverOptions basicReceiverOptions = ReceiverOptions.create( consumerProperties) .maxDeferredCommits(250) .commitInterval(Duration.ofMillis(commitInterval)) .subscription(topics); reactiveKafkaConsumerTemplate=new ReactiveKafkaConsumerTemplate<>(basicReceiverOptions); return reactiveKafkaConsumerTemplate .receive() .publishOn(Schedulers.boundedElastic()) .flatMap(x -> Mono.just(x) .delayElement(Duration.ofMillis(500),10)) .flatMap(receiverRecord -> //process the record messageServiceImpl.process(receiverRecord) .doFinally(x -> { //ack offset log.info("MessageConsumer ACK offset={} ", receiverRecord.offset()); receiverRecord.receiverOffset().acknowledge(); }) .subscribeOn(Schedulers.boundedElastic()) ) ..... }
Looks like it might be a bug; please open an issue on GitHub.
Spring Cloud Stream Kafka - "Failed to create topics" error for consumer
I am running JDK 11, Spring Boot 2.5.5 and Spring Cloud 2020.0,5 and Kafka 2.7.2. When I have this consumer code with a Message Type of my business object: #Bean public Consumer<Message<MyObjectType>> process() { return input -> { logger.info("Message = {}", input.getPayload()); }; } I get the error of "Failed to create topics" (see more detailed logs below), but if I changed my consumer code with String type: public Consumer<String> consumer() { return s -> { logger.info("Message = {}", s); }; } I can see the JSON string of my business object. Why does SCS attempt to create topics in the former case and fail? Below is my properties and error logs. Would appreciate Thanks Properties: spring.cloud.stream.kafka.binder.brokers=mykafka:52094 spring.cloud.stream.kafka.binder.configuration.security.protocol=SASL_PLAINTEXT spring.cloud.stream.bindings.consumer-in-0.destination=my.topic spring.cloud.stream.bindings.consumer-in-0.group= spring.cloud.stream.bindings.consumer-in-0.content-type=application/json Logs: 2022-01-17 13:14:11.614 ERROR 11256 --- [ main] o.s.c.s.b.k.p.KafkaTopicProvisioner : Failed to create topics org.apache.kafka.common.errors.TopicAuthorizationException: Authorization failed. 2022-01-17 13:14:11.615 INFO 11256 --- [| adminclient-1] o.a.kafka.common.utils.AppInfoParser : App info kafka.admin.client for adminclient-1 unregistered 2022-01-17 13:14:11.622 WARN 11256 --- [.EXAMPLE.COM] o.a.k.c.security.kerberos.KerberosLogin : [Principal=myapp#DEV.EXAMPLE.COM]: TGT renewal thread has been interrupted and will exit. 2022-01-17 13:14:11.622 INFO 11256 --- [| adminclient-1] org.apache.kafka.common.metrics.Metrics : Metrics scheduler closed 2022-01-17 13:14:11.623 INFO 11256 --- [| adminclient-1] org.apache.kafka.common.metrics.Metrics : Closing reporter org.apache.kafka.common.metrics.JmxReporter 2022-01-17 13:14:11.623 INFO 11256 --- [| adminclient-1] org.apache.kafka.common.metrics.Metrics : Metrics reporters closed 2022-01-17 13:14:11.624 ERROR 11256 --- [ main] o.s.cloud.stream.binding.BindingService : Failed to create consumer binding; retrying in 30 seconds org.springframework.cloud.stream.provisioning.ProvisioningException: Provisioning exception encountered for process-in-0; nested exception is org.apache.kafka.common.errors.TopicAuthorizationException: Authorization failed. at org.springframework.cloud.stream.binder.kafka.provisioning.KafkaTopicProvisioner.createTopic(KafkaTopicProvisioner.java:347) ~[spring-cloud-stream-binder-kafka-core-3.1.6.jar:3.1.6] at org.springframework.cloud.stream.binder.kafka.provisioning.KafkaTopicProvisioner.doProvisionConsumerDestination(KafkaTopicProvisioner.java:231) ~[spring-cloud-stream-binder-kafka-core-3.1.6.jar:3.1.6] at org.springframework.cloud.stream.binder.kafka.provisioning.KafkaTopicProvisioner.provisionConsumerDestination(KafkaTopicProvisioner.java:197) ~[spring-cloud-stream-binder-kafka-core-3.1.6.jar:3.1.6] at org.springframework.cloud.stream.binder.kafka.provisioning.KafkaTopicProvisioner.provisionConsumerDestination(KafkaTopicProvisioner.java:86) ~[spring-cloud-stream-binder-kafka-core-3.1.6.jar:3.1.6] at org.springframework.cloud.stream.binder.AbstractMessageChannelBinder.doBindConsumer(AbstractMessageChannelBinder.java:421) ~[spring-cloud-stream-3.1.6.jar:3.1.6] at org.springframework.cloud.stream.binder.AbstractMessageChannelBinder.doBindConsumer(AbstractMessageChannelBinder.java:92) ~[spring-cloud-stream-3.1.6.jar:3.1.6] at org.springframework.cloud.stream.binder.AbstractBinder.bindConsumer(AbstractBinder.java:143) ~[spring-cloud-stream-3.1.6.jar:3.1.6] at org.springframework.cloud.stream.binding.BindingService.doBindConsumer(BindingService.java:180) ~[spring-cloud-stream-3.1.6.jar:3.1.6] at org.springframework.cloud.stream.binding.BindingService.bindConsumer(BindingService.java:137) ~[spring-cloud-stream-3.1.6.jar:3.1.6] at org.springframework.cloud.stream.binding.AbstractBindableProxyFactory.createAndBindInputs(AbstractBindableProxyFactory.java:118) ~[spring-cloud-stream-3.1.6.jar:3.1.6] at org.springframework.cloud.stream.binding.InputBindingLifecycle.doStartWithBindable(InputBindingLifecycle.java:58) ~[spring-cloud-stream-3.1.6.jar:3.1.6] at java.base/java.util.LinkedHashMap$LinkedValues.forEach(LinkedHashMap.java:608) ~[na:na] at org.springframework.cloud.stream.binding.AbstractBindingLifecycle.start(AbstractBindingLifecycle.java:57) ~[spring-cloud-stream-3.1.6.jar:3.1.6] at org.springframework.cloud.stream.binding.InputBindingLifecycle.start(InputBindingLifecycle.java:34) ~[spring-cloud-stream-3.1.6.jar:3.1.6] at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:178) ~[spring-context-5.3.14.jar:5.3.14] at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:54) ~[spring-context-5.3.14.jar:5.3.14] at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:356) ~[spring-context-5.3.14.jar:5.3.14] at java.base/java.lang.Iterable.forEach(Iterable.java:75) ~[na:na] at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:155) ~[spring-context-5.3.14.jar:5.3.14] at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:123) ~[spring-context-5.3.14.jar:5.3.14] at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:935) ~[spring-context-5.3.14.jar:5.3.14] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:586) ~[spring-context-5.3.14.jar:5.3.14] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145) ~[spring-boot-2.5.8.jar:2.5.8] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:765) ~[spring-boot-2.5.8.jar:2.5.8] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:445) ~[spring-boot-2.5.8.jar:2.5.8] at org.springframework.boot.SpringApplication.run(SpringApplication.java:338) ~[spring-boot-2.5.8.jar:2.5.8] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1354) ~[spring-boot-2.5.8.jar:2.5.8] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1343) ~[spring-boot-2.5.8.jar:2.5.8] at com.example.EventsConsumerApplication.main(EventsConsumerApplication.java:10) ~[classes/:na] Caused by: org.apache.kafka.common.errors.TopicAuthorizationException: Authorization failed.
This issue is due to carelessness on my part. The method signature should be: public Consumer<Message<MyObjectType>> consumer()
Connection failed: Buffer is not defined - Error when subscribing to AWS Amplify (graphql) Subscriptions after update to v4.7.0
I have just updated from Amplify-cli 4.0.0 to 4.7.0 and now I am getting these errors when attempting to listen for my subscriptions. {provider: AWSAppSyncRealTimeProvider, error: {…}} provider: AWSAppSyncRealTimeProvider {_config: {…}, socketStatus: 0, keepAliveTimeout: 300000, subscriptionObserverMap: Map(0), promiseArray: Array(0), …} error: errors: Array(1) 0: message: "Connection failed: Buffer is not defined" __proto__: Object length: 1 __proto__: Array(0) __proto__: Object __proto__: Object I am using Ionic 4, and just before the update everything was working just fine.
Please refer to the below link: Looks like you need to polyfill buffer. https://github.com/agoncal/swagger-ui-angular6/issues/2
Exception 504 when registering the consumer
I've been working with Symfony 2.7 and the RabbitMQBundle to handle some long processes asynchronously. After facing the issue where the MySQL connection dies after a few minutes, I discovered rabbitmq-cli-consumer, a small app in Go that takes care of consuming the queue, and gives its content to a command. In my case, I use it with this command: ./rabbitmq-cli-consumer -c configuration-stock.conf --include -V -e 'php app/console amqp:consume:stock --env=prod -vvv', with this configuration file: [rabbitmq] host = HOST username = USERNAME password = PASSWORD vhost=/VHOST port=PORT queue=stock compression=Off [exchange] name=exports type=direct durable=On [queuesettings] routingkey=stock messagettl=10000 deadLetterExchange=exports.dl deadLetterroutingkey=stock priority=10 To handle errors, I intend to use RabbitMQ's x-dead-letter-exchange and x-dead-letter-routing-key configuration, to be able to retry the message later (in case something went temporarly wrong). My issue is that, when I define my queues in RabbitMQBundle's configuration, rabbitmq-cli-consumer is unable to consume the queue, throwing this error: 2018/04/23 11:35:54 Connecting RabbitMQ... 2018/04/23 11:35:54 Connected. 2018/04/23 11:35:54 Opening channel... 2018/04/23 11:35:54 Done. 2018/04/23 11:35:54 Setting QoS... 2018/04/23 11:35:54 Succeeded setting QoS. 2018/04/23 11:35:54 Declaring queue "stock"... 2018/04/23 11:35:54 Registering consumer... 2018/04/23 11:35:54 failed to register a consumer: Exception (504) Reason: "channel/connection is not open" Here is the configuration I use for RabbitMQBundle: old_sound_rabbit_mq: producers: exports: connection: default exchange_options: name: 'exports' type: direct exports_dl: connection: default exchange_options: name: 'exports.dl' type: direct consumers: stock_dead_letter: connection: default exchange_options: name: exports.dl type: direct queue_options: name: stock.dl routing_keys: - stock arguments: x-dead-letter-exchange: ['S', 'exports'] x-dead-letter-routing-key: ['S', 'stock'] x-message-ttl: ['I', 60000] callback: amqp.consumers.exports.stock multiple_consumers: exports: connection: default exchange_options: name: 'exports' type: direct queues: stock: name: stock callback: amqp.consumers.exports.stock routing_keys: - stock arguments: x-dead-letter-exchange: ['S', 'exports.dl'] x-dead-letter-routing-key: ['S', 'stock'] Has anyone ever encountered something similar ? And how did you solve it ?
Advanced AWS CloudFormation - cfn-Init & cfn-Hup not working
I am experimenting with Cloudformation CFN-INIT & CFN-HUP based on below template but the wordpress stack doesn't get created. CFN-HUP process is not started and CFN-Init throws Code1 error. Please see Stack-template and error log details below. Can anyone help me understand what's going wrong here please? Stack-Template: **Parameters: DecideEnvSize: Type: String Default: LOW AllowedValues: - LOW - MEDIUM - HIGH Description: Select Environment Size (S,M,L) DatabaseName: Type: String Default: DB4wordpress DatabaseUser: Type: String Default: *************** DatabasePassword: Type: String Default: ************* NoEcho: true TestString: Type: String Default: Don't eat yourself up!!! Mappings: MyRegionMap: us-east-1: "AMALINUX" : "ami-c481fad3" # AMALINUX SEP 2016 - N. Verginia us-east-2: "AMALINUX" : "ami-71ca9114" # AMALINUX SEP 2016 - Ohio InstanceSize: LOW: "EC2" : "t2.micro" "DB" : "db.t2.micro" MEDIUM: "EC2" : "t2.small" "DB" : "db.t2.small" HIGH: "EC2" : "t2.medium" "DB" : "db.t2.medium" Resources: DBServer: Type: "AWS::RDS::DBInstance" Properties: AllocatedStorage: 5 StorageType: gp2 DBInstanceClass: !FindInMap [InstanceSize, !Ref DecideEnvSize, DB] # Dynamic mapping + Pseudo Parameter DBName: !Ref DatabaseName Engine: MySQL MasterUsername: !Ref DatabaseUser MasterUserPassword: !Ref DatabasePassword DeletionPolicy: Delete EC2server: Type: "AWS::EC2::Instance" DependsOn: DBServer Properties: ImageId: !FindInMap [MyRegionMap, !Ref "AWS::Region", AMALINUX] # Dynamic mapping + Pseudo Parameter InstanceType: !FindInMap [InstanceSize, !Ref DecideEnvSize, EC2] KeyName: AdvancedCFN **UserData: "Fn::Base64": !Sub | #!/bin/bash yum update -y aws-cfn-bootstrap # good practice - always do this. /opt/aws/bin/cfn-init -v --stack ${AWS::StackName} --resource EC2server --configsets wordpress --region ${AWS::Region} yum -y update Metadata: AWS::CloudFormation::Init: configSets: wordpress: - "configure_cfn" - "install_wordpress" - "config_wordpress" configure_cfn: files: /etc/cfn/cfn-hup.conf: content: !Sub | [main-just some name] stack=${AWS::StackId} region=${AWS::Region} verbose=true interval=5 mode: "000400" owner: root group: root /etc/cfn/hooks.d/cfn-auto-reloader.conf: content: !Sub | [cfn-auto-reloader-hook #just a name] triggers=post.update path=Resources.EC2server.Metadata.AWS::CloudFormation::Init action=/opt/aws/bin/cfn-init -v --stack ${AWS::StackName} --resource EC2server --configsets wordpress --region ${AWS::Region} mode: "000400" owner: root group: root /var/www/html/index2.html: content: !Ref TestString services: sysvinit: cfn-hup: enabled: "true" ensureRunning: "true" files: - "/etc/cfn/cfn-hup.conf" - "/etc/cfn/hooks.d/cfn-auto-reloader.conf"** install_wordpress: packages: yum: httpd: [] php: [] mysql: [] php-mysql: [] sources: /var/www/html: "http://wordpress.org/latest.tar.gz" services: sysvinit: httpd: enabled: "true" ensureRunning: "true" config_wordpress: commands: 01_clone_config: cwd: "/var/www/html/wordpress" test: "test ! -e /var/www/html/wordpress/wp-config.php" command: "cp wp-config-sample.php wp-config.php" 02_inject_dbhost: cwd: "/var/www/html/wordpress" command: !Sub | sed -i 's/localhost/${DBServer.Endpoint.Address}/g' wp-config.php 03_inject_dbname: cwd: "/var/www/html/wordpress" command: !Sub | sed -i 's/database_name_here/${DatabaseName}/g' wp-config.php 04_inject_dbuser: cwd: "/var/www/html/wordpress" command: !Sub | sed -i 's/username_here/${DatabaseUser}/g' wp-config.php 05_inject_dbpassword: cwd: "/var/www/html/wordpress" command: !Sub | sed -i 's/password_here/${DatabasePassword}/g' wp-config.php S3blob: Type: "AWS::S3::Bucket"** Error & log details [root#ip-172-31-25-239 ec2-user]# cd /var/log [root#ip-172-31-25-239 log]# ls *audit btmp cfn-init-cmd.log cfn-wire.log cloud-init-output.log dmesg lastlog maillog ntpstats spooler wtmp boot.log cfn-hup.log cfn-init.log cloud-init.log cron dracut.log mail messages secure tallylog yum.log [root#ip-172-31-25-239 log]# cat cfn-hup.log 2017-12-30 10:48:15,923 [ERROR] Error: [main] section must contain stack option* =========================================================================================== =========================================================================================== [root#ip-172-31-25-239 log]# cat cfn-init.log 2017-12-30 10:48:15,499 [DEBUG] CloudFormation client initialized with endpoint https://cloudformation.us-east-1.amazonaws.com 2017-12-30 10:48:15,501 [DEBUG] Describing resource EC2server in stack Yetagain-init-hup-try10 2017-12-30 10:48:15,616 [INFO] -----------------------Starting build----------------------- 2017-12-30 10:48:15,616 [DEBUG] Not setting a reboot trigger as scheduling support is not available 2017-12-30 10:48:15,617 [INFO] Running configSets: wordpress 2017-12-30 10:48:15,618 [INFO] Running configSet wordpress 2017-12-30 10:48:15,619 [INFO] Running config configure_cfn 2017-12-30 10:48:15,620 [DEBUG] No packages specified 2017-12-30 10:48:15,620 [DEBUG] No groups specified 2017-12-30 10:48:15,620 [DEBUG] No users specified 2017-12-30 10:48:15,620 [DEBUG] No sources specified 2017-12-30 10:48:15,620 [DEBUG] Parent directory /etc/cfn does not exist, creating 2017-12-30 10:48:15,625 [DEBUG] Writing content to /etc/cfn/cfn-hup.conf 2017-12-30 10:48:15,625 [DEBUG] Setting mode for /etc/cfn/cfn-hup.conf to 000400 2017-12-30 10:48:15,626 [DEBUG] Setting owner 0 and group 0 for /etc/cfn/cfn-hup.conf 2017-12-30 10:48:15,626 [DEBUG] Parent directory /etc/cfn/hooks.d does not exist, creating 2017-12-30 10:48:15,626 [DEBUG] Writing content to /etc/cfn/hooks.d/cfn-auto-reloader.conf 2017-12-30 10:48:15,626 [DEBUG] Setting mode for /etc/cfn/hooks.d/cfn-auto-reloader.conf to 000400 2017-12-30 10:48:15,626 [DEBUG] Setting owner 0 and group 0 for /etc/cfn/hooks.d/cfn-auto-reloader.conf 2017-12-30 10:48:15,626 [DEBUG] Parent directory /var/www/html does not exist, creating 2017-12-30 10:48:15,627 [DEBUG] Writing content to /var/www/html/index2.html 2017-12-30 10:48:15,627 [DEBUG] No mode specified for /var/www/html/index2.html. The file will be created with the mode: 0644 2017-12-30 10:48:15,627 [DEBUG] No commands specified 2017-12-30 10:48:15,627 [DEBUG] Using service modifier: /sbin/chkconfig 2017-12-30 10:48:15,627 [DEBUG] Setting service cfn-hup to enabled 2017-12-30 10:48:15,634 [INFO] enabled service cfn-hup 2017-12-30 10:48:15,635 [DEBUG] Restarting cfn-hup due to change detected in dependency 2017-12-30 10:48:15,635 [DEBUG] Using service runner: /sbin/service *2017-12-30 10:48:15,941 [ERROR] Could not restart service cfn-hup; return code was 1 2017-12-30 10:48:15,941 [DEBUG] Service output: Stopping cfn-hup: [FAILED] Starting cfn-hup: [FAILED] 2017-12-30 10:48:15,942 [ERROR] Error encountered during build of configure_cfn: Could not restart cfn-hup* Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/cfnbootstrap/construction.py", line 542, in run_config CloudFormationCarpenter(config, self._auth_config).build(worklog) File "/usr/lib/python2.7/dist-packages/cfnbootstrap/construction.py", line 270, in build CloudFormationCarpenter._serviceTools[manager]().apply(services, changes) File "/usr/lib/python2.7/dist-packages/cfnbootstrap/service_tools.py", line 161, in apply self._restart_service(service) File "/usr/lib/python2.7/dist-packages/cfnbootstrap/service_tools.py", line 185, in _restart_service raise ToolError("Could not restart %s" % service) ToolError: Could not restart cfn-hup 2017-12-30 10:48:15,942 [ERROR] -----------------------BUILD FAILED!------------------------ 2017-12-30 10:48:15,944 [ERROR] Unhandled exception during build: Could not restart cfn-hup Traceback (most recent call last): File "/opt/aws/bin/cfn-init", line 171, in <module> worklog.build(metadata, configSets) File "/usr/lib/python2.7/dist-packages/cfnbootstrap/construction.py", line 129, in build Contractor(metadata).build(configSets, self) File "/usr/lib/python2.7/dist-packages/cfnbootstrap/construction.py", line 530, in build self.run_config(config, worklog) File "/usr/lib/python2.7/dist-packages/cfnbootstrap/construction.py", line 542, in run_config CloudFormationCarpenter(config, self._auth_config).build(worklog) File "/usr/lib/python2.7/dist-packages/cfnbootstrap/construction.py", line 270, in build CloudFormationCarpenter._serviceTools[manager]().apply(services, changes) File "/usr/lib/python2.7/dist-packages/cfnbootstrap/service_tools.py", line 161, in apply self._restart_service(service) File "/usr/lib/python2.7/dist-packages/cfnbootstrap/service_tools.py", line 185, in _restart_service raise ToolError("Could not restart %s" % service) ToolError: Could not restart cfn-hup ============================================================================================================= ============================================================================================================== [root#ip-172-31-25-239 log]# cat /etc/cfn/cfn-hup.conf [main-just some name] stack=arn:aws:cloudformation:us-east-1:523324464109:stack/Yetagain-init-hup-try10/908305e0-ed4d-11e7-b9f7-500c285ebefd region=us-east-1 verbose=true interval=5 ========================================================================================================== ========================================================================================================= [root#ip-172-31-25-239 log]# cat /etc/cfn/hooks.d/cfn-auto-reloader.conf [cfn-auto-reloader-hook #just a name] triggers=post.update path=Resources.EC2server.Metadata.AWS::CloudFormation::Init action=/opt/aws/bin/cfn-init -v --stack Yetagain-init-hup-try10 --resource EC2server --configsets wordpress --region us-east-1
Looks like the main error is in cfn-hup.log: 2017-12-30 10:48:15,923 [ERROR] Error: [main] section must contain stack option* Try changing [main-just some name] to [main] in your cfn-hup.conf. For reference, my /etc/cfn/cfn-hup.conf looks like something like this: [main] stack=arn:aws:cloudformation:us-west-1:acccount_id:stack/mystack-dev-ecs-EC2-1VF68LZMOLAIY/cb2a6a80-554a-11e8-b318-503dcab41efa region=us-west-1 interval=5 verbose=true