Connect Java bundles to tyk

We’re installing tyk and we want to use a custom rich plug-in in java but tyk i don’t understand how configure tyk to use it. we have tried want proposition in the documentation but it is not really working and logs don’t tell any things.

thanks

Hi rbill

I am sure someone on here can help, but we’ll need more information:

what guide have you followed?
were you able to get your gRPC server up and running?
you said “it is not really working” - what were the exact symptoms?

Thanks

i take the guide from tyk documentation, i get the gRPC server up and running ( the server i use GitHub - grpc/grpc-java: The Java gRPC implementation. HTTP/2 based RPC ).
The symptoms are tyk engine does not call at all the gRPC servers when calling api.

Thanks

Hi rbill,

can you share your tyk.conf as well as your Gateway logs ?

Thanks,
Kos @ Tyk Support Team

Hello Kos thanks for your reply
my Tyk conf :slight_smile:
{ “listen_port”: 8080, “node_secret”: “352d20ee67be67f6340b4c0605b044b7”, “secret”: “352d20ee67be67f6340b4c0605b044b7”, “template_path”: “/opt/tyk-gateway/templates”, “tyk_js_path”: “/opt/tyk-gateway/js/tyk.js”, “use_db_app_configs”: true, “db_app_conf_options”: { “connection_string”: “”, “node_is_segmented”: false, “tags”: [] }, “disable_dashboard_zeroconf”: false, “app_path”: “/opt/tyk-gateway/apps”, “enable_bundle_downloader”: true, “coprocess_options”: { “enable_coprocess”: true, “coprocess_grpc_server”: “tcp://localhost:5555” }, “bundle_base_url”: “http://localhost/”, “public_key_path”: “/path/to/my/pubkey”, “enable_batch_request_support”: false, “storage”: { “type”: “redis”, “host”: “localhost”, “port”: 6379, “username”: “”, “password”: “”, “database”: 0, “optimisation_max_idle”: 2000, “optimisation_max_active”: 4000 }, “enable_analytics”: true, “analytics_config”: { “type”: “mongo”, “pool_size”: 100, “csv_dir”: “/tmp”, “mongo_url”: “”, “mongo_db_name”: “”, “mongo_collection”: “”, “purge_delay”: 100, “ignored_ips”: [], “enable_detailed_recording”: true, “enable_geo_ip”: false, “geo_ip_db_path”: “”, “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”: “service”, “policy_connection_string”: “”, “policy_record_name”: “tyk_policies”, “allow_explicit_policy_id”: true }, “custom_middleware”: { “pre”: [ { “name”: “MyPreMiddleware”, “require_session”: false } ], “id_extractor”: { “extract_from”: “header”, “extract_with”: “value”, “extractor_config”: { “header_name”: “Authorization” } }, “driver”: “grpc” },
“hash_keys”: false, “suppress_redis_signal_reload”: false, “use_redis_log”: true, “close_connections”: true, “enable_non_transactional_rate_limiter”: true, “enable_sentinel_rate_limiter”: false, “experimental_process_org_off_thread”: true, “local_session_cache”: { “disable_cached_session_state”: false }, “http_server_options”: { “enable_websockets”: true }, “uptime_tests”: { “disable”: false, “config”: { “enable_uptime_analytics”: true, “failure_trigger_sample_size”: 2, “time_wait”: 10, “checker_pool_size”: 50 } }, “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}

and my logs :

INFO main: Detected 1 APIs
[Aug 10 13:03:27] INFO main: Loading API configurations.
[Aug 10 13:03:27] INFO main: Tracking hostname api_name=test domain=(no host)
[Aug 10 13:03:27] INFO main: Loading API api_name=test
[Aug 10 13:03:27] INFO main: Checking security policy: Token api_name=test
[Aug 10 13:03:27] INFO gateway: Loaded: test api_id=311dac43213c4df84ec5fabfbf7bce99 org_id=598c316c56c02c089aff085e server_name=-- user_id=-- user_ip=–
[Aug 10 13:03:28] INFO main: Processed and listening on: /test/{rest:.*}
[Aug 10 13:03:28] INFO host-check-mgr: Loading uptime tests…
[Aug 10 13:03:28] INFO main: Initialised API Definitions
[Aug 10 13:03:28] INFO main: Loading policies
[Aug 10 13:03:28] INFO main: Using Policies from Dashboard Service

Thanks

rbill

This should be set to true and you need to set the URL for the gRPC server.

Also, this forum has markdown support - makes it easier to read code if you use it :wink:

Thanks Martin its seams that i have some definitions in double