Generating JWT from zowe API mediation layer via z/OSMF failed in timeout.
Below is the error seen in zowe started task log:
YYYY-MM-DD HH:MM:SS.sss <xxxxxxxx:ThreadPoolTaskExecutor-1:########> xxxxxxxx ERROR (o.z.a.d.GatewayNotifier) ZWEAD400E Cannot notify Gateway on 'https://xxx.xxx.xx.xx:xxx/gateway/cache/services/discovery' about new instance 'xxx.xxx.xx.xx:discovery:xxx'
YYYY-MM-DD HH:MM:SS.sss <xxxxxxxx:ThreadPoolTaskExecutor-1:########> xxxxxxxx ERROR (o.z.a.d.GatewayNotifier) ZWEAD704E Gateway Service is not available so it cannot be notified about changes in Discovery Service
YYYY-MM-DD HH:MM:SS.sss <xxxxxxxx:https-jsse-nio-0.0.0.0-xxx-exec-77:########> xxxxxxxx ERROR (o.z.a.g.s.s.z.ZosmfService) ZWEAG104E Authentication service is not available at URL 'https://zosmf-xxx.xx.xx:xxx/zosmf/services/authenticate'. Error returned: 'I/O error on POST request for "https://zosmf-xxx.xx.xx:xxx/zosmf/services/authenticate": Read timed out; nested exception is java.net.SocketTimeoutException: Read timed out'
YYYY-MM-DD HH:MM:SS.sss <xxxxxxxx:https-jsse-nio-0.0.0.0-xxx-exec-77:########> xxxxxxxx ERROR (o.a.c.c.C.[.[.[.[dispatcherServlet]) Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception
org.zowe.apiml.security.common.error.ServiceNotAccessibleException: Could not get an access to z/OSMF service.
What might cause the timeout and is there available parameter to adjust in order to increase timeout value ?
To increase the timeout, update zowe.yaml file with these 2 environmental variables.
Their values are in milliseconds, in the sample below 40 seconds are requested.
APIML_HTTPCLIENT_CONN_POOL_REQUESTCONNECTIONTIMEOUT:40000
APIML_HTTPCLIENT_CONN_POOL_READTIMEOUT:40000
10000 milliseconds is the default value for both APIML_HTTPCLIENT_CONN_POOL_REQUESTCONNECTIONTIMEOUT and APIML_HTTPCLIENT_CONN_POOL_READTIMEOUT.
Documentation about how to add these variables(UPPER_CASE format as provided is authorized) can be found on ZOWE Docs.
zowe:
environments:
MY_NEW_ENV: value-of-my-env