Developer Portal Domain

I have used the Vagrant installation option on Windows, I have successfully managed to get the dashboard up, but when trying to set the CNAME as “portal-instance.com” using “Set your portal domain” I am getting the below error:

There was a problem updating your CNAME, please contact support

My host_config is as below, enable_host_names is set to true. I get a Not Found when I browse using http://my-tyk-instance.com:3000/portal and when I select “Open Your Portal” it goes to http://10.0.2.15:3000//portal/ which also does not work.

I am not sure what else to try, any help would be appreciated.


“host_config”: {
“enable_host_names”: true,
“disable_org_slug_prefix”: true,
“hostname”: “my-tyk-instance.com”,
“override_hostname”: “”,
“portal_domains”: { },
“portal_root_path”: “/portal”,
“generate_secure_paths”: false
},

There’s nothing wrong with your config, the Tyk dashboard validation is overly strict, we’ll be foci that in due course. :slight_smile:

Your best bet is to manually edit the MongoDB entry or to use the Tyk Dashboard Admin API to update your organisation record.

Thanks. Would I create/update the organization as below?

{
“owner_name”: “intelliflo”,
“cname”: “portal-instance.com”,
“cname_enabled”: true
}

You will want to GET the object first, it’s not a partial update so you need to send the whole thing back.

But yes that’s it, in fact you might just need to set the domain name.

Hi Martin,

I am having a similar problem and found this thread. So the output of my GET on organisation is

{
    "id": "580a98a056c02c0ae0000003",
    "owner_name": "Default Org.",
    "owner_slug": "default",
    "cname_enabled": true,
    "cname": "",
    "apis": [
        {
            "api_human_name": "Login-RIB",
            "api_id": "15204a4eb380471471d61ed0eea696bb"
        },
        {
            "api_human_name": "GetCustAcctListDetailedDomestic-ESERIB",
            "api_id": "0252a7f9674f47a37960693a83d07f13"
        },
        {
            "api_human_name": "GetCustAcctListDetailed-ESERIB",
            "api_id": "83ce1a711b48498654057c108b918e64"
        },
        {
            "api_human_name": "GetCustAcctListDetailedPackages-ESERIB",
            "api_id": "d1e16da764004c8159229001f86a563d"
        },
        {
            "api_human_name": "GetCustAcctListDetailedCards-ESERIB",
            "api_id": "a38dcd2eeb7a456b65310ca3d2d58804"
        },
        {
            "api_human_name": "get-account-authorisers",
            "api_id": "ff848d048ec0432f50b1a7a0bda0dcca"
        },
        {
            "api_human_name": "GetCreditInterestEarned-ESERIB",
            "api_id": "cdd29b5f375e42a0600d81e588219111"
        },
        {
            "api_human_name": "GetCustAcctListBriefDomestic-ESERIB",
            "api_id": "9f642879fd8a4840422c1bd5b08eb772"
        },
        {
            "api_human_name": "GetCustAcctListBriefPackages-ESERIB",
            "api_id": "7c280dd9bf594072429954c2b55d6f45"
        },
        {
            "api_human_name": "GetCustAcctListBrief-ESERIB",
            "api_id": "265bc383f3244960627c060aa9282a9d"
        }
    ],
    "developer_quota": 0,
    "developer_count": 0,
    "event_options": {},
    "hybrid_enabled": false,
    "ui": {
        "languages": {},
        "hide_help": false,
        "default_lang": "",
        "login_page": {},
        "nav": {},
        "uptime": {},
        "portal_section": {},
        "designer": {},
        "dont_show_admin_sockets": false,
        "dont_allow_license_management": false,
        "dont_allow_license_management_view": false
    }
}

Where should I set my portal domain and hostname?

You’ll need to modify the cname field with your hotname (domain) so api.domain.com, and then restart the dashboard.

This will set your portal to be on api.domain.com/portal.

You can change the root mapping in your tyk_analytics.conf file.

Hi have managed to nuke my dashboard :slight_smile:

