Invalid User or Password Error

Moderator: NorbertKrupa

User avatar
Julie
Master
Master
Posts: 221
Joined: Thu Apr 19, 2012 9:29 pm

Invalid User or Password Error

Post by Julie » Thu Jul 12, 2012 4:27 pm

Me again...

I'm trying to configure a Vertica 6 ODBC connection on Linux. I've already installed the driver. I believe I have everything set up properly but I get an error testing a connection with isql:

Code: Select all

[root@verticatst01 etc]# isql -v vertica_test
[28000][unixODBC]FATAL 3781:  Invalid username or password

[ISQL]ERROR: Could not SQLConnect
Here is my odbc.ini file:

Code: Select all

[root@verticatst01 etc]# cat /etc/odbc.ini
[vertica_test]
Description = Warehouse Database
Driver = /opt/vertica/lib64/libverticaodbc.so
Database = vtest
Servername = verticatst01
UID = dbadmin
PWD =
Port = 5433
ConnSettings =
Locale = en_GB
I can connect okay with vsql using the username dbadmin with no password:

Code: Select all

[root@verticatst01 etc]# /opt/vertica/bin/vsql -U dbadmin
Welcome to vsql, the Vertica Analytic Database interactive terminal.

Type:  \h for help with SQL commands
       \? for help with vsql commands
       \g or terminate with semicolon to execute query
       \q to quit

dbadmin=>
Does anyone see anything obvious that I'm missing here as to why I am getting an invalid user name or password error with isql but not vsql?

Thanks a bunch!
Thanks,
Juliette

id10t
GURU
GURU
Posts: 732
Joined: Mon Apr 16, 2012 2:44 pm

Re: Invalid User or Password Error

Post by id10t » Thu Jul 12, 2012 6:38 pm

Hi Julie!

1) Did you configure vertica.ini --- viewtopic.php?f=21&t=287&p=827 ?

2) in PWD field write your Linux dbadmin password.

3) Remove blank settings like ConnSettings

User avatar
Julie
Master
Master
Posts: 221
Joined: Thu Apr 19, 2012 9:29 pm

Re: Invalid User or Password Error

Post by Julie » Thu Jul 12, 2012 7:25 pm

sKwa,

I used the odbc settings from the example in the Vertica 6 Programmer's Guide (page 30) as a template:
[VMart]
Description = Vmart Database
Driver = /opt/vertica/lib64/libverticaodbc.so
Database = vmartdb
Servername = host01
UID = dbadmin
PWD =
Port = 5433
ConnSettings =
SSLKeyFile = /home/dbadmin/client.key
SSLCertFile = /home/dbadmin/client.crt
Locale = en_GB
Anyway, I tried getting rid of the blanks:

Code: Select all

[root@verticatst01 ~]# cat /etc/odbc.ini
[vertica_test]
Description = Warehouse Database
Driver = /opt/vertica/lib64/libverticaodbc.so
Database = vtest
Servername = verticatst01
UID = dbadmin
Port = 5433
Locale = en_GB
[root@verticatst01 ~]# isql -v vertica_test
[28000][unixODBC]FATAL 3781:  Invalid username or password

[ISQL]ERROR: Could not SQLConnect
That didn't work, but then I found another example showing the use of "UserName" instead of "UID". I made that change and now my connection works!

Code: Select all

[root@verticatst01 ~]# cat /etc/odbc.ini
[vertica_test]
Description = Warehouse Database
Driver = /opt/vertica/lib64/libverticaodbc.so
Database = vtest
Servername = verticatst01
UserName = dbadmin
Port = 5433
Locale = en_GB
[root@verticatst01 ~]# isql -v vertica_test
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+
SQL>
Thanks again for your help!

Do you think the documentation is inaccurate? Weird.
Thanks,
Juliette

id10t
GURU
GURU
Posts: 732
Joined: Mon Apr 16, 2012 2:44 pm

Re: Invalid User or Password Error

Post by id10t » Thu Jul 12, 2012 7:59 pm

>> Do you think the documentation is inaccurate?
No. It's ODBC issue. Username, UserName and user - aliases for UID and it should work properly with UID.

Can you provide next:

Code: Select all

uname -a                                  # may be its 32 bit issue?
rpm -q unixODBC                      # i think that problem is here
rpm -qa | grep vertica                 # just wanna know your Vertica version

id10t
GURU
GURU
Posts: 732
Joined: Mon Apr 16, 2012 2:44 pm

Re: Invalid User or Password Error

Post by id10t » Thu Jul 12, 2012 8:04 pm

[UPDATE]
As you can see below on pic UID works.

Image

User avatar
Julie
Master
Master
Posts: 221
Joined: Thu Apr 19, 2012 9:29 pm

Re: Invalid User or Password Error

Post by Julie » Thu Jul 12, 2012 8:35 pm

sKwa,

Here are the results of the commands:

Code: Select all

[root@verticatst01 ~]# uname -a
Linux verticatst01 2.6.18-194.26.1.el5 #1 SMP Tue Nov 9 12:54:20 EST 2010 x86_64 x86_64 x86_64 GNU/Linux
[root@verticatst01 ~]# rpm -q unixODBC
unixODBC-2.2.11-10.el5
unixODBC-2.2.11-10.el5
[root@verticatst01 ~]# rpm -qa | grep vertica
vertica-6.0.0-0
knicely87 mentions a bug in the post: viewtopic.php?f=21&t=62&p=278&hilit=bug#p278

I wonder if I am hitting that one too?
Thanks,
Juliette

id10t
GURU
GURU
Posts: 732
Joined: Mon Apr 16, 2012 2:44 pm

Re: Invalid User or Password Error

Post by id10t » Thu Jul 12, 2012 9:03 pm

Hi Julie!

and one more output

Code: Select all

ls -l /opt/vertica/lib64/libverticaodbc.so
Update your Vertica instance to version 6.0.0-1
(or wait a couple days and there will be 6.0.0-2)

Post Reply

Return to “ODBC”