I am getting the following exception, on running the command:
sudo bin/kairosdb.sh import -f new.txt
To bulk insert the data
08-11|09:37:51.115 [qtp573926093-36] ERROR [MetricsResource.java:297] - Query failed.
java.io.IOException: No such file or directory
at java.io.UnixFileSystem.createFileExclusively(Native Method) ~[na:1.8.0_25]
at java.io.File.createTempFile(File.java:2024) ~[na:1.8.0_25]
at org.kairosdb.core.http.rest.MetricsResource.getMeta(MetricsResource.java:238) ~[kairosdb-0.9.4-6.jar:0.9.4-6.20140730155336]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_25]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_25]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_25]
at java.lang.reflect.Method.invoke(Method.java:483) ~[na:1.8.0_25]
at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60) [jersey-server-1.15.jar:1.15]
at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205) [$
at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) [jersey-server-1.15.jar:1.15]
at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302) [jersey-server-1.15.jar:1.15]
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) [jersey-server-1.15.jar:1.15]
at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) [jersey-server-1.15.jar:1.15]
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) [jersey-server-1.15.jar:1.15]
at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84) [jersey-server-1.15.jar:1.15]
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1480) [jersey-server-1.15.jar:1.15]
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1411) [jersey-server-1.15.jar:1.15]
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1360) [jersey-server-1.15.jar:1.15]
I referred thislink to find the solution for the problem: i.e. Stop Kairos, delete the /tmp/kairos_cache folder and all sub folders, then start Kairos again. This has worked for many users.
But it is not working in my case. Is there any other solution?
I'm not sure because I don't have time to check but I can give some clues:
e.g. if you run import, make sure that you don't have KairosDB running as a service at the same time. Otherwise I think they can mess with each other tmp files.
That could also happen if you have run KairosDB previously as root (so the regular user has no access to the directories anymore).
Last but not least check that /tmp has free space ;-)