[Resolved] How to resolve the Unable to rename temp file /tmp/hmetrics_file to /tmp/reporter.json

In this article, we will explain how to resolve the Unable to rename temp file /tmp/hmetrics_file to /tmp/reporter.json in Hive server in the Big Data environment.

Hive Error:

at java.lang.inread.run (inread.java:745) (

ERROR (json-metric-reporter) metrics2.JsonFileMetricsReporter (:()) - Unable to rename temp file /tmp/hmetrics_file to /tmp/reporter.json

ERROR [json - metric -reporter ] : metrics2.JSONFileMetricReporter (:()) - Exception during rename

java . nio. file. FileSystemException: /tmp/hmetric_file -> /tmp/report. json : Operation not permitted

at sun .nio. fs. UnixException .translateToIOException (UnixExcpetion . hava : 91) ~ [>:1.8.0_112]

at sun .nio. fs. UnixException . rethrowAsIOException (UnixExcpetion . hava : 101) ~ [>:1.8.0_112]

at sun . nio. fs . UnixCopyFile .move (UnixCopyFile . java:387) ~ [>:1.8.0_112]

at sun . nio. fs . UnixFileSystemProvider .move (UnixFileSystemProvider. java :262) ~ [>:1.8.0_112]

at org.apche.hadoop.hive.common.metrics.metrics2.JsonFileMetricsReporter . run (Json File Metrics Reporter .java : 175)  ~ (hive - common - .jar


Here we provided simple solution for the above error in Hive server in the Hadoop or Big Data cluster.

Step 1 : First, stopped the Hive server through Edge node or Hive server node.

Login with root user or admin user only. Don’t login with you’re user name.

Step 2: Then rename report . json file to report 1 .json file.

If you didn’t find report .json file then find out the file using below command

find / -name report.json

If you find then rename the file using move command in CLI

Step 3: After that start the Hive server through CLI

Once star the hive server then check that hive server status using below command

ps -ef | grep hive

Summary: The above error is very common in hive environment and resolution also very simple for Hadoop /Hive developers or Admins in the cluster.