Overview
The Smart Service, Import Login Audit, will read your login audit file(s) and populate a database with information about logins. This is provided mainly as an example (source code provided) as you may need to modify the smart service to make it work with your environment.
Hello,
Recently we started getting an error when trying to invoke the "Import Login Information" smart service. We are calling this smart service whenever user tries to login to the system first time, to capture first login details. We have not seen this error coming before, started from today itself. It did worked for few users and thrown below error for couple of them so as such random behaviour
ERROR Message:java.lang.NumberFormatException: For input string: "" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
Hi - the Log Reader plug in has recently been upgraded to allow you to specify the HA node you wish to investigate logs for. It might be possible to recreate your login process to use this plug in instead.
https://community.appian.com/b/appmarket/posts/log-reader
HiEduardo Fuentes,
Your server is configuration with 'High Availability' so we have 3 nodes of logs.
so we are missing data into table for around 445 users.
The Plugin is parse randomly available node, any solution for this?
Eduardo Fuentes, are you familiar with an issue where this plugin fails to write a large portion of a particular day's login history? It seems like there are random days on which the login history is truncated. You can see in the table below that on some days (such as 7/1 or 6/17), the max time for a recorded login is very early in the day, and in fact I have confirmed that there are many more rows in the log file than what was written to the database for those days.
This also happened for 7/6, but I deleted the existing login history for 7/6 and reran the plugin, and it wrote all of the rows correctly. However, I tried this for 6/17 (twice) and both times it failed at exactly the same place where it stopped writing the first time.
I have just discovered that some users have been incorrectly deactivated for inactivity due to this issue, so any help would be much appreciated.
date count(*) max(time) 2020-07-06 763 23:48:05 2020-07-05 75 23:55:53 2020-07-04 54 23:17:39 2020-07-03 314 23:41:08 2020-07-02 587 23:59:27 2020-07-01 142 10:15:13 2020-06-30 687 23:48:19 2020-06-29 523 15:20:02 2020-06-28 102 23:53:13 2020-06-27 88 23:45:35 2020-06-26 586 23:45:32 2020-06-25 694 23:46:02 2020-06-24 676 23:58:31 2020-06-23 557 19:02:40 2020-06-22 790 23:44:43 2020-06-21 77 23:48:33 2020-06-20 61 23:24:34 2020-06-19 642 23:51:23 2020-06-18 654 23:50:03 2020-06-17 72 07:50:31 2020-06-16 711 23:59:06 2020-06-15 705 23:37:09 2020-06-14 64 23:36:59 2020-06-13 57 23:37:49 2020-06-12 527 23:38:02
Hi Eduardo Fuentes
Today also, observed same issue ..
logs error:
2019-11-07 00:58:54.843 INFO [commons-pool-EvictionTimer] com.appiancorp.a2.vpn.VPNTunnelNameService.lookupAllHostAddr VPN dns lookup result 10.3.69.0 java.io.FileNotFoundException: /usr/local/appian/ae/logs/login-audit.csv.2019-11-06 (No such file or directory) at java.io.FileInputStream.open0(Native Method) at java.io.FileInputStream.open(FileInputStream.java:195) at java.io.FileInputStream.<init>(FileInputStream.java:138) at java.io.FileInputStream.<init>(FileInputStream.java:93) at com.appiancorp.loginparser.ImportLoginInformation.processLogins(ImportLoginInformation.java:97) at com.appiancorp.loginparser.ImportLoginInformation.run(ImportLoginInformation.java:87) at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.lambda$call$0(DefaultActivityExecutor.java:131) at com.appiancorp.plugins.PluginUsageLogger.runWithPluginInformation(PluginUsageLogger.java:52) at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.call(DefaultActivityExecutor.java:131) at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.call(DefaultActivityExecutor.java:125) at com.appiancorp.common.ContextClassLoaderSwitcher.runInContext(ContextClassLoaderSwitcher.java:25) at com.appiancorp.process.runtime.framework.DefaultActivityExecutor.execute(DefaultActivityExecutor.java:125) at com.appiancorp.process.engine.UnattendedJavaActivityRequest.execute(UnattendedJavaActivityRequest.java:83) at com.appiancorp.process.engine.UnattendedJavaActivityRequest.execute0(UnattendedJavaActivityRequest.java:55) at com.appiancorp.process.engine.ContinuationRequest.executeOuter(ContinuationRequest.java:71) at com.appiancorp.process.engine.ContinuationRequest.execute(ContinuationRequest.java:100) at com.appiancorp.process.workpoller.UnattendedRequestHandlerBean.onMessage(UnattendedRequestHandlerBean.java:35) at com.appiancorp.process.workpoller.WorkItem.run(WorkItem.java:84) at org.springframework.jca.work.SimpleTaskWorkManager$DelegatingWorkAdapter.run(SimpleTaskWorkManager.java:239) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) java.lang.NullPointerException at java.io.Reader.<init>(Reader.java:78) at java.io.InputStreamReader.<init>(InputStreamReader.java:72) at com.appiancorp.loginparser.ImportLoginInformation.writeLogins(ImportLoginInformation.java:110) at com.appiancorp.loginparser.ImportLoginInformation.processLogins(ImportLoginInformation.java:101) at com.appiancorp.loginparser.ImportLoginInformation.run(ImportLoginInformation.java:87) at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.lambda$call$0(DefaultActivityExecutor.java:131) at com.appiancorp.plugins.PluginUsageLogger.runWithPluginInformation(PluginUsageLogger.java:52) at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.call(DefaultActivityExecutor.java:131) at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.call(DefaultActivityExecutor.java:125) at com.appiancorp.common.ContextClassLoaderSwitcher.runInContext(ContextClassLoaderSwitcher.java:25) at com.appiancorp.process.runtime.framework.DefaultActivityExecutor.execute(DefaultActivityExecutor.java:125) at com.appiancorp.process.engine.UnattendedJavaActivityRequest.execute(UnattendedJavaActivityRequest.java:83) at com.appiancorp.process.engine.UnattendedJavaActivityRequest.execute0(UnattendedJavaActivityRequest.java:55) at com.appiancorp.process.engine.ContinuationRequest.executeOuter(ContinuationRequest.java:71) at com.appiancorp.process.engine.ContinuationRequest.execute(ContinuationRequest.java:100) at com.appiancorp.process.workpoller.UnattendedRequestHandlerBean.onMessage(UnattendedRequestHandlerBean.java:35) at com.appiancorp.process.workpoller.WorkItem.run(WorkItem.java:84) at org.springframework.jca.work.SimpleTaskWorkManager$DelegatingWorkAdapter.run(SimpleTaskWorkManager.java:239) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) 2019-11-07 01:00:03,454 [Appian Work Item - 183550 - execution01 : UnattendedJavaActivityRequest] ERROR com.appiancorp.process.engine.UnattendedJavaActivityRequest - An error occurred while executing activity: id=268475705, classname=com.appiancorp.loginparser.ImportLoginInformation com.appiancorp.suiteapi.process.exceptions.SmartServiceException: java.lang.NullPointerException at com.appiancorp.suiteapi.process.exceptions.SmartServiceException$Builder.build(SmartServiceException.java:145) at com.appiancorp.loginparser.ImportLoginInformation.run(ImportLoginInformation.java:90) at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.lambda$call$0(DefaultActivityExecutor.java:131) at com.appiancorp.plugins.PluginUsageLogger.runWithPluginInformation(PluginUsageLogger.java:52) at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.call(DefaultActivityExecutor.java:131) at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.call(DefaultActivityExecutor.java:125) at com.appiancorp.common.ContextClassLoaderSwitcher.runInContext(ContextClassLoaderSwitcher.java:25) at com.appiancorp.process.runtime.framework.DefaultActivityExecutor.execute(DefaultActivityExecutor.java:125) at com.appiancorp.process.engine.UnattendedJavaActivityRequest.execute(UnattendedJavaActivityRequest.java:83) at com.appiancorp.process.engine.UnattendedJavaActivityRequest.execute0(UnattendedJavaActivityRequest.java:55) at com.appiancorp.process.engine.ContinuationRequest.executeOuter(ContinuationRequest.java:71) at com.appiancorp.process.engine.ContinuationRequest.execute(ContinuationRequest.java:100) at com.appiancorp.process.workpoller.UnattendedRequestHandlerBean.onMessage(UnattendedRequestHandlerBean.java:35) at com.appiancorp.process.workpoller.WorkItem.run(WorkItem.java:84) at org.springframework.jca.work.SimpleTaskWorkManager$DelegatingWorkAdapter.run(SimpleTaskWorkManager.java:239) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.NullPointerException at java.io.Reader.<init>(Reader.java:78) at java.io.InputStreamReader.<init>(InputStreamReader.java:72) at com.appiancorp.loginparser.ImportLoginInformation.writeLogins(ImportLoginInformation.java:110) at com.appiancorp.loginparser.ImportLoginInformation.processLogins(ImportLoginInformation.java:101) at com.appiancorp.loginparser.ImportLoginInformation.run(ImportLoginInformation.java:87) ... 16 moreThe file updated timePM has run at 1:00 Am GMT 7th Nov 2019 with above log error.After i restart at 5:05 Am GMT it got executed without error.Please help on this
Hi Eduardo Fuentes,
In my case- log file exist . The scheduled process is at 1:00 Am GMT. The Instance failed for above error log has the file updated at -added screen shot(Thu, 31 Oct 2019 19:36:45 GMT)
So,. the PM which run's at Nov 1st 1:00 Am GMT failed with above error. however it worked when i restart the node today.
Can you please help on this ? let me know if u need any other info.
i am also facing 1st issue and shows null pointer exception.. and when i try to restart they have being parsed ..
2019-11-01 01:00:03,793 [Appian Work Item - 110192 - execution00 : UnattendedJavaActivityRequest] ERROR com.appiancorp.process.engine.UnattendedJavaActivityRequest - An error occurred while executing activity: id=93915, classname=com.appiancorp.loginparser.ImportLoginInformation com.appiancorp.suiteapi.process.exceptions.SmartServiceException: java.lang.NullPointerException at com.appiancorp.suiteapi.process.exceptions.SmartServiceException$Builder.build(SmartServiceException.java:145) at com.appiancorp.loginparser.ImportLoginInformation.run(ImportLoginInformation.java:90) at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.lambda$call$0(DefaultActivityExecutor.java:131) at com.appiancorp.plugins.PluginUsageLogger.runWithPluginInformation(PluginUsageLogger.java:52) at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.call(DefaultActivityExecutor.java:131) at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.call(DefaultActivityExecutor.java:125) at com.appiancorp.common.ContextClassLoaderSwitcher.runInContext(ContextClassLoaderSwitcher.java:25) at com.appiancorp.process.runtime.framework.DefaultActivityExecutor.execute(DefaultActivityExecutor.java:125) at com.appiancorp.process.engine.UnattendedJavaActivityRequest.execute(UnattendedJavaActivityRequest.java:83) at com.appiancorp.process.engine.UnattendedJavaActivityRequest.execute0(UnattendedJavaActivityRequest.java:55) at com.appiancorp.process.engine.ContinuationRequest.executeOuter(ContinuationRequest.java:71) at com.appiancorp.process.engine.ContinuationRequest.execute(ContinuationRequest.java:100) at com.appiancorp.process.workpoller.UnattendedRequestHandlerBean.onMessage(UnattendedRequestHandlerBean.java:35) at com.appiancorp.process.workpoller.WorkItem.run(WorkItem.java:84) at org.springframework.jca.work.SimpleTaskWorkManager$DelegatingWorkAdapter.run(SimpleTaskWorkManager.java:239) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.NullPointerException at java.io.Reader.<init>(Reader.java:78) at java.io.InputStreamReader.<init>(InputStreamReader.java:72) at com.appiancorp.loginparser.ImportLoginInformation.writeLogins(ImportLoginInformation.java:110) at com.appiancorp.loginparser.ImportLoginInformation.processLogins(ImportLoginInformation.java:101) at com.appiancorp.loginparser.ImportLoginInformation.run(ImportLoginInformation.java:87) ... 16 more
Hi Eduardo,
Please find below log details.
2019-10-31 07:11:36,195 [Appian Work Item - 13064 - execution03 : UnattendedJavaActivityRequest] ERROR com.appiancorp.process.engine.UnattendedJavaActivityRequest - An error occurred while executing activity: id=6293233, classname=com.appiancorp.loginparser.ImportLoginInformationcom.appiancorp.suiteapi.process.exceptions.SmartServiceException: java.lang.NullPointerException at com.appiancorp.suiteapi.process.exceptions.SmartServiceException$Builder.build(SmartServiceException.java:145) at com.appiancorp.loginparser.ImportLoginInformation.run(ImportLoginInformation.java:90) at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.lambda$call$0(DefaultActivityExecutor.java:131) at com.appiancorp.plugins.PluginUsageLogger.runWithPluginInformation(PluginUsageLogger.java:52) at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.call(DefaultActivityExecutor.java:131) at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.call(DefaultActivityExecutor.java:125) at com.appiancorp.common.ContextClassLoaderSwitcher.runInContext(ContextClassLoaderSwitcher.java:25) at com.appiancorp.process.runtime.framework.DefaultActivityExecutor.execute(DefaultActivityExecutor.java:125) at com.appiancorp.process.engine.UnattendedJavaActivityRequest.execute(UnattendedJavaActivityRequest.java:83) at com.appiancorp.process.engine.UnattendedJavaActivityRequest.execute0(UnattendedJavaActivityRequest.java:55) at com.appiancorp.process.engine.ContinuationRequest.executeOuter(ContinuationRequest.java:71) at com.appiancorp.process.engine.ContinuationRequest.execute(ContinuationRequest.java:100) at com.appiancorp.process.workpoller.UnattendedRequestHandlerBean.onMessage(UnattendedRequestHandlerBean.java:35) at com.appiancorp.process.workpoller.WorkItem.run(WorkItem.java:84) at org.springframework.jca.work.SimpleTaskWorkManager$DelegatingWorkAdapter.run(SimpleTaskWorkManager.java:239) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)Caused by: java.lang.NullPointerException at java.io.Reader.<init>(Reader.java:78) at java.io.InputStreamReader.<init>(InputStreamReader.java:72) at com.appiancorp.loginparser.ImportLoginInformation.writeLogins(ImportLoginInformation.java:110) at com.appiancorp.loginparser.ImportLoginInformation.processLogins(ImportLoginInformation.java:101) at com.appiancorp.loginparser.ImportLoginInformation.run(ImportLoginInformation.java:87) ... 16 more
Thanks!!
Can you provide me with the actual error from the logs so I can see what line throws this?