[[90m[Oct 24 07:49:14]^[[0m ^[[32m INFO^[[0m Generating portal for: my-tyk-instance.com

panic: http: multiple registrations for my-tyk-instance.com:3000/

goroutine 1 [running]:
panic(0xabff80, 0xc8203aea80)
        /usr/local/go/src/runtime/panic.go:464 +0x3e6
net/http.(*ServeMux).Handle(0xc82038d8c0, 0xc8203a9440, 0x19, 0x7f0b0fa1ba78, 0xc8202c1080)
        /usr/local/go/src/net/http/server.go:1926 +0x297
main.GenerateRoutes()
        /home/tyk/go/src/github.com/lonelycode/tyk-analytics/Main.go:746 +0x428d
main.main()
        /home/tyk/go/src/github.com/lonelycode/tyk-analytics/Main.go:763 +0x59 

When I check tyk_organisations collection in Mongo I see this

{ "_id" : ObjectId("580a979256c02c0ae0000001"), "owner_name" : "Default Org.", "owner_slug" : "default", "cname_enabled" : true, "cname" : "", "apis" : [ ], "developer_quota" : 0, "developer_count" : 0, "event_options" : {  }, "hybrid_enabled" : false, "ui" : { "languages" : {  }, "hide_help" : false, "default_lang" : "", "login_page" : {  }, "nav" : {  }, "uptime" : {  }, "portal_section" : {  }, "designer" : {  }, "dont_show_admin_sockets" : false, "dont_allow_license_management" : false, "dont_allow_license_management_view" : false } }
{ "_id" : ObjectId("580a98a056c02c0ae0000003"), "owner_name" : "Default Org.", "owner_slug" : "default", "cname_enabled" : true, "cname" : "my-tyk-instance.com", "apis" : [ { "api_human_name" : "Login-RIB", "api_id" : "15204a4eb380471471d61ed0eea696bb" }, { "api_human_name" : "GetCustAcctListDetailedDomestic-ESERIB", "api_id" : "0252a7f9674f47a37960693a83d07f13" }, { "api_human_name" : "GetCustAcctListDetailed-ESERIB", "api_id" : "83ce1a711b48498654057c108b918e64" }, { "api_human_name" : "GetCustAcctListDetailedPackages-ESERIB", "api_id" : "d1e16da764004c8159229001f86a563d" }, { "api_human_name" : "GetCustAcctListDetailedCards-ESERIB", "api_id" : "a38dcd2eeb7a456b65310ca3d2d58804" }, { "api_human_name" : "get-account-authorisers", "api_id" : "ff848d048ec0432f50b1a7a0bda0dcca" }, { "api_human_name" : "GetCreditInterestEarned-ESERIB", "api_id" : "cdd29b5f375e42a0600d81e588219111" }, { "api_human_name" : "GetCustAcctListBriefDomestic-ESERIB", "api_id" : "9f642879fd8a4840422c1bd5b08eb772" }, { "api_human_name" : "GetCustAcctListBriefPackages-ESERIB", "api_id" : "7c280dd9bf594072429954c2b55d6f45" }, { "api_human_name" : "GetCustAcctDetails-ESERIB", "api_id" : "265bc383f3244960627c060aa9282a9d" }, { "api_human_name" : "GetAllAccountBalances-ESERIB", "api_id" : "09aadc8ff018457d4fc47bcb7d6f5bac" }, { "api_human_name" : "GetCustAcctListBrief-ESERIB", "api_id" : "9a959fee7a5d44455bd567de97f80848" } ], "developer_quota" : 0, "developer_count" : 0, "event_options" : {  }, "hybrid_enabled" : false, "ui" : { "languages" : {  }, "hide_help" : false, "default_lang" : "", "login_page" : {  }, "nav" : {  }, "uptime" : {  }, "portal_section" : {  }, "designer" : {  }, "dont_show_admin_sockets" : false, "dont_allow_license_management" : false, "dont_allow_license_management_view" : false } }
{ "_id" : ObjectId("580c3b3556c02c0ae000000f"), "owner_name" : "Org1", "owner_slug" : "org1", "cname_enabled" : true, "cname" : "", "apis" : [ ], "developer_quota" : 0, "developer_count" : 0, "event_options" : {  }, "hybrid_enabled" : false, "ui" : { "languages" : {  }, "hide_help" : false, "default_lang" : "", "login_page" : {  }, "nav" : {  }, "uptime" : {  }, "portal_section" : {  }, "designer" : {  }, "dont_show_admin_sockets" : false, "dont_allow_license_management" : false, "dont_allow_license_management_view" : false } }
{ "_id" : ObjectId("580c3b3556c02c0ae0000010"), "owner_name" : "Org2", "owner_slug" : "org1", "cname_enabled" : true, "cname" : "", "apis" : [ ], "developer_quota" : 0, "developer_count" : 0, "event_options" : {  }, "hybrid_enabled" : false, "ui" : { "languages" : {  }, "hide_help" : false, "default_lang" : "", "login_page" : {  }, "nav" : {  }, "uptime" : {  }, "portal_section" : {  }, "designer" : {  }, "dont_show_admin_sockets" : false, "dont_allow_license_management" : false, "dont_allow_license_management_view" : false } }
{ "_id" : ObjectId("580c3b3556c02c0ae0000011"), "owner_name" : "Org3", "owner_slug" : "org1", "cname_enabled" : true, "cname" : "", "apis" : [ { "api_human_name" : "Portal", "api_id" : "8f1ca70b5f4341016877d4e889725f64" }, { "api_human_name" : "Portal API", "api_id" : "12fcd7a3e99c43034bb7118eea561f19" }, { "api_human_name" : "Portal Assets", "api_id" : "b2c49de62ca7456d7bedec7e5614b2db" } ], "developer_quota" : 0, "developer_count" : 0, "event_options" : {  }, "hybrid_enabled" : false, "ui" : { "languages" : {  }, "hide_help" : false, "default_lang" : "", "login_page" : {  }, "nav" : {  }, "uptime" : {  }, "portal_section" : {  }, "designer" : {  }, "dont_show_admin_sockets" : false, "dont_allow_license_management" : false, "dont_allow_license_management_view" : false } }

There is only one reference to my-tyk-instance.com in there. Wondering if portal and dashboard should be on different domains?

Yes, they must be on different domains

Fixed it!!! Portal is also working now.

Changed cname back to “” directly on Mongo db and the used the admin api to update to a different domain.

Thanks Martin.

1 Like

Hi Sir,
I also have faced a similar problem, Could you kindly explain more detail (step by step) on this message. “Changed cname back to “” directly on Mongo db and the used the admin api to update to a different domain.”

Thank in advance.
Narongrit

Hi There,

Its been a while but I can remember that I had to query mongodb organisations and update cname field manually to “” using mongo queries to fix this.

Unfortunately I don’t have the exact steps but I googled out running select and update on the mongo db.

Hope that helps.

1 Like