Install issue : Validation Error:open /./schemas/

Hello,

I’m facing an installation issue on a Debian 9 (I know it may not be supported yet but it’s an upcoming standard).
Software parts are installed properly in /opt (identity broker also connected to an LDAP), everything is fine until I try to add or import a user or an API definition.

Theses logs indicate that schemas files could not be found by the dashboard installation, any idea ?

Logs

Apr 11 09:37:53 svmlx-tyk-rec tyk-analytics[6802]: time=“Apr 11 09:37:53” level=error msg=“Validation Error:open /./schemas/user.json: no such file or directory”
Apr 11 09:40:55 svmlx-tyk-rec tyk-analytics[6802]: time=“Apr 11 09:40:55” level=error msg=“Validation Error:open /./schemas/api_definition.json: no such file or directory”

Files in /opt/tyk-dashboard

ls -a schemas/
.   api_definition.json  developer.json           key_data.json           password.json    user.json
..  basic_auth.json      developer_password.json  oauth_app_request.json  tyk_config.json  webhook.json

Regards
Cedric

Hi cedric

Can you share your config files for tyk_analytics and tyk and i’ll see if anything stands out

Cheers
Josh

Here they are Josh. Thank you for your response.

I’m noticing now a “portal_root_path” which is empty, may be a clue ?

tyk.conf

{
“listen_port”: 8080,
“secret”: “352d20ee67be67f6340b4c0605b044b7”,
“template_path”: “/opt/tyk-gateway/templates”,
“use_db_app_configs”: false,
“app_path”: “/opt/tyk-gateway/apps”,
“middleware_path”: “/opt/tyk-gateway/middleware”,
“storage”: {
“type”: “redis”,
“host”: “localhost”,
“port”: 6379,
“username”: “”,
“password”: “”,
“database”: 0,
“optimisation_max_idle”: 2000,
“optimisation_max_active”: 4000
},
“enable_analytics”: false,
“analytics_config”: {
“type”: “csv”,
“pool_size”: 100,
“csv_dir”: “/tmp”,
“mongo_url”: “”,
“mongo_db_name”: “”,
“mongo_collection”: “”,
“purge_delay”: -1,
“ignored_ips”: [],
“normalise_urls”: {
“enabled”: true,
“normalise_uuids”: true,
“normalise_numbers”: true,
“custom_patterns”: []
}
},
“health_check”: {
“enable_health_checks”: false,
“health_check_value_timeouts”: 60
},
“optimisations_use_async_session_write”: true,
“allow_master_keys”: false,
“policies”: {
“policy_source”: “file”,
“policy_record_name”: “policies”
},
“hash_keys”: true,
“suppress_redis_signal_reload”: false,
“close_connections”: true,
“enable_non_transactional_rate_limiter”: true,
“enable_sentinel_rate_limiter”: false,
“local_session_cache”: {
“disable_cached_session_state”: false
},
“uptime_tests”: {
“disable”: false,
“config”: {
“enable_uptime_analytics”: false,
“failure_trigger_sample_size”: 2,
“time_wait”: 10,
“checker_pool_size”: 50
}
},
“http_server_options”: {
“enable_websockets”: true
},
“hostname”: “”,
“enable_custom_domains”: true,
“enable_jsvm”: true,
“oauth_redirect_uri_separator”: “;”,
“coprocess_options”: {
“enable_coprocess”: false,
“coprocess_grpc_server”: “”
},
“pid_file_location”: “./tyk-gateway.pid”,
“allow_insecure_configs”: true,
“public_key_path”: “”,
“close_idle_connections”: false,
“allow_remote_config”: false,
“enable_bundle_downloader”: true,
“bundle_base_url”: “”,
“global_session_lifetime”: 100,
“force_global_session_lifetime”: false,
“max_idle_connections_per_host”: 100
}

tyk_analytics.conf

