File appender throws java.lang.NullPointerException - nullpointerexception

I am running kaa 0.10 on ubuntu 14. When I choose File appender, I do not see any log file created. The kaa log at /var/log/kaa has the exception:
2017-02-16 22:10:47,890 [EPS-log-dispatcher-10] TRACE o.k.k.s.c.l.s.a.AbstractLogAppender - Avro header record converter [org.kaaproject.kaa.common.avro.GenericAvroConverter#6ee5ba4b]
2017-02-16 22:10:47,890 [EPS-log-dispatcher-10] DEBUG o.k.k.s.a.f.a.FileSystemLogAppender - [/home/ubuntu/log/null/null] saving 5 objects
2017-02-16 22:10:47,891 [EPS-log-dispatcher-10] ERROR o.k.k.s.a.f.a.FileSystemLogAppender - [DataCollectionFileAppender] Attempted to append logs failed
java.lang.NullPointerException: null
at org.kaaproject.kaa.server.appenders.file.appender.LogbackFileSystemLogger.append(LogbackFileSystemLogger.java:92) ~[file-appender-0.10.0.jar:na]
at org.kaaproject.kaa.server.appenders.file.appender.FileSystemLogAppender.doAppend(FileSystemLogAppender.java:63) ~[file-appender-0.10.0.jar:na]
at org.kaaproject.kaa.server.common.log.shared.appender.AbstractLogAppender.doAppend(AbstractLogAppender.java:74) [log-shared-0.10.0.jar:na]
at org.kaaproject.kaa.server.operations.service.akka.actors.core.ApplicationLogActorMessageProcessor.lambda$processLogEventPack$0(ApplicationLogActorMessageProcessor.java:111) [kaa-node-0.10.0.jar:na]
at java.util.ArrayList.forEach(ArrayList.java:1249) ~[na:1.8.0_121]
at org.kaaproject.kaa.server.operations.service.akka.actors.core.ApplicationLogActorMessageProcessor.processLogEventPack(ApplicationLogActorMessageProcessor.java:111) [kaa-node-0.10.0.jar:na]
at org.kaaproject.kaa.server.operations.service.akka.actors.core.ApplicationLogActor.onReceive(ApplicationLogActor.java:59) ~[kaa-node-0.10.0.jar:na]
Here is my File appender configuration:
{"publicKey":"AAAAB3NzaC1yc2EAAAABJQAAAQEA4Tp8W48b31VDlb9ARbqpsK8dwER3d+OD8gOp7H8kwPBj6IICZILYVsns3ngAHJtJYOEkGCPlOMudF8iWtmdkcEvVo7X/Nrvn//MW7ze36B7rUx0u86jBS4Cg19GxCtKG2LnyEp0Rk+9YvEfI99kFxmRoT3yHrtwWxkQ7fxfLQ4AUuhdBlpeoepYksoNWpy0CNdAEL6vzI3nl+EaQcesdNgUu6LlUzOl7Z3Qo8sOXCfSHvACzMnfVfEMOmO7arHmDcIlegb7stuCUE5YuuKbGofeEAwuARLROwlvHfeMJPhpHOv6+Q/39SZLqu+FfWDdrGEn9+9+UGAlZ2iN6SYYD7w==","logsRootPath":"/home/ubuntu/log","rollingFileNamePatern":"logFile.%d{yyyy-MM-dd}.log","rollingMaxHistory":30,"triggerMaxFileSize":"1GB","encoderPattern":"%-4relative[%thread]%-5level%logger{35}-%msg%n","minLogSchemaVersion":1,"maxLogSchemaVersion":2147483647,"pluginTypeName":"File","pluginClassName":"org.kaaproject.kaa.server.appenders.file.appender.FileSystemLogAppender","headerStructure":["Timestamp","Logschemaversion"]}
I tried the same configuration in the kaa sandbox which worked fine. But I cannot make it work on my own server.
Please help. Thanks.
James

You got an ERROR o.k.k.s.a.f.a.FileSystemLogAppender - Failed to init file system log appender:..
Looks like the file system log appender was not initialised because log directory "logsRootPath":"/home/ubuntu/log" was not created.
Create "/home/ubuntu/log" directory manually and after that add your File system log appender at Administration UI page.
Update:
Looks like user 'kaa' has not privileged to create 'Logs root path' directory. I have created an issue to improve the File system log appender documentation. See the issue description for details and add line
kaa ALL=(ALL:ALL) ALL
to the /etc/sudoers file.

Related

impossible to excute a intellij idea beacuse of crack

When starting the program through the terminal, i get this error message
Error opening zip file or JAR manifest missing : /Users/thebettertech/dev/crack/JetbrainsCrack-3.1-release-enc.jar
Error occurred during initialization of VM
agent library failed to init: instrument
That folder and file don't exist.
I have a license. I don't know why they're sending this message to me.

FATAL [main] org.apache.hadoop.mapreduce.v2.app.MRAppMaster: Error starting MRAppMaster java.lang.NoSuchMethodError:

I am trying to run a mapreduce job on EMR cluster. The version of Hadoop on EMR is 2.7.3.
The code is used to read HFiles residing on S3 bucket. But every time I run it fails with the below error.
2018-02-22 20:02:11,641 FATAL [main] org.apache.hadoop.mapreduce.v2.app.MRAppMaster: Error starting MRAppMaster
java.lang.NoSuchMethodError: org.apache.hadoop.mapred.TaskLog.createLogSyncer()Ljava/util/concurrent/ScheduledExecutorService;
at org.apache.hadoop.mapreduce.v2.app.MRAppMaster.<init>(MRAppMaster.java:250)
at org.apache.hadoop.mapreduce.v2.app.MRAppMaster.<init>(MRAppMaster.java:233)
at org.apache.hadoop.mapreduce.v2.app.MRAppMaster.main(MRAppMaster.java:1472)
2018-02-22 20:02:12,188 INFO [main] org.apache.hadoop.util.ExitUtil: Exiting with status 1
End of LogType:syslog
The actual code was designed to read files from HDFS which was all doing fine in CDH based clusters where the hadoop version is 2.6.0. However there was a requirement to read the HFiles from S3 bucket on EMR based cluster in AWS. I made few changes in the code which will allow it to read any file system. Below is the snippet of the change
...
Path JSONOutputjob2 = new Path( args[1] );
FileSystem.get(JSONOutputjob2.toUri(), conf2).delete(JSONOutputjob2, true);
...
I am passing the path as an argument and here are the options that I have tried with the file path.
s3n://emr-ip/path/to/the/file
s3a://emr-ip/path/to/the/file
s3://emr-ip/path/to/the/file
This error is really driving me crazy. I have updated my pom.xml file to use the available Hadoop version of the cluster and built the project. The build was also successful. But does not work. Any suggestions or help is much appreciated.
Edit:
I have update my pom to have the aws hadoop version i.e 2.7.3 which did not fix the issue.

Changing the path for Worklight LogDirectory

I want to change the log directory to my custom path. So i have edited the server.xml like below.
<logging consoleLogLevel="OFF" copySystemStreams="false" maxFileSize="5" maxFiles="5" messageFileName="messages.log" logDirectory="/var/log" />
But once i changed and restarted the server it is not starting and throwing the below error
Launching LibertyServer (WebSphere Application Server 8.5.5.0/wlp-1.0.3.20130510-0831) on Java HotSpot(TM) 64-Bit Server VM, version 1.6.0_45-b06 (en_US)
[AUDIT ] CWWKE0001I: The server LibertyServer has been launched.
*** java.lang.instrument ASSERTION FAILED ***: "!errorOutstanding" with message transform method call failed at ../../../src/share/instrument/JPLISAgent.c line: 806
Worklight version 6.0.0.2 Liberty profile version 8.5.5.0-20130510-0831
if you need any info please comment.
Found the issue. it is the problem with the permission.
Please follow the below steps to avoid the errors.
Modify server.xml logging property like in the question.
Modifying value of ‘com.ibm.ws.logging.log.directory’ property in bootstrap.properties file to "/var/log"
Giving write permission to wladmin in folder ‘/var/log’ using the following command.
chmod -R 777 /var/log with superuser (superuser is root)

Glass fish app server node agent not starting

When i try to start node agent in my glassfish app server via putty i got the following warning
Apr 25, 2014 5:03:03 AM com.sun.enterprise.admin.server.core.channel.RMIClient warn
WARNING: channel.client_init_error
Apr 25, 2014 5:03:03 AM com.sun.enterprise.admin.server.core.channel.RMIClient warn
WARNING: channel.client_init_error
and finally "CLI137 Command start-node-agent failed." a timeout.
The log file details are
2014-04-25T05:03:04.388-0500|WARNING|sun-appserver2.1|javax.enterprise.system.tools.admin|_ThreadID=10;_ThreadName=main;|ADM5801:Admin server channel crea
tion failed.|#]
[#|2014-04-25T05:03:04.396-0500|SEVERE|sun-appserver2.1|javax.ee.enterprise.system.nodeagent|_ThreadID=10;_ThreadName=main;|NAGT0014:Unexpected Node Agent ex
ception.
com.sun.appserv.server.ServerLifecycleException: java.lang.RuntimeException: Unable to save stub to /opt/vendor/sunone/SDK/nodeagents/ACSNA-TEST/agent/config
/admch
at com.sun.enterprise.admin.server.core.channel.AdminChannel.createRMIChannel(AdminChannel.java:111)
at com.sun.enterprise.ee.nodeagent.NodeAgentMain.startup(NodeAgentMain.java:204)
at com.sun.enterprise.ee.nodeagent.NodeAgentMain.main(NodeAgentMain.java:396)
Caused by: java.lang.RuntimeException: Unable to save stub to /opt/vendor/sunone/SDK/nodeagents/ACSNA-TEST/agent/config/admch
at com.sun.enterprise.admin.server.core.channel.AdminChannel.saveStubToFile(AdminChannel.java:354)
at com.sun.enterprise.admin.server.core.channel.AdminChannel.createRMIChannel(AdminChannel.java:107)
... 2 more
Caused by: java.io.FileNotFoundException: /opt/vendor/sunone/SDK/nodeagents/ACSNA-TEST/agent/config/admch (Permission denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
at com.sun.enterprise.admin.server.core.channel.AdminChannel.saveStubToFile(AdminChannel.java:348)
... 3 more
I am unable to figure out what excatly the issue is. I have got my permissions right. Please provide some inputs on this issue.
There IS obviously a permission problem. Make sure that the user your GF runs with has the permission to create a file in this path. Try to touch a file in this path in a shell.
Check that every directory in the path /opt/vendor/sunone/SDK/nodeagents/ACSNA-TEST/agent/config/admch has the execute right set for the GF user or its group (chmod +x).

IBM Worklight - Build failed

My environments are failing to build after restart, cleaning, exiting the eclipse, deleting native folders, also I am looking for a reason and perfect fix of this below error as any developer wont be deleting every time when this issue arises, please help
error log
windowsphone build failed: com.worklight.builder.exception.WorklightBuildRuntimeException: Resource Manager - Error while reading XML file: /Users/Desktop/16th July/30thJuly-Map/test_Login/apps/test/windowsphone/native/Properties/WMAppManifest.xml (No such file or directory) Nested exception: /Users/test/Desktop/16th July/30thJuly-Map/test_Login/apps/test/windowsphone/native/Properties/WMAppManifest.xml (No such file or directory)
[2013-07-30 17:39:20] FWLST1040E: ipad build failed: com.worklight.builder.exception.WorklightBuildRuntimeException: Resource Manager - Problem reading info.plist file /Users/test/Desktop/16th July/30thJuly-Map/test_Login/apps/test/ipad/native/testLogintestIpad-Info.plist (No such file or directory) Nested exception: /Users/test/Desktop/16th July/30thJuly-Map/test_Login/apps/test/ipad/native/testLogintestIpad-Info.plist (No such file or directory)
[2013-07-30 17:39:21] FWLST1040E: iphone build failed: com.worklight.builder.exception.WorklightBuildRuntimeException: Resource Manager - Problem reading info.plist file /Users/test/Desktop/16th July/30thJuly-Map/test_Login/apps/test/iphone/native/testLogintestIphone-Info.plist (No such file or directory) Nested exception: /Users/test/Desktop/16th July/30thJuly-Map/test_Login/apps/test/iphone/native/testLogintestIphone-Info.plist (No such file or directory)
[2013-07-30 17:39:21] FWLST1040E: windows8 build failed: com.worklight.builder.exception.WorklightBuildRuntimeException: Resource Manager - Error while reading XML file: /Users/test/Desktop/16th July/30thJuly-Map/test_Login/apps/test/windows8/native/package.appxmanifest (No such file or directory) Nested exception: /Users/test/Desktop/16th July/30thJuly-Map/test_Login/apps/test/windows8/native/package.appxmanifest (No such file or directory)
[2013-07-30 17:39:23] FWLST1040E: android build failed: com.worklight.builder.exception.WorklightBuildRuntimeException: Resource Manager - Error while reading XML file: /Users/test/Desktop/16th July/30thJuly-Map/test_Login/apps/test/android/native/AndroidManifest.xml (No such file or directory) Nested exception: /Users/test/Desktop/16th July/30thJuly-Map/test_Login/apps/test/android/native/AndroidManifest.xml (No such file or directory)
[2013-07-30 17:39:24] A core eclipse exception has occurred: Failed to read project description file from location '/Users/test/Desktop/16th July/30thJuly-Map/test_Login/apps/test/android/native/.project'.
Thanks
djrecker
I got the same error in my eclipse after changing the project name by using Refactor->Rename
The below fix is for iPhone environment. You can try the same for other environment also.
The error says it cant find the info.plist file.Try to move to that location in your computer and see wether the file is there or not.
in your case ESILoginESIIphone-Info.plist
if you cant find the file. just see the ***-Info.plist in the same path and note down the ****
worklight will always append your porject name twice in info.plist file ( dont know why). For example if you have project name as ESI then your plist file name would be ESIESI-Info.plist.
i guess in your project file you have changed the name to ESILogin
Try to rename the project with **** which you found in above step.
Thats all.
Happy Building.
Please look in the Error Log view in Eclipse; there should be an exception trace there which could help us in identifying the root cause.
Can you reproduce this? Does it happen only when you create a new project and add all Mobile environments at once, or even when you add only one Mobile environment?
What is your Worklight version?
Delete the bin folder contents in your project and restart the server.
Deploy all the adapters and application again