Created on 10-14-2018 08:46 PM - edited 09-16-2022 06:48 AM
hello:
I have got a problem.
I want append a HUE service to CM,when i executed the connection test, there has a connected issue :'quot;Unexpected error. Unable to verify database connection';.
The enviroment:
Centos 7.5 CDH5.15.1
mysql5.7.23
jdk1.8.0_161
I read the error logs carefully,
the server log:
and the agent stderr.log says:
the log says the file or path not exist,then i copied the file to this path on master and slave node.But the problem has not been solved.
[root@master ~]# ls /opt/cm-5.15.1/etc/cloudera-scm-agent -l -rwxr-xr-x 1 root root 363 10月 15 13:50 altscript.sh -rw-r--r--. 1 cloudera-scm cloudera-scm 8873 10月 14 20:32 config.ini [root@master ~]# ls /opt/cm-5.15.1/share/cmf/bin/altscript.sh -l -rwxr-xr-x. 1 cloudera-scm cloudera-scm 363 7月 31 18:28 /opt/cm-5.15.1/share/cmf/bin/altscript.sh
[root@slave183 logs]# ls /opt/cm-5.15.1/etc/cloudera-scm-agent/altscript.sh -l -rwxrwxrwx. 1 root root 359 10月 15 01:12 /opt/cm-5.15.1/etc/cloudera-scm-agent/altscript.sh [root@slave183 logs]# ls /opt/cm-5.15.1/share/cmf/bin/altscript.sh -l -rwxrwxrwx. 1 cloudera-scm cloudera-scm 363 10月 14 20:42 /opt/cm-5.15.1/share/cmf/bin/altscript.sh
It's been bothering me for a long time, How can I solve this?
Created 06-19-2019 09:39 AM
Is it sovled? i got same when installing 6.2 on Redhat 7.6
Is there any way to bypass it
Created 06-19-2019 11:54 AM
Can you provide the same information that was provided in the original post? It is important for us to know what the error or stack trace is in your issue.
If you have exactly the same stack trace, then it appears the CMF_CONF_DIR is not being replaced properly. If this is a Cloudera Manager manged cluster, then CM will store passwords in a Java JCEKS file in the Hue process directory. To see the latest Hue process directory, you can use the following:
ls /var/run/cloudera-scm-agent/process/`ls -lrt /var/run/cloudera-scm-agent/process/ | awk '{print $9}' |grep HUE_SERVER| tail -1`
When the agent signals the supervisor to start Hue, it will run a hue.sh script to massage the configuration, set variables, etc. and then start the server. Part of that is doing a replace on hue.ini that will replace "{{CMF_CONF_DIR}}" with the full path to the Hue process directory.
This replacement should also address hue.ini where the path to the password command is. For example,
[[database]]
engine=postgres
host=huedb.example
port=7432
user=hue
password_script=/var/run/cloudera-scm-agent/process/2517-hue-HUE_SERVER/altscript.sh sec-8-password
name=hue
In the original post, the error was:
Command '{{CMF_CONF_DIR}}/altscript.sh sec-2-password' returned non-zero exit status 127
The replace string is still there, so it appears that the replace did not work as expected. Since the literal path does not exist, a 127 error would make sense.
I'd recommend sharing the stderr.log from your database test to see if there are any clues about what is happening in your case.
I am not sure how this is getting set:
echo CMF_CONF_DIR=/opt/cm-5.15.1/etc/cloudera-scm-agent
Did you install your Cloudera Manager via tarball method perhaps?