{
“listen_port”: 3000,
“tyk_api_config”: {
“Host”: “http://localhost”,
“Port”: “5000”,
“Secret”: “352d20ee67be67f6340b4c0605b044b7”
},
“mongo_url”: “mongodb://localhost/tyk_analytics”,
“mongo_use_ssl”: false,
“mongo_ssl_insecure_skip_verify”: false,
“page_size”: 10,
“admin_secret”: “12345”,
“shared_node_secret”: “”,
“redis_port”: 6379,
“redis_host”: “localhost”,
“redis_password”: “”,
“enable_cluster”: false,
“force_api_defaults”: true,
“notify_on_change”: true,
“license_key”: “eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhbGxvd2VkX25vZGVzIjoiNzFiNjAyNzUtNTZhYy00OTIwLTQwNTAtMDRiMjFkZjQzMzcxIiwiZXhwIjoxNTU0ODIxNzU4LCJvd25lciI6IjVhY2I3ZWZlNDVmOTJlMDk2MmQwOTdlYiJ9.TkCTNMQu55xeGz_9jMB0N08zGqxZk2VBMKqL_Ep3epyV0_XkLJXu6_D8fr605hp4fezA3W6V11nQlMwAKmwFbSGRN6t5-mjxUKboEHyMKsD0b-chraGFmrUh0OA2doT-I9-l8N3TwZQqnHWGw5AS2M-9ow7eQ3_pYeNpsD7rWl7cBvB_cGbvsPlK5Ql7sV3IEBYbe1BJz-kTmFJLcK-yQwRMoQnEPIoTl8CoecwBpJGhYo0H7P9S_Lt6PncI7EitEAqnnfP-ISqHARgGIptAHUXrHIAHhywf9CCEgP-TgPQ-G1TR1SsxQGsWeST9DSIYLzd_XQJmZ_64Jo-4kHWeaQ”,
“redis_database”: 0,
“redis_hosts”: null,
“hash_keys”: true,
“email_backend”: {
“enable_email_notifications”: false,
“code”: “”,
“settings”: null,
“default_from_email”: “”,
“default_from_name”: “”,
“dashboard_hostname”: “”
},
“hide_listen_path”: false,
“sentry_code”: “”,
“sentry_js_code”: “”,
“use_sentry”: false,
“enable_master_keys”: false,
“enable_duplicate_slugs”: false,
“show_org_id”: false,
“host_config”: {
“enable_host_names”: false,
“disable_org_slug_prefix”: false,
“hostname”: “”,
“override_hostname”: “”,
“portal_domains”: null,
“portal_root_path”: “”,
“generate_secure_paths”: false,
“secure_cookies”: false,
“use_strict_hostmatch”: false
},
“http_server_options”: {
“use_ssl”: false,
“certificates”: null,
“min_version”: 0
},
“security”: {
“allow_admin_reset_password”: false,
“login_failure_username_limit”: 0,
“login_failure_ip_limit”: 0,
“login_failure_expiration”: 0,
“audit_log_path”: “”
},
“ui”: {
“languages”: {
“Chinese”: “cn”,
“English”: “en”,
“Korean”: “ko”,
“French”: “fr”
},
“hide_help”: false,
“default_lang”: “fr”,
“login_page”: null,
“nav”: null,
“uptime”: null,
“portal_section”: null,
“designer”: null,
“dont_show_admin_sockets”: false,
“dont_allow_license_management”: false,
“dont_allow_license_management_view”: false
},
“home_dir”: “”,
“identity_broker”: {
“enabled”: true,
“host”: {
“connection_string”: “http://localhost:3010”,
“secret”: “test-secret”
}
},
“tagging_options”: {
“tag_all_apis_by_org”: false
},
“use_sharded_analytics”: false,
“enable_aggregate_lookups”: false,
“enable_analytics_cache”: false,
“aggregate_lookup_cutoff”: “”,
“maintenance_mode”: false,
“allow_explicit_policy_id”: false,
“private_key_path”: “”,
“node_schema_path”: “”,
“oauth_redirect_uri_separator”: “”,
“statsd_connection_string”: “”,
“statsd_prefix”: “”,
“disable_parallel_sessions”: false,
“dashboard_session_lifetime”: 43200,
“alternative_dashboard_url”: “”,
“sso_permission_defaults”: null,
“sso_custom_login_url”: “http://svmlx-tyk-rec”,
“sso_custom_portal_login_url”: “http://svmlx-tyk-rec”,
“notifications_listen_port”: 5000,
“portal_session_lifetime”: 0
}

tib.conf

{
“Secret”: “test-secret”,
“HttpServerOptions”: {
“UseSSL”: false,
“CertFile”: “./certs/server.pem”,
“KeyFile”: “./certs/server.key”
},
“BackEnd”: {
“Name”: “in_memory”,
“ProfileBackendSettings”: {},
“IdentityBackendSettings”: {
“Hosts” : {
“localhost”: “6379”
},
“Password”: “”,
“Database”: 0,
“EnableCluster”: false,
“MaxIdle”: 1000,
“MaxActive”: 2000
}
},
“TykAPISettings”: {
“GatewayConfig”: {
“Endpoint”: “http://localhost”,
“Port”: “80”,
“AdminSecret”: “54321”
},
“DashboardConfig”: {
“Endpoint”: “http://localhost”,
“Port”: “3000”,
“AdminSecret”: “12345”
}
}
}

The portal_root_path defines the URL path through which the portal is accessible e.g. if it is set to /portal then your portal will be accessible through http://<your-domain.com>/portal. So this will not be the cause of your problem.

Regarding the files, can you check that the schema file permissions are set to 644?

I’m having the same issue:

tyk-analytics: time=“Apr 25 14:25:05” level=error msg=“Validation Error:open /./schemas/api_definition.json: no such file or directory”

Is that path in the error message correct? Is it really trying to go to /./schemas, because if so that wouldn’t that mean that the schemas directory would have to be in root.

Are you running 2.6 or 2.6.1? There was an assets snafu in 2.6

It looks like we’re running tyk-gateway v2.6.0. I’ll try upgrading to 2.6.1

Thanks, Martin, but I’m still getting that error. tyk-dashboard is at version 1.6.1 and tyk-gateway is at version 2.6.1.

Apr 25 16:23:07 devtyk01 tyk-analytics: time=“Apr 25 16:23:07” level=error msg=“Validation Error:open /./schemas/api_definition.json: no such file or directory”

@Martin I worked around this by symlinking /opt/tyk-dashboard/schemas to /schemas. I still don’t know if something got mixed up with my installation, which I would assume or I’m guessing you’d be getting a lot more traffic on this issue.

I’m currently just testing the upgrade in a test environment so our production environment has not been impacted–hence the reason I haven’t submitted any kind of a support ticket on it.

Thanks!

After having installed version 2.6.1, I confirm still having this issue.
So, same workaround applied in my situation

lrwxrwxrwx 1 root root 26 mai 7 11:26 schemas -> /opt/tyk-dashboard/schemas

Hi,

Any news on this ? I just got the same issue. Even though the symbolic link is working, whenever I kill / start a fresh dashboard container I have to do it again. Is it just a configuration somewhere in the files ? Working directory of the container maybe ?

Thanks in advance for any advices.
Adrien

Fixed it.

If you’re landing on this page you just have to set the value:

“home_dir”: “/opt/tyk-dashboard/”