Failed to Log In to the Impala Client
Issue
Error information similar to the following is displayed when a user runs the Impala client.
Cause Analysis
The latest MRS cluster uses EulerOS 2.9 or later, which provides only Python 3. However, the Impala client is implemented based on Python 2 and is incompatible with some syntax of Python 3. As a result, an error occurs when the Impala client is running. You can manually install Python 2 to solve this problem.
Procedure
- Log in to the Impala node as user root and run the following command to check its Python version:
python --version
- Run the yum install make command to check whether yum is available.
- If the following error is reported, the yum configuration is incorrect. Go to 3.
- If no error is reported, go to 4.
- If the following error is reported, the yum configuration is incorrect. Go to 3.
- Run the cat /etc/yum.repos.d/EulerOS-base.repo command to check whether the yum source matches the system version. If they do not match, modify them.
Before modification
After modification
- Run the following command to check for the software whose name starts with python2 in the yum source:
yum list python2*
- Run the following command to install Python 2:
yum install python2
Python 3 has been installed in the current system. If you directly install Python 2, a conflict message is displayed.
You can select --allowerasing or --skip-broken for the installation. For example:
yum install python2 --skip-broken
After the installation is complete, the Python version is automatically changed to python2, as shown in the following figure.
If Python 2 is installed successfully but the displayed Python version is incorrect, run the following command to create the /usr/bin/python soft link for /usr/bin/python2:
ln -s /usr/bin/python2 /usr/bin/python
- Verify that the Impala client is available.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.