Repository navigation
Description
Expected Behavior
Ingestion jobs successfully run and bigquery table (feast.customer_project_customer_transactions_v1) gets populated with data.
Current Behavior
>>> client.ingest("customer_transactions", customer_features)
Waiting for feature set to be ready for ingestion...
0%| | 0/155 [04:48<?, ?rows/s]
Ingestion complete!
Ingestion statistics:
Success: 0/155
Removing temporary file(s)...
BQ table is empty:
SELECT COUNT(*) FROM `feast.customer_project_customer_transactions_v1`;
is 0.
Steps to reproduce
Follow latest GKE setup docs with the following differences:
my-projectas project ID- Use image 0.4.2
- Use
NodePortto expose service to local client - In basic example, use
$FEAST_CORE_URLand$FEAST_BATCH_SERVING_URL - Open up nodeports in GCP firewall 32090, 32091, 32092:
gcloud compute firewall-rules create feast-core-port --allow tcp:32090
gcloud compute firewall-rules create feast-online-port --allow tcp:32091
gcloud compute firewall-rules create feast-batch-port --allow tcp:32092
my-feast-values.yaml ends up looking like:
feast-core:
enabled: true
image:
tag: "0.4.2"
jvmOptions:
- -Xms1024m
- -Xmx1024m
resources:
requests:
cpu: 1000m
memory: 1024Mi
service:
type: NodePort
grpc:
nodePort: 32090
gcpServiceAccount:
useExistingSecret: true
feast-serving-online:
enabled: true
redis:
enabled: true
image:
tag: "0.4.2"
jvmOptions:
- -Xms1024m
- -Xmx1024m
resources:
requests:
cpu: 500m
memory: 1024Mi
service:
type: NodePort
grpc:
nodePort: 32091
store.yaml:
name: redis
type: REDIS
redis_config:
port: 6379
subscriptions:
- name: "*"
project: "*"
version: "*"
feast-serving-batch:
enabled: true
redis:
enabled: false
image:
tag: "0.4.2"
jvmOptions:
- -Xms1024m
- -Xmx1024m
resources:
requests:
cpu: 500m
memory: 1024Mi
service:
type: NodePort
grpc:
nodePort: 32092
gcpServiceAccount:
useExistingSecret: true
application.yaml:
feast:
jobs:
staging-location: gs://my-project_feast_bucket/serving/batch
store-type: REDIS
store-options:
host: localhost
port: 6379
store.yaml:
name: bigquery
type: BIGQUERY
bigquery_config:
project_id: my-project
dataset_id: feast
subscriptions:
- name: "*"
project: "*"
version: "*"
Specifications
- Version: 0.4.2, latest master python SDK (2a33f7b)
- Platform: Installing GKE on local Mac OSX
- Subsystem: Python 3.7.6, helm v2.16.1, kubectl v1.17.0
Possible Solution
Default Kafka configs might need adjusting? Maybe related to NodePort config?
kubectl logs for feast-feast-core appear to show kafka jobs were successfully created and sent to DirectRunner:
22:57:52 [pool-5-thread-1] INFO feast.ingestion.ImportJob - Starting import job with settings:
Current Settings:
appName: DirectRunnerJobManager
blockOnRun: false
enforceEncodability: true
enforceImmutability: true
featureSetJson: [{
"name": "customer_transactions",
"version": 1,
"entities": [{
"name": "customer_id",
"valueType": "INT64"
}],
"features": [{
"name": "total_transactions",
"valueType": "INT64"
}, {
"name": "daily_transactions",
"valueType": "DOUBLE"
}],
"maxAge": "86400s",
"source": {
"type": "KAFKA",
"kafkaSourceConfig": {
"bootstrapServers": "feast-kafka:9092",
"topic": "feast"
}
},
"project": "customer_project"
}]
gcsPerformanceMetrics: false
optionsId: 0
project:
runner: class org.apache.beam.runners.direct.DirectRunner
stableUniqueNames: WARNING
storeJson: [{
"name": "bigquery",
"type": "BIGQUERY",
"subscriptions": [{
"name": "*",
"version": "*",
"project": "*"
}],
"bigqueryConfig": {
"projectId": "my-project",
"datasetId": "feast"
}
}]
22:57:54 [pool-5-thread-1] INFO feast.ingestion.utils.StoreUtil - Writing to existing BigQuery table 'my-project:feast.customer_project_customer_transactions_v1'
22:57:54 [pool-6-thread-1] INFO org.apache.beam.sdk.io.kafka.KafkaUnboundedSource - Partitions assigned to split 0 (total 1): feast-0
2020-01-09 22:57:54.984 AUDIT feast-feast-core-dc485b44d-qg75w --- [pool-6-thread-1] f.c.l.AuditLogger : {action=STATUS_CHANGE, detail=Job submitted to runner DirectRunner with ext id kafka-to-redis1578610671583., id=kafka-to-redis1578610671583, resource=JOB, timestamp=Thu Jan 09 22:57:54 UTC 2020}
22:57:55 [pool-5-thread-1] INFO org.apache.beam.sdk.io.kafka.KafkaUnboundedSource - Partitions assigned to split 0 (total 1): feast-0
2020-01-09 22:57:55.373 AUDIT feast-feast-core-dc485b44d-qg75w --- [pool-5-thread-1] f.c.l.AuditLogger : {action=STATUS_CHANGE, detail=Job submitted to runner DirectRunner with ext id kafka-to-bigquery1578610671583., id=kafka-to-bigquery1578610671583, resource=JOB, timestamp=Thu Jan 09 22:57:55 UTC 2020}
22:57:55 [pool-2-thread-1] INFO feast.core.service.JobCoordinatorService - Updating feature set status
22:57:58 [direct-runner-worker] INFO org.apache.beam.sdk.io.kafka.KafkaUnboundedSource - Reader-0: reading from feast-0 starting at offset 0
22:57:58 [direct-runner-worker] INFO org.apache.beam.sdk.io.kafka.KafkaUnboundedSource - Reader-0: reading from feast-0 starting at offset 0
And a feast topic was successfully created according to the kafka-config pod:
Waiting for Zookeeper...
Waiting for Kafka...
Applying runtime configuration using confluentinc/cp-kafka:5.0.1
Created topic "feast".
Configs for topic 'feast' are
But, I'm getting errors thrown related to topics in feast-kafka-0 logs:
[2020-01-09 22:57:57,799] INFO [Log partition=__consumer_offsets-2, dir=/opt/kafka/data/logs] Truncating to 0 has no effect as the largest offset in the log is -1 (kafka.log.Log)
[2020-01-09 22:57:57,804] ERROR [ReplicaFetcher replicaId=0, leaderId=1, fetcherId=0] Error for partition __consumer_offsets-8 at offset 0 (kafka.server.ReplicaFetcherThread)
org.apache.kafka.common.errors.UnknownTopicOrPartitionException: This server does not host this topic-partition.
[2020-01-09 22:57:57,804] ERROR [ReplicaFetcher replicaId=0, leaderId=1, fetcherId=0] Error for partition __consumer_offsets-35 at offset 0 (kafka.server.ReplicaFetcherThread)
org.apache.kafka.common.errors.UnknownTopicOrPartitionException: This server does not host this topic-partition.
[2020-01-09 22:57:57,805] ERROR [ReplicaFetcher replicaId=0, leaderId=1, fetcherId=0] Error for partition __consumer_offsets-41 at offset 0 (kafka.server.ReplicaFetcherThread)
Happy to share any other relevant logs. I'm admittedly not familiar with Kafka, so I could be off here. Just trying to get the GKE feast guide + basic example working end to end. Once it works, happy to put up a PR to update the guide for 0.4.X.
Activity
lgvital commentedon Jan 10, 2020
FWIW same issue with 0.4.3.
woop commentedon Jan 10, 2020
@lgvital Thanks for the super detailed logs. Can you confirm that you can the Kafka brokers from the environment where you are running the SDK/CLI? You should be able to telnet to
feast-kafka:9092It could be that the SDK is not returning a proper exception and this is related to connectivity.
lgvital commentedon Jan 10, 2020
Hi @woop, I'm currently running the feast SDK/CLI from my local environment--should I be expected to be able to access
feast-kafkawithout a NodePort? I was not able to telnet9092with the feast IP (external) or internal ip, or maybe I'm not clear on what exactly you wanted me to try.Perhaps I need to set up a
NodePortfor kafka? I tried a few different variations, e.g.Unsure what to put under advertised.listeners though. I also tried
EXTERNAL://kafka.cluster.local:$((31090 + ${KAFKA_BROKER_ID}))from the kafka config docs. Opening up the 31090 port in gcloud's firewall (similar to above) did not seem to help.feast-corepod ends up failing to run with the following error related to kafka:Some guidance on what we could try next would be appreciated!
woop commentedon Jan 14, 2020
You have to be able to telnet to that port. It means that there is something wrong with your connectivity.
FEAST_IPshould be the external IP of one of your nodes. This can be a public internet IP, but it must be whitelisted in your firewall if it isnt already. Can you try that and let me know if it makes a difference?lgvital commentedon Jan 14, 2020
Thanks for the response. I have
$FEAST_IPdefined as:I have opened up the 9092 port in my GCP firewall using:
I am unable to telnet into 9092.
From my understanding though, to have a port be accessible, I need to set up a node port similar to the other feast services:
However, from what I tried, I wasn't able to successfully start my services. If I have connectivity issues with
9092, should I be setting up a node port for9092?woop commentedon Jan 15, 2020
Yes, you should be enabling NodePort for Kafka as well. Thank you for being so patient with the charts and docs being out of date.
The values-demo.yaml is enabling NodePort for Kafka. Can you try that and see if it works for you?
lgvital commentedon Jan 15, 2020
No worries! Like I mentioned, my goal is just to get this working end to end in GKE. Happy to update the charts/docs afterward.
Yup! I've tried that, replacing
feast.example.comwith the output of $FEAST_IP. I end up with the following exception thrown infeast-core:lgvital commentedon Jan 15, 2020
To clarify, using the NodePort config, I am able to telnet
but feast-core shuts itself down due to the
org.apache.kafka.common.KafkaException.lgvital commentedon Jan 16, 2020
Was missing a key piece in my config, the application.yaml:
However, when ingesting, I get similar errors in my kafka logs as the OP:
I did notice something else odd in the logs that could be relevant:
where
<ip>does not map to my$FEAST_IP.lgvital commentedon Jan 17, 2020
Okay, getting close.
It was related to the wrong IP. After updating my bootstrapServers in my helm chart, the existing
customer_fswas using my old config, so it was usingfeast-kafka:9092as the broker. I'm not sure if that's expected behavior?I forced it to use new config by creating a new feature set and was able to ingest successfully!
Batch serving is throwing me this error though, but hopefully a similar fix:
woop commentedon Jan 17, 2020
I have also been going through the helm installation and resolved most issues, but I have discovered new holes that I am trying to plug. Here is my current list of changes that I want to make to the docs/charts
datasetandprojectinstore.yamlkey in helm valuesstore-options:to use an external IP and NodePort. Feast batch serving uses Redis as its job store to retain state, so it needs to be able to connect to Redis. Its better to use the Redis that online serving uses so that we don't need to deploy two servers. (FYI: this is tech debt and will be cleared in the future).0.4.3I think the problem you have right now is that Feast Batch Serving is trying to find that Redis instance but it cant find it on localhost. If you are using
DirectRunnerthen the Redis does not need to be exposed outside of the cluster and you can just provide Feast Batch Serving with the internal IP and port of the Redis service. If you are going to use Dataflow then you need to use the externally exposed Redis IP (as I have done above) when configuring Feast Batch Serving.lgvital commentedon Jan 17, 2020
Great exhaustive list! Aside from 7, I've come to very similar changes. I implemented 7 and it fixed my batch serving / redis issue, thanks!
I think you also want to make sure to include the
bootstrapServersconfig similar to values-demo.yaml.