Tyk-Dashboard service doest not open port 3000

Hi.

I’m following this doc to install the Tyk Dashboard on a Ubuntu server…

All conf run good and i run the setup.sh script to configure Tyk Dashboard like this :

sudo /opt/tyk-dashboard/install/setup.sh --listenport=3000 --redishost=localhost --redisport=6379 --mongo=mongodb://localhost/tyk_analytics --tyk_api_hostname=$HOSTNAME --tyk_node_hostname=http://localhost --tyk_node_port=8080 --portal_root=/portal --domain="xx.xx.xx.xx"

xx.xx.xx.xx : it’s my public IP

When i start the service with this command :
sudo service tyk-dashboard start

The Tyk-dashboard service start correctly, but he can not respond when i try to go to http://localhost:3000/ on my server, or with my public IP from the Web.

Did I miss something during setup ?

PS : the Ubuntu server is in 16.04

Hi Simon,

did the bootstrap script execute without errors ?
Can you share your logs once you start the Dashboard ?
Can you share your analytics.conf ?

Thanks,
Kos @ Tyk Support Team

Hi Kos.

Where i can find the logs for the Dashboard ?

This is my /opt/tyk-dashboard/tyk_anaytics.conf (i remove manually secret and license_key properties for this topic) :
{ "listen_port": 3000, "tyk_api_config": { "Host": "http://localhost", "Port": "8080", "Secret": "" }, "mongo_url": "mongodb://localhost/tyk_analytics", "shared_node_secret": "352d20ee67be67f6340b4c0605b044b7", "license_key": "", "page_size": 10, "admin_secret": "12345", "redis_port": 6379, "redis_host": "localhost", "redis_password": "", "force_api_defaults": false, "notify_on_change": true, "license_owner": "Your Name", "hash_keys": true, "email_backend": {}, "hide_listen_path": false, "use_sentry": false, "sentry_code": "", "sentry_js_code": "", "show_org_id": true, "enable_duplicate_slugs": true, "host_config" : { "override_hostname": "front-cctp", "disable_org_slug_prefix": true, "enable_host_names": true, "hostname": "37.35.7.188", "portal_domains": {}, "portal_root_path": "/portal" }, "http_server_options": { "use_ssl": false, "certificates": [ {} ] }, "ui": { "login_page": {}, "nav" : {}, "uptime": {}, "portal": {}, "designer": {}, "languages": { "English": "en", "Chinese": "cn", "Korean": "ko" }, "default_lang": "en" }, "home_dir": "/opt/tyk-dashboard", "identity_broker": { "enabled": false, "host": { "connection_string": "http://localhost:3010", "secret": "" } }, "enable_aggregate_lookups": true, "aggregate_lookup_cutoff": "01/07/2016", "oauth_redirect_uri_separator": ";", "private_key_path": "" }

Edit : the bootstrap result when it launch after all steps in the doc :
Creating Organisation Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/lib/python2.7/json/__init__.py", line 291, in load **kw) File "/usr/lib/python2.7/json/__init__.py", line 339, in loads return _default_decoder.decode(s) File "/usr/lib/python2.7/json/decoder.py", line 364, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded ORGID: Adding new user Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/lib/python2.7/json/__init__.py", line 291, in load **kw) File "/usr/lib/python2.7/json/__init__.py", line 339, in loads return _default_decoder.decode(s) File "/usr/lib/python2.7/json/decoder.py", line 364, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded USER AUTH: Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/lib/python2.7/json/__init__.py", line 291, in load **kw) File "/usr/lib/python2.7/json/__init__.py", line 339, in loads return _default_decoder.decode(s) File "/usr/lib/python2.7/json/decoder.py", line 364, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded

Hi Simon,

your logs should be in /var/log/upstart/.
Can you confirm that the bootstrap script has been executed without errors ?

Thanks,
Kos @ Tyk Support Team

I have edited my last response, i have some errors when i execute the bootstrap script…

And i have not folder upstart in /var/log/ folder.
In the log’s folder, i simply have two files seems to be related to tyk : tyk-dashboard.stderr and tyk-dashboard.stdout.

Hi Simon,

yes sorry, it could be either /var/log/ or /var/log/upstart/
If you follow this guide the issue should be solved, if not share your logs here please.

Thanks,
Kos @ Tyk Support Team

I run this command for the bootstrap.sh (xx.xx.xx.xx is my public ip, i do not have a hostname) :
sudo /opt/tyk-dashboard/install/bootstrap.sh xx.xx.xx.xx:3000

And when i check the logs, tyk-dashboard.stdout is empty and tyk-dashboard.stderr have this line :
time="Aug 4 11:23:15" level=info msg="Using /opt/tyk-dashboard/tyk_analytics.conf for configuration"

When tyk-dashboard service start, he must open port 3000 itself ?

Hi Simon,

did the script execute without any errors this time ?

Thanks,
Kos @ Tyk Support Team

Sorry, i forget to link the script’s result run with this command sudo /opt/tyk-dashboard/install/bootstrap.sh xx.xx.xx.xx:3000

Creating Organisation
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/json/__init__.py", line 291, in load
    **kw)
  File "/usr/lib/python2.7/json/__init__.py", line 339, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 364, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
ORGID:
Adding new user
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/json/__init__.py", line 291, in load
    **kw)
  File "/usr/lib/python2.7/json/__init__.py", line 339, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 364, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
USER AUTH:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/json/__init__.py", line 291, in load
    **kw)
  File "/usr/lib/python2.7/json/__init__.py", line 339, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 364, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
NEW ID:
Setting password

DONE
====
Login at http://xx.xx.xx.xx:3000:3000/
User: (random user here)
Pass: (random password here)

Remove the port from this command