Created 07-28-2017 06:10 AM
Hello,
Here are logs from two hiveserver2.log file.
------- first which is strange -------
2017-07-28 14:46:10,051 DEBUG [main]: server.HiveServer2 (HiveServer2.java:main(586)) -
Logging initialized using configuration in jar:file:/usr/hdp/2.6.0.3-8/hive/lib/hive-common-1.2.1000.2.6.0.3-8.jar!/hive-log4j.properties
------- second -------
2017-07-28 14:43:01,534 DEBUG [main]: server.HiveServer2 (HiveServer2.java:main(586)) - Logging initialized using configuration in file:/etc/hive/2.6.0.3-8/0/conf.server/hive-log4j.properties
What is causing this problem?
Any help will be very thankful.
Thank you.
Created 07-28-2017 06:42 AM
By any change have you configured any "config group" and assigned these different hosts to it?
Also the seconds logging config looks good.
On the first hiveserver2 instance do you have the following path existing with proper permission?
# ls -l /etc/hive/2.6.0.3-8/0/conf.server/hive-log4j.properties -rw------- 1 hive hadoop 3091 May 15 13:33 /etc/hive/2.6.0.3-8/0/conf.server/hive-log4j.properties
.
Also do you have any Environment Global Variable set related to hive conf dir on these hosts? As in the first host the setting of log4j seems to be loading from insdie the jar , so suspecting that some explicitly set classpath setting might be done in some of the script/global environment level so that the JAR may be coming first in the CLASSPATH before the "conf" directory.
.
Created 07-28-2017 06:42 AM
By any change have you configured any "config group" and assigned these different hosts to it?
Also the seconds logging config looks good.
On the first hiveserver2 instance do you have the following path existing with proper permission?
# ls -l /etc/hive/2.6.0.3-8/0/conf.server/hive-log4j.properties -rw------- 1 hive hadoop 3091 May 15 13:33 /etc/hive/2.6.0.3-8/0/conf.server/hive-log4j.properties
.
Also do you have any Environment Global Variable set related to hive conf dir on these hosts? As in the first host the setting of log4j seems to be loading from insdie the jar , so suspecting that some explicitly set classpath setting might be done in some of the script/global environment level so that the JAR may be coming first in the CLASSPATH before the "conf" directory.
.
Created 07-28-2017 07:01 AM
Hello, @Jay SenSharma
There is no such file: /etc/hive/2.6.0.3-8/0/conf.server/hive-log4j.properties
It will be OK after I copy the hive-log4j.properties file to the /etc/hive/2.6.0.3-8/0/conf.server/ folder.
Now, I am trying to find out the reason why the hive-log4j.properties file is not exists while another node has it.
BTW, I am using default config group.
Thank you.
Created 07-28-2017 07:05 AM
Yes, you can copy and paste the missing hive-log4j.properties file to the first host and then as a preference it will pick that file from "conf" directory. If that file is not found in the conf directory then the log4j properties file will be picked up from any JAR present in the classpath which has the log4j property.
Created 07-28-2017 07:15 AM
The problem is any config change from ambari will not affect the hive-log4j.properties file in the first host.
Although, it does make sense, since ambari didn't create the file at the first place.
Created 08-01-2017 01:31 AM
Let's clarify a little bit. Do you run two HiveServer2 instances to manage different workloads? If so, it is not a surprise to have different settings for log4j.
Created 08-01-2017 06:23 AM
Nope. thank you.
Created 08-01-2017 06:28 AM
I solved the problem by adding a new hive metastore service to the same node which has no hive-log4j.properties file in /etc/hive/2.6.0.3-8/0/conf.server folder.