Connection string issues in Travel Sample v2.0

Hi @borrrden

I’m following the tutorial and everything is working so far until this page:

I’m stuck at the instruction:
“Update the travel.py file to reflect the username and password that you have used during Couchbase Server install. This defaults to “Administrator” and “password””

My couchbase server is remote and I’m running python here on my desktop. So the changes I made to travel.py were on lines 18-19, which I set to:

CONNSTR = ‘couchbase://35.224.9.162/travel-sample’
PASSWORD = ‘password’

When I run “python travel.py” in command prompt I get:

Traceback (most recent call last):
File “travel.py”, line 268, in
db = connect_db()
File “travel.py”, line 265, in connect_db
return Bucket(CONNSTR, password=PASSWORD)
File “C:\Python27\lib\site-packages\couchbase\bucket.py”, line 252, in init
self._do_ctor_connect()
File “C:\Python27\lib\site-packages\couchbase\bucket.py”, line 261, in _do_ctor_connect
self._connect()
couchbase.exceptions._AuthError_0x2 (generated, catch AuthError): <RC=0x2[Authentication failed. You may have provided an invalid username/password combination], There was a problem while trying to send/receive your request over the network. This may be a result of a bad network or a misconfigured client or server, C Source=(src\bucket.c,793)>

At CB Server I have “Administrator” // “password” as a user who has full access to the travel-sample bucket. And this tutorial page says that should be the default. What am I missing?

Kind regards,
David

1 Like

I think what it might be referring to is the password you use to log into the node (i.e. the first login that appears before you get to the settings). Have you tried that one? Server is not really my area of expertise.

Couple of things -

  • Travel Sample App :

    • Are you sure you pulled the right 5.0 branch as specified in the instructions because lines18-19 that you specify above don’t match in the travel.py . Please double check you have right branch.

    • The instructions are to verify that the credentials specified in the following lines correspond to the credentials that you use to log into your Couchbase server admin UI (Per the guide, this should have been setup as Administrator/ password during install). These are not the bucket credentials.

    • To update the CONNSTR, you should update this line

Please do not update anything else in the travel.py file.

  • Couchbase Server :
  • Did you follow instructions here. Because if you did. the bucket admin credentials should be admin/password and not Administrator/password. So please double check you followed the instructions.
1 Like

Perfect! Yes, I did all of that wrong. Successfully connected first time with your help.

Have a great weekend!

Kind regards,
David

Great! Glad it worked