-
Notifications
You must be signed in to change notification settings - Fork 128
Resolve attempt failed! Cause: spray.json.DeserializationException: Object is missing required member 'items' #78
Comments
I think I've found the problem. GCP enables Role-Based Access Control (aka RBAC) by default in new Kubernetes clusters. This requires configuring roles to allow access to resources within the Kubernetes API. Lightbend Orchestration (specifically, the Akka Cluster Bootstrap component) uses the Kubernetes API to automatically form a cluster. Without binding your pods' service account to a role that grants access to the required resources, these API calls fail. To correct this, you'll need to follow the instructions on this page for configuring role-based access control: https://developer.lightbend.com/docs/akka-management/current/discovery.html#discovery-method-kubernetes-api For example, you can supply these Kubernetes resources to kubectl apply: ---
#
# Create a role, `pod-reader`, that can list pods and
# bind the default service account in the `default` namespace
# to that role.
#
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: pod-reader
rules:
- apiGroups: [""] # "" indicates the core API group
resources: ["pods"]
verbs: ["get", "watch", "list"]
---
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: read-pods
subjects:
# Note the `name` line below. The first default refers to the namespace. The second refers to the service account name.
# For instance, `name: system:serviceaccount:myns:default` would refer to the default service account in namespace `myns`
- kind: User
name: system:serviceaccount:default:default
roleRef:
kind: Role
name: pod-reader
apiGroup: rbac.authorization.k8s.io Once you've created this role and role binding, your Lagom services should start correctly. You might want to tailor this to your specific security needs. @lejoow please let us know if that fixes the problem for you. Even if it does, we can leave this issue open until we update the documentation. |
@TimMoore fantastic. Let me try this fix today and come back to you on this post. Thanks a lot! |
hmm... I don't get that error anymore, but I am getting the different errors now: 2018-05-10T17:54:27.363Z [�[37minfo�[0m] akka.management.cluster.bootstrap.dns.HeadlessServiceDnsBootstrap [sourceThread=application-akka.actor.default-dispatcher-24, akkaTimestamp=17:54:27.363UTC, akkaSource=akka.tcp://[email protected]:10001/system/headlessServiceDnsBootstrap, sourceActorSystem=application] - Exceeded stable margins without locating seed-nodes, however this node is NOT the lowest address out of the discovered IPs in this deployment, thus NOT joining self. Expecting node Some(ResolvedTarget(10.16.0.13,Some(10002))) (out of List(ResolvedTarget(10.16.0.13,Some(10002)), ResolvedTarget(10.16.1.48,Some(10002)))) to perform the self-join and initiate the cluster. I am still investigating.. |
It worked! I just had to re-deploy. Thanks! kubectl create clusterrolebinding cluster-admin-binding |
Let's leave this open until the documentation is updated. Thanks! |
Added an issue for the Akka Management documentation to note that Google Cloud users will need to grant themselves the |
That solved my problem! Thanx a lot Tim! You`re the best! |
@TimMoore I followed your suggestion but now I receive:
For what it's worth, I am trying to run Lagom with Istio |
Disabling Istio resolves this issue, I will try to look further and share results |
@TimMoore @lejoow I have the same issue running on Minikube. Here are my deployment steps:
All Pods have status Then I had a look at the
Then I had a look in the logs at the
|
@TimMoore @lejoow @normenmueller I'm also facing with the same Does anybody have an idea how to fix it? |
We have the same error, due to Lightbend Orchestration documentation. |
The If you're having another problem, the best place to start is by posting an issue on the Discourse forum: https://discuss.lightbend.com/ |
We are trying to deploy our lagom application with kubernetes. But we could not fix this issue. We clone this repository (chirper) and deploy with minikube to be sure the problem does not about our configuration. It is the result: And this is the log file:
I think the problem is about configuration that given below. My microservices that do not have this configuration are working without any error. When i look the logs then i see the akka management port is 10002. The readiness prob also check this port and getting The application.conf file configuration:
|
Trying to deploy online-auction, getting:
any ideas? |
same error because of akka/akka-management#222 when using |
The related issue #222 was resolved, 0.15 should fix it then. Thanks for digging into this! |
Great news @ktoso , when will be 0.15 version applied to the Lagom? |
I'll have to rely this to @TimMoore, not sure on release schedule of intermediate deps etc. |
Lagom has no dependency on akka-management. That comes in by way of Lightbend Orchestration, so I think @mitkus is the right one to ask. |
You are right, the related fix is part of the sbt-reactive-app plugin. We look forward to the version updates, thanks to everyone. |
I am not 100% sure if this is the issue specifics to my local settings or not. But every time I try to deploy the item-svc or bidding-svc to my Google KBE, I am getting this exception.
Resolve attempt failed! Cause: spray.json.DeserializationException: Object is missing required member 'items'
The text was updated successfully, but these errors were encountered: