Unable to Import Existing Vertica Cluster via Management Console
This issue is same as i found in this questions:
But both posts doen't help me.
I did all commands that @Jim_Knicely said in above link.
Also i get same error that got here:
https://forum.vertica.com/discussion/comment/240610/#Comment_240610
curl -H "VerticaApiKey: ***********" https://********:5444/licenses --insecure
{ "body": [{"status": true, "comment": "Vertica license is valid", "end": "Perpetual", "start": > "2011-11-22", "vendor": "Vertica Community Edition", "grace": "0", "size": "1TB CE Nodes 3"}],
"href": "/license",
"mime-type": "application/vertica.license.json-v2",
"links": []
}curl -H "VerticaApiKey: ***********" https://********:5444/databases/**/users/null?user_id=dbadmin&passwd=***" --insecure
{ "http_code":405, "name":"Method Not Allowed", "url":"https://********:5444/databases/**/users/null?user_id=dbadmin&passwd=***", "data":"Method not allowed." }
MC version is 9.2.1 and vertica version is 9.0.1
Comments
This is what a have in MC log file after schecking password on MC web gui (/opt/vconsole/log/mc/mconsole.log):
It seems this is a bug....
any comment?
Finally i upgrade my vertica to 9.2.0
And also the version of my MC is 9.2.1
But i cannot connect MC to my db again.
same error in mconsole log....
Also i created a new user but not changed...
any comment?
@Jim_Knicely
Hmm. I have not seen this. Do you have any settings in MC you need to retain? If not, I'd completlty uninstall it, remove the /opt/vertica/mc directory and reinstall. Seems like a password issue. Don't include any weird characters in your MC password. Just a guess If you have weird characters, let me know, might be a bug we can fix.
Thanks @Jim_Knicely,
I installed it again but same error!
the /opt/vertica/mc/ wasn't valid and doesn't exists:
Installation:
Configuration (with simple password: 123456)
Same error again
Log file /opt/vconsole/log/mc/mconsole.log
[Attached]
I hope it may help you to find the root cause (or maybe bug)
any update?
@Jim_Knicely
any update?
Is there any bug fix?
@Jim_Knicely
Hi, I looked at the log you posted and I see a few issues:
When installing, set group ID to "verticadba" to match dbadmin's primary group, otherwise chown/chmod will fail on invalid group.
The dbadmin password used for MC is not sent to Vertica. For the second screen "Import Vertica", use the same password for dbadmin that is used in vsql.
Have you upgraded Vertica recently? There seems to be some issue with agent communication. It might help to restart all services include agent, e.g. "sudo systemctl restart vertica_agent"
@Bryan_H is on to something. Can you check the file permissions?
@Jim_Knicely which file you mean?
Check the file and directory permissions.
Below I am the Linux user that runs MC (vconsole in my case):
Thanks Jim_Knicely,
This is for old installation:
But i removed it completely (
rm /opt/vconsole/* -rf
)and installed it again,
with verticadba group ID and simple password for dbadmin,
and also logfile:
and file permission for new installation:
When I installed MC it asked for an MC user. I used vconsole. Looks like you used dbadmin as the user, wich is fine.
But looks like there is something wrong with the group.
Can you list the groups for your dbadmin user? Here's mine for my dbadmin and vconsole users:
@Bryan_H ,
Thanks your help,
you mentioned to dbadmin password, but i think this is not dealing with wrong password, because as you can see in log i received 401 error code in case of wrong password (intentionally) and also i received 500 Error code in case of correct password (same as password used in vsql)!!
but i think it's a little complicated, it's talking about "Internal Server Error" in logfile!
Curious. Does your dbadmin password contain any weird characters?
No, the password is one letter!! (bcoz it's test environment)
let me change it to longer....
I changed it to 6 letter (ASCII char), but same result
@Jim_Knicely Helppppp!
The request is going to port 5444, which is vertica_agent - can you check under /opt/vertica/logs and see if there is any output with more detail in agent*.log - there may be several files for the agent, some ending in log and some ending in err, and some possibly with a username.
@verban - Just noticed that you checked the "Use TLS Connection" on one import attempt, and you unchecked the "Use TLS Connection" on another import attempt.
Which is it?
Also, can you try to import again, and if you get the invalid PW error, check the LOGIN_FAILURES system table to see if MC is even hitting the DB?
SELECT login_timestamp, client_hostname, client_os_user_name, reason FROM login_failures ORDER BY 1 DESC LIMIT 5;
Next, did you set up any client authentication rules?
SELECT * FROM client_auth;
@Bryan_H
This is the output for me on:
ls -a /opt/vertica/log/agent* |grep -v gz|xargs tail -f
first line for incorrect password and 2nd one for correct password!
@Jim_Knicely
About "Use TLS Connection" checking, i tried both and send output for both test (checked and unchecked)
I checked LOGIN_FAILURES (but without new import, i continued last import by "Import Discovered" button), and i have new record on LOGIN_FAILURES when get incorrect pass (and no record for correct pass)
And also no rules for client authentication :
Can you try using the adapter IP address rather than localhost/127.0.0.1 when importing? Sometimes localhost is configured differently (bind rules, for example) and real IP address works, as shown on mine:
agent.log:INFO:wsgi:192.168.1.206 - - [16/Jul/2019:10:57:01 -0400] "POST /databases/docker/users/null HTTP/1.1" 200 618 "-" "Apache-HttpClient/4.5 (Java/1.7.0_191)"
I don't know why it logs 127.0.0.1, because i opened web gui from interface ip address (192.168.x.x)
But i guess this is due to vertica_db and vertica_console are installed on same machine
My MC and Vertica server are on same box - when you import DB, do you enter the adapter IP address first in the four boxes, then API key, then user/password?
The next step is to increase logging on agent. This requires an edit to /opt/vertica/agent/simply_fast.py - change the line rest_handler.setLevel(logging.INFO) to rest_handler.setLevel(logging.DEBUG) then restart vertica_agent. This will greatly increase logging in all components but hopefully agent.log or vertica.log will then show the root cause.
I found the root cause
it seems vconsole query user for authentication like this:
select * from users where user_name = 'dbadmin';'
In this form:
And i got this error on vertica.log:
But it should be:
select * from v_catalog.users where user_name = 'dbadmin';'
Because** i have a 'users' table in my database **
I changed my table name temporarily and successfully imported!
Finally Fixed ))
Thank you for your work in finding the root cause! I'll file a ticket to have this fixed in MC. Glad to hear it's finally working!
@verban - Wow! We should have thought of that as a possibility earier! Thanks for hanging in there and helping us find this bug.
@marry009 The link in your comment doesn't work. Could you post a screenshot oand also the output of the error from /opt/vconsole/log/mc/mconsole.log on the MC instance? Thanks!