Dashboard bootstrap.sh script fails to create initial user - Invalid control character

Traceback (most recent call last):
File “”, line 1, in
File “/usr/lib64/python2.7/json/init.py”, line 290, in load
**kw)
File “/usr/lib64/python2.7/json/init.py”, line 338, in loads
return _default_decoder.decode(s)
File “/usr/lib64/python2.7/json/decoder.py”, line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/usr/lib64/python2.7/json/decoder.py”, line 382, in raw_decode
obj, end = self.scan_once(s, idx)
ValueError: Invalid control character at: line 1 column 33 (char 32)
Traceback (most recent call last):
File “”, line 3, in
File “/usr/lib64/python2.7/ast.py”, line 49, in literal_eval
node_or_string = parse(node_or_string, mode=‘eval’)
File “/usr/lib64/python2.7/ast.py”, line 37, in parse
return compile(source, filename, mode, PyCF_ONLY_AST)
File “”, line 0

^

SyntaxError: unexpected EOF while parsing
ERROR: Unable to parse JSON

What is the file that is being reported to have invalid control character?

It’s append when you haven’t put yet a licence or the dashboard is not well installed.
Your script cannot read output of an error

Hi rbill,
License key was successfully loaded on opening the page first time, and the key is seen to have added in the file tyk_analytics.conf file.
Also, there havent been any errors during Dashboard installation.
Are there any logs that can be checked to confirm installation problems?
And, if re-installation could be the solution, is just ‘yum install tyk-dashboard’ doing it?

Hi Paul,

How are you trying to install Tyk ?
How did you run the bootstrap script ?

Thanks,
Kos @ Tyk Support Team

Hi Kos,

Environment is centos.
I followed the Dashboard installation procedure in the link: https://tyk.io/docs/get-started/with-tyk-on-premise/installation/redhat-rhel-centos/dashboard/

And bootstrap script was run as:
sudo /opt/tyk-dashboard/install/bootstrap.sh

Bootstrap command:
sudo /opt/tyk-dashboard/install/bootstrap.sh hostname

Hi Paul,

Did alll the steps up to the 10th execute without any errors ?
Are you satisfying the pre-requisites mentioned at step 10 ?

If yes can you try to add a valid hostname and port number when you run the command ?
e.g sudo /opt/tyk-dashboard/install/bootstrap.sh my-instance.com:3000

Thanks,
Kos @ Tyk Support Team

Hi Kos,

No visible errors on the console shown for any on the steps (1-10).
About the pre-reqs:
Yes, running on bash
Python version is 2.7.5

Running with the bootstrap command with hostname:port gives error:
ERROR: Hostname should not contain port number or protocol

Hi Kos,

This is quite weird, the script just worked fine when restored to orig version. (which earlier gave the same error)
And the only change I did was to add a echo command as below:

[[email protected] install]# diff bootstrap.sh bootstrap.sh.mod
114a115
> echo “Params--------- – $1 – $2 – $3 – $4”

MODIFIED version execution:
[[email protected] install]# sudo /opt/tyk-dashboard/install/bootstrap.sh

Creating Organisation
ORG DATA: {“Status”:“OK”,“Message”:“Org created”,“Meta”:“5a187e037e4fdd05d97cacfe”}
ORG ID: 5a187e037e4fdd05d97cacfe

Adding new user
USER AUTHENTICATION CODE: Params--------- – – yr3lz8mdzu – t2e0s1T7 – 5a187e037e4fdd05d97cacfe
82a0f29e0d704d134230faca103e6bd3
Traceback (most recent call last):
_ File “”, line 1, in _
_ File “/usr/lib64/python2.7/json/init.py”, line 290, in load_
_ **kw)_
_ File “/usr/lib64/python2.7/json/init.py”, line 338, in loads_
_ return default_decoder.decode(s)
_ File “/usr/lib64/python2.7/json/decoder.py”, line 366, in decode_
_ obj, end = self.raw_decode(s, idx=w(s, 0).end())
_ File “/usr/lib64/python2.7/json/decoder.py”, line 382, in raw_decode_
_ obj, end = self.scan_once(s, idx)_
ValueError: Invalid control character at: line 1 column 33 (char 32)
Traceback (most recent call last):
_ File “”, line 3, in _
_ File “/usr/lib64/python2.7/ast.py”, line 49, in literal_eval_
_ node_or_string = parse(node_or_string, mode=‘eval’)_
_ File “/usr/lib64/python2.7/ast.py”, line 37, in parse_
_ return compile(source, filename, mode, PyCF_ONLY_AST)_
_ File “”, line 0_

_ ^_
SyntaxError: unexpected EOF while parsing
ERROR: Unable to parse JSON
[[email protected] install]#

ORIG version execution:
[[email protected] install]# sudo /opt/tyk-dashboard/install/bootstrap.sh

Creating Organisation
ORG DATA: {“Status”:“OK”,“Message”:“Org created”,“Meta”:“5a187e6a7e4fdd05d97cacff”}
ORG ID: 5a187e6a7e4fdd05d97cacff

Adding new user
USER AUTHENTICATION CODE: a8bfbd2965f047ae75980c7527aa6bc1
NEW ID: 5a187e6ac0e80eecfbb80d17

Setting password
{“Status”:“OK”,“Message”:“User password updated”,“Meta”:null}

DONE
====
Login at http://:3000/
User: [email protected]
Pass: t2e0s1T7

[[email protected] install]#

Cant seem to figure what could have been the problem and how it disappeared.
I can move on now. Thanks for your support!

Paul

I have spent 2 hours on the same exact problem.

It happens when Redis is not available. In my case, Redis is installed on a different machine and by default, it listens only on 127.0.0.1. Now it listens on its network IP address and I have been able to run bootstrap.sh without any problem.

1 Like

Unfortunately, in my case it is not redis. Can someone point me to where I can get an unchanged bootstrap.sh? It looks like my simple changes broke it.

Alex