You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 14, 2023. It is now read-only.
I've decided to go further with my tests of cf-for-k8s on Minikube using Docker for windows. This time, I've attempted to deploy simple test python app. https://github.com/IBM-Cloud/get-started-python
Push went fine except an error at the end (at this point it should return the app status). However, the app is accessible.
s8me5s@DESKTOP-Q8TBEVJ:~/get-started-python$ cf apps
Getting apps in org test-org / space test-space as admin...
Stats unavailable: Stats server temporarily unavailable.
FAILED
s8me5s@DESKTOP-Q8TBEVJ:~/get-started-python$ cf curl /v2/apps/0dfaddbf-b97f-4e37-a4e7-fdbadb6a4575/stats -v
REQUEST: [2021-03-11T21:57:32+01:00]
POST /oauth/token HTTP/1.1
Host: login.127.0.0.1.nip.io
Accept: application/json
Authorization: [PRIVATE DATA HIDDEN]
Content-Type: application/x-www-form-urlencoded
User-Agent: go-cli 7.2.0+be4a5ce2b.2020-12-10 / linux
grant_type=refresh_token&refresh_token=[PRIVATE DATA HIDDEN]&scope=
RESPONSE: [2021-03-11T21:57:32+01:00]
HTTP/1.1 200 OK
Connection: close
Transfer-Encoding: chunked
Cache-Control: no-store
Content-Type: application/json;charset=UTF-8
Date: Thu, 11 Mar 2021 20:57:32 GMT
Pragma: no-cache
Server: istio-envoy
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Content-Type-Options: nosniff
X-Envoy-Upstream-Service-Time: 134
X-Frame-Options: DENY
X-Xss-Protection: 1; mode=block
12e3
{"access_token":"[PRIVATE DATA HIDDEN]","token_type":"[PRIVATE DATA HIDDEN]","id_token":"[PRIVATE DATA HIDDEN]","refresh_token":"[PRIVATE DATA HIDDEN]","expires_in":599,"scope":"routing.router_groups.read cloud_controller.read password.write cloud_controller.write openid routing.router_groups.write doppler.firehose scim.write scim.read cloud_controller.admin uaa.user","jti":"62009fdad0c741e38922732cdf07f41e"}
0
REQUEST: [2021-03-11T21:57:32+01:00]
GET /v2/apps/0dfaddbf-b97f-4e37-a4e7-fdbadb6a4575/stats HTTP/1.1
Host: api.127.0.0.1.nip.io
Accept: application/json
Authorization: [PRIVATE DATA HIDDEN]
Content-Type: application/json
User-Agent: go-cli 7.2.0+be4a5ce2b.2020-12-10 / linux
RESPONSE: [2021-03-11T21:57:33+01:00]
HTTP/1.1 503 Service Unavailable
Connection: close
Content-Length: 137
Content-Type: application/json;charset=utf-8
Date: Thu, 11 Mar 2021 20:57:33 GMT
Server: istio-envoy
X-Content-Type-Options: nosniff
X-Envoy-Upstream-Service-Time: 674
X-Vcap-Request-Id: 02f2ab73-180f-4c97-83bb-6b1ff7b288ca::e95b4bfb-960e-47da-bbae-bcaa64610562
{
"description": "Stats unavailable: Stats server temporarily unavailable.",
"error_code": "CF-StatsUnavailable",
"code": 200002
}
That's what I found in cf-api-server pod logs:
{
"timestamp": "2021-03-11T20:47:45.363291100Z",
"message": "Started GET \"/v2/apps/0dfaddbf-b97f-4e37-a4e7-fdbadb6a4575/stats\" for user: adedd6f1-b54f-4432-9bd5-b4e48d0fcf02, ip: 172.17.0.1 with vcap-request-id: 22363b1c-c8f3-4bc0-b8cb-37f1b4543866::06fe60bf-556c-4242-8cfa-077ec32e6340 at 2021-03-11 20:47:45 UTC",
"log_level": "info",
"source": "cc.api",
"data": {
"request_guid": "22363b1c-c8f3-4bc0-b8cb-37f1b4543866::06fe60bf-556c-4242-8cfa-077ec32e6340"
},
"thread_id": 68920,
"fiber_id": 68940,
"process_id": 1,
"file": "/workspace/middleware/request_logs.rb",
"lineno": 28,
"method": "call"
}
{
"timestamp": "2021-03-11T20:47:45.572132700Z",
"message": "stats_for_app.error",
"log_level": "error",
"source": "cc.diego.instances_reporter",
"data": {
"request_guid": "22363b1c-c8f3-4bc0-b8cb-37f1b4543866::06fe60bf-556c-4242-8cfa-077ec32e6340",
"error": "2:the server could not find the requested resource (get pods.metrics.k8s.io). debug_error_string:{\"created\":\"@1615495665.571772000\",\"description\":\"Error received from peer ipv4:10.96.236.26:8080\",\"file\":\"src/core/lib/surface/call.cc\",\"file_line\":1063,\"grpc_message\":\"the server could not find the requested resource (get pods.metrics.k8s.io)\",\"grpc_status\":2}"
},
"thread_id": 68920,
"fiber_id": 68940,
"process_id": 1,
"file": "/workspace/lib/cloud_controller/diego/reporters/instances_stats_reporter.rb",
"lineno": 74,
"method": "rescue in stats_for_app"
}
{
"timestamp": "2021-03-11T20:47:45.572641500Z",
"message": "Request failed: 503: {\"description\"=>\"Stats unavailable: Stats server temporarily unavailable.\", \"error_code\"=>\"CF-StatsUnavailable\", \"code\"=>200002, \"test_mode_info\"=>{\"description\"=>\"Stats unavailable: Stats server temporarily unavailable.\", \"error_code\"=>\"CF-StatsUnavailable\", \"backtrace\"=>[\"/workspace/lib/cloud_controller/backends/instances_reporters.rb:27:in `rescue in stats_for_app'\", \"/workspace/lib/cloud_controller/backends/instances_reporters.rb:24:in `stats_for_app'\", \"/workspace/app/controllers/runtime/stats_controller.rb:25:in `stats'\", \"/workspace/app/controllers/base/base_controller.rb:85:in `dispatch'\", \"/workspace/lib/cloud_controller/rest_controller/routes.rb:18:in `block in define_route'\", \"/layers/paketo-buildpacks_bundle-install/gems/ruby/2.7.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:1635:in `call'\", \"/layers/paketo-buildpacks_bundle-install/gems/ruby/2.7.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:1635:in `block in compile!'\", \"/layers/paketo-buildpacks_bundle-install/gems/ruby/2.7.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:987:in `block (3 levels) in route!'\", \"/layers/paketo-buildpacks_bundle-install/gems/ruby/2.7.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:1006:in `route_eval'\", \"/layers/paketo-buildpacks_bundle-install/gems/ruby/2.7.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:987:in `block (2 levels) in route!'\", \"/layers/paketo-buildpacks_bundle-install/gems/ruby/2.7.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:1035:in `block in process_route'\", \"/layers/paketo-buildpacks_bundle-install/gems/ruby/2.7.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:1033:in `catch'\", \"/layers/paketo-buildpacks_bundle-install/gems/ruby/2.7.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:1033:in `process_route'\", \"/layers/paketo-buildpacks_bundle-install/gems/ruby/2.7.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:985:in `block in route!'\", \"/layers/paketo-buildpacks_bundle-install/gems/ruby/2.7.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:984:in `each'\", \"/layers/paketo-buildpacks_bundle-install/gems/ruby/2.7.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:984:in `route!'\", \"/layers/paketo-buildpacks_bundle-install/gems/ruby/2.7.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:1098:in `block in dispatch!'\", \"/layers/paketo-buildpacks_bundle-install/gems/ruby/2.7.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:1072:in `block in invoke'\", \"/layers/paketo-buildpacks_bundle-install/gems/ruby/2.7.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:1072:in `catch'\", \"/layers/paketo-buildpacks_bundle-install/gems/ruby/2.7.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:1072:in `invoke'\", \"/layers/paketo-buildpacks_bundle-install/gems/ruby/2.7.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:1095:in `dispatch!'\", \"/layers/paketo-buildpacks_bundle-install/gems/ruby/2.7.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:919:in `block in call!'\", \"/layers/paketo-buildpacks_bundle-install/gems/ruby/2.7.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:1072:in `block in invoke'\", \"/layers/paketo-buildpacks_bundle-install/gems/ruby/2.7.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:1072:in `catch'\", \"/layers/paketo-buildpacks_bundle-install/gems/ruby/2.7.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:1072:in `invoke'\", \"/layers/paketo-buildpacks_bundle-install/gems/ruby/2.7.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:919:in `call!'\", \"/layers/paketo-buildpacks_bundle-install/gems/ruby/2.7.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:908:in `call'\", \"/layers/paketo-buildpacks_bundle-install/gems/ruby/2.7.0/gems/rack-protection-2.0.8.1/lib/rack/protection/xss_header.rb:18:in `call'\", \"/layers/paketo-buildpacks_bundle-install/gems/ruby/2.7.0/gems/rack-protection-2.0.8.1/lib/rack/protection/path_traversal.rb:16:in `call'\", \"/layers/paketo-buildpacks_bundle-install/gems/ruby/2.7.0/gems/rack-protection-2.0.8.1/lib/rack/protection/json_csrf.rb:26:in `call'\", \"/layers/paketo-buildpacks_bundle-install/gems/ruby/2.7.0/gems/rack-protection-2.0.8.1/lib/rack/protection/base.rb:50:in `call'\", \"/layers/paketo-buildpacks_bundle-install/gems/ruby/2.7.0/gems/rack-protection-2.0.8.1/lib/rack/protection/base.rb:50:in `call'\", \"/layers/paketo-buildpacks_bundle-install/gems/ruby/2.7.0/gems/rack-protection-2.0.8.1/lib/rack/protection/frame_options.rb:31:in `call'\", \"/layers/paketo-buildpacks_bundle-install/gems/ruby/2.7.0/gems/rack-2.2.3/lib/rack/null_logger.rb:11:in `call'\", \"/layers/paketo-buildpacks_bundle-install/gems/ruby/2.7.0/gems/rack-2.2.3/lib/rack/head.rb:12:in `call'\", \"/layers/paketo-buildpacks_bundle-install/gems/ruby/2.7.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:194:in `call'\", \"/layers/paketo-buildpacks_bundle-install/gems/ruby/2.7.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:1951:in `call'\", \"/layers/paketo-buildpacks_bundle-install/gems/ruby/2.7.0/gems/rack-2.2.3/lib/rack/urlmap.rb:74:in `block in call'\", \"/layers/paketo-buildpacks_bundle-install/gems/ruby/2.7.0/gems/rack-2.2.3/lib/rack/urlmap.rb:58:in `each'\", \"/layers/paketo-buildpacks_bundle-install/gems/ruby/2.7.0/gems/rack-2.2.3/lib/rack/urlmap.rb:58:in `call'\", \"/workspace/middleware/request_logs.rb:38:in `call'\", \"/workspace/middleware/security_context_setter.rb:19:in `call'\", \"/workspace/middleware/vcap_request_id.rb:15:in `call'\", \"/workspace/middleware/cors.rb:49:in `call_app'\", \"/workspace/middleware/cors.rb:14:in `call'\", \"/workspace/middleware/request_metrics.rb:12:in `call'\", \"/layers/paketo-buildpacks_bundle-install/gems/ruby/2.7.0/gems/rack-2.2.3/lib/rack/builder.rb:244:in `call'\", \"/layers/paketo-buildpacks_bundle-install/gems/ruby/2.7.0/gems/thin-1.7.2/lib/thin/connection.rb:86:in `block in pre_process'\", \"/layers/paketo-buildpacks_bundle-install/gems/ruby/2.7.0/gems/thin-1.7.2/lib/thin/connection.rb:84:in `catch'\", \"/layers/paketo-buildpacks_bundle-install/gems/ruby/2.7.0/gems/thin-1.7.2/lib/thin/connection.rb:84:in `pre_process'\", \"/layers/paketo-buildpacks_bundle-install/gems/ruby/2.7.0/gems/thin-1.7.2/lib/thin/connection.rb:50:in `block in process'\", \"/layers/paketo-buildpacks_bundle-install/gems/ruby/2.7.0/gems/eventmachine-1.0.9.1/lib/eventmachine.rb:1067:in `block in spawn_threadpool'\"]}}",
"log_level": "error",
"source": "cc.api",
"data": {
"request_guid": "22363b1c-c8f3-4bc0-b8cb-37f1b4543866::06fe60bf-556c-4242-8cfa-077ec32e6340"
},
"thread_id": 68920,
"fiber_id": 68940,
"process_id": 1,
"file": "/workspace/lib/sinatra/vcap.rb",
"lineno": 45,
"method": "block in registered"
}
{
"timestamp": "2021-03-11T20:47:45.573017700Z",
"message": "Completed 503 vcap-request-id: 22363b1c-c8f3-4bc0-b8cb-37f1b4543866::06fe60bf-556c-4242-8cfa-077ec32e6340",
"log_level": "info",
"source": "cc.api",
"data": {
"request_guid": "22363b1c-c8f3-4bc0-b8cb-37f1b4543866::06fe60bf-556c-4242-8cfa-077ec32e6340"
},
"thread_id": 68920,
"fiber_id": 68940,
"process_id": 1,
"file": "/workspace/middleware/request_logs.rb",
"lineno": 40,
"method": "call"
}
Cluster information
local minikube using WSL2
s8me5s@DESKTOP-Q8TBEVJ:~/liberty-test-app$ kubectl cluster-info
Kubernetes master is running at https://127.0.0.1:49179
KubeDNS is running at https://127.0.0.1:49179/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
s8me5s@DESKTOP-Q8TBEVJ:~/liberty-test-app$ cf t
API endpoint: https://api.127.0.0.1.nip.io
API version: 3.98.0
user: admin
org: test-org
space: test-space
CLI versions
paste output of the following commands
ytt --version: ytt version 0.31.0
kapp --version: kapp version 0.35.0
kubectl version: v1.19.3
cf version: cf version 7.2.0+be4a5ce2b.2020-12-10
The text was updated successfully, but these errors were encountered:
Ok solved. 😆 "error": "2:the server could not find the requested resource (get pods.metrics.k8s.io). debug_error_string:{\"created\":\"@1615495665.571772000\",\"description\":\"Error received from peer ipv4:10.96.236.26:8080\",\"file\":\"src/core/lib/surface/call.cc\",\"file_line\":1063,\"grpc_message\":\"the server could not find the requested resource (get pods.metrics.k8s.io)\",\"grpc_status\":2}"
somehow I missed this..
Solution:
$ minikube addons enable metrics-server
▪ Using image k8s.gcr.io/metrics-server-amd64:v0.2.1
🌟 The 'metrics-server' addon is enabled
s8me5s@DESKTOP-Q8TBEVJ:~/get-started-python$ cf apps
Getting apps in org test-org / space test-space as admin...
name requested state processes routes
GetStartedPython started web:1/1 GetStartedPython.apps.127.0.0.1.nip.io, test.apps.127.0.0.1.nip.io
Thanks for the detailed issue and follow up solution report! From my experience running cf-for-k8s, that error message tends to show up when metrics-server is absent from the cluster, so the solution you described in your follow up comment seems consistent with my understanding of the symptoms you described. I'm going to go ahead and resolve the issue as a result, but feel free to reopen if there was something we missed.
Hi CF Community,
Describe the bug
I've decided to go further with my tests of cf-for-k8s on Minikube using Docker for windows. This time, I've attempted to deploy simple test python app. https://github.com/IBM-Cloud/get-started-python
Push went fine except an error at the end (at this point it should return the app status). However, the app is accessible.
To Reproduce*
Steps to reproduce the behavior:
Cluster information
local minikube using WSL2
CLI versions
paste output of the following commands
ytt --version
: ytt version 0.31.0kapp --version
: kapp version 0.35.0kubectl version
: v1.19.3cf version
: cf version 7.2.0+be4a5ce2b.2020-12-10The text was updated successfully, but these errors were encountered: