Can't initiated User and Organization by using Bootstrap

Hello,

I have follow this guide how to install tyk on Ubuntu and I was installed it on Ubuntu 14.04 with Python 2.7.6 installed.

root@ubuntu:~# python
Python 2.7.6 (default, Oct 26 2016, 20:30:19)
[GCC 4.8.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.

From Step 4, To initialize user and organisation by using Bootstrap I got this result.

 root@ubuntu:~# sudo /opt/tyk-dashboard/install/bootstrap.sh 139.162.xx.xx
 Creating Organisation
 ORGID: 595351701d41c80fefec9089
 Adding new user
 USER AUTH: a9c8d7de667a4dd07d0741588cb025c8
 Traceback (most recent call last):
   File "<string>", line 1, in <module>
 KeyError: 'users'
 NEW ID:
 Setting password
 
 DONE
 ====
 Login at http://139.162.xx.xx:3000/
 User: [email protected]
 Pass: test123

Then I’m going to the above URL and Login and it said “Credentials are incorrect, please try again”

I found some error in the script File “”, line 1, in KeyError: ‘users’. Do you know what cause the error?

Thanks

Hi Rabin,

./install/bootstrap.sh script have a sort of “debug” mode. To do that you’d need to open this file and uncomment lines 10, 16 and 21, which look like #echo $ORGDATA #echo $USER_DATA` and etc.
Can you do that and share the output ?

Thanks,
Kos @ Tyk Support Team

I am getting the same error on a CentOS install.

The output of my bootstrap is as follows:

Creating Organisation
ORGID: 5977e1f19e8a372bb917cc62
Adding new user
{“Status”:“OK”,“Message”:“7f509e1dffef450b6183935d08fafaa6”,“Meta”:{“api_model”:{},“first_name":“John”,“last_name”:“Smith”,“email_address”:"[email protected]”,“org_id”:“5977e1f19e8a372bb917cc62”,“active”:true,“id”:“5977e1f1f68f6d4c3a404f34”,“access_key”:“7f509e1dffef450b6183935d08fafaa6”,“user_permissions”:{}}}
USER AUTH: 7f509e1dffef450b6183935d08fafaa6
{“Status”:“Error”,“Message”:“Not authorised”,“Meta”:null}
Traceback (most recent call last):
File “”, line 1, in
KeyError: ‘users’
NEW ID:
Setting password

DONE

So it seems to be some sort of authentication issue

Can you provide your dashboard logs?

It’s likely a redis config issue

Hi,

I’ve got the same issue.
The dashboard logs show are :

time=“Aug 7 08:03:50” level=info msg=“Creating new Redis connection pool”
time=“Aug 7 08:03:50” level=error msg=“Redis disconnected or error received, attempting to reconnect: dial tcp [::1]:6379: getsockopt: connection refused”
time=“Aug 7 08:03:51” level=error msg=“Redis disconnected or error received, attempting to reconnect: dial tcp [::1]:6379: getsockopt: connection refused”
time=“Aug 7 08:03:51” level=error msg=“Connection to Redis failed, reconnect in 10s” err=“dial tcp [::1]:6379: getsockopt: connection refused”
time=“Aug 7 08:03:51” level=warning msg=“User pasword is empty! Please reset!”
time=“Aug 7 08:03:51” level=info msg=“New user session created”
time=“Aug 7 08:03:52” level=error msg=“Could not send notification”
time=“Aug 7 08:03:52” level=error msg=""
time=“Aug 7 08:03:54” level=error msg=“Could not send notification”
time=“Aug 7 08:03:54” level=error msg=""
time=“Aug 7 08:03:56” level=error msg=“Could not send notification”
time=“Aug 7 08:03:56” level=error msg=""
time=“Aug 7 08:03:58” level=error msg=“Could not send notification”
time=“Aug 7 08:03:58” level=error msg=""
time=“Aug 7 08:04:00” level=error msg=“Could not send notification”
time=“Aug 7 08:04:00” level=error msg=""
time=“Aug 7 08:04:01” level=warning msg=Reconnecting
time=“Aug 7 08:04:01” level=info msg=“Creating new Redis connection pool”
time=“Aug 7 08:04:01” level=error msg=“Redis disconnected or error received, attempting to reconnect: dial tcp [::1]:6379: getsockopt: connection refused”
time=“Aug 7 08:04:01” level=error msg=“Redis disconnected or error received, attempting to reconnect: dial tcp [::1]:6379: getsockopt: connection refused”
time=“Aug 7 08:04:01” level=error msg=“Connection to Redis failed, reconnect in 10s” err=“dial tcp [::1]:6379: getsockopt: connection refused”
time=“Aug 7 08:04:02” level=error msg=“Could not send notification”
time=“Aug 7 08:04:02” level=error msg=""
time=“Aug 7 08:04:04” level=error msg=“Could not send notification”
time=“Aug 7 08:04:04” level=error msg=""

Issue resolved (at least in my case) :

By default, Redis is not installed or not started.
To do this, follow this link (RH/CentOS) : Install and Configure Redis on CentOS 7 | Linode

After Redis is installed and running, everything is ok

1 Like