@luffy07 The given error message is generic when you are using JDBC driver to connect impala and it does not suggest the specific cause.
Verify your Impala JDBC connection string is correct, port and Hosts are reachable etc..
Check Impala server that you are trying to connect is up and running fine, paste the memory errors here to understand what you are seeing in the logs.
Also you can append the below into JDBC connection string and repro the issue , It will generate driver DEBUG logs and may give some more details about the issue.
LogLevel=6;LogPath=/tmp/jdbclog
And try to use the latest Impala JDBC driver that is avaible.
https://www.cloudera.com/downloads/connectors/impala/jdbc/2-6-34.html
Regards,
Chethan YM