-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to create trigger from openwhisk kafka feed that listens to a Generic Kafka instance in a Local ubuntu installation #221
Comments
It may be worth mentioning that I had the same problem with the alarms trigger when I tried installCatalog.sh, but was able to run the triggers smoothly by using the unofficial ansible script for the alarms trigger mentioner here: |
One thing to note here is that the trigger service runs inside a Docker container and, as such, if your broker list contains "localhost" that will resolve to the Docker container of the trigger service, and not the host machine where you presumably have Kafka running. Instead, you need to use your real IP address (an no, not 127.0.0.1 as that too will resolve to the container). For further clarity, the trigger service does not include a Kafka server. |
@prabhastechie Please see #210 and especially all the comments, which should help you through the most common problems encountered when trying to set this up locally. |
Ok, I'll check it out. But I was reusing the kafka docker created by the openwhisk ubuntu local setup.I thought that kafka docker exposes the ports 9092 / 9093 to the docker host. By using localhost:9092, I was able to send messages to a test topic in the kafka docker, from the docker host. |
@prabhastechie Ah, great then! It still stands that |
I found out the ip address of the docker running kafka on port 9092 and replaced the localhost:9092 with that ip address in the trigger create command. But the same error remains. My trigger create command was: I looked through the issue #210 and got the idea to scan the wsk logs. In the logs I am getting:
So it seems like trigger create is expecting the resource;
So there are two issues: In case its relevant, I was able to deploy the alarms feed under whisk.system by following the ansible scripts mentioned in apache/openwhisk-package-alarms#51 (comment) |
@prabhastechie Did you get this working? I am seeing the exact same behavior. I did notice about your logs is that in your activation logs show the |
I had similar problems and finally found that the kafkafeedprovider dropped incoming packages, because I forgot to set
This is from the working example https://github.com/SchuhMichael/dCache-FaaS-Tutorial |
Thanks @SchuhMichael, but that does not seem to be my issues. I have LOCAL_DEV set to true. Im using the incubator-openwhisk-deploy-kube helm charts to install everything from openwhisk to the kafka packages. |
Hello all, I might have a similar issue but not sure. This is what I'm doing:
docker logs to running container looks healthy
sounds like some JavaScript error. What could I do? Thanks for your time, |
@axelrose, try using an array for your brokers value. For example, Here you can see all the |
Thanks @dubee for your suggestion! It turned out to be a misleading error message since the same command line now works, also with just a single broker. My env vars weren't correctly set. My fault. |
I have openwhisk local installation on Ubuntu 16.04 desktop. Actions, triggers, rules and alarm triggers are working.
I cloned the git repository https://github.com/apache/incubator-openwhisk-package-kafka and ran the following in sequence: installCatalog.sh , gradlew :distDocker, installKafka.sh
Then I tried to create a trigger:
I am following this section of the README: "Creating a Trigger that listens to a Generic Kafka instance"
I am re-using the Kafka instance created as part of Openwhisk installation, and created a topic named 'test' - I am able to publish / consume to this topic using kafka command line tools.
The trigger creation fails (it deletes the trigger, saying resource does not exist).
One thing I observed is that the following packages were created under /guest:
I did change the feed name to /guest/messaging/kafkFeed, only kafkaFeed, etc., but the results are slightly different:
bin/wsk trigger create MyKafkaTrigger -f /guest/messaging/kafkaFeed -p
brokers "["localhost:9092", "localhost:9093"]" -p topic test -p
isJSONData true --insecure
GIVES a JSON output saying "error": "The requested resource does not exist."
bin/wsk trigger create MyKafkaTrigger -f /messaging/kafkaFeed -p brokers "
["localhost:9092", "localhost:9093"]" -p topic test -p isJSONData true -
-insecure
GIVES
ok: deleted trigger MyKafkaTrigger
Note that I am just planning to use a Generic Kafka instance without SASL . username / password / kafka admin (REST) url.
Later, I was advised to follow the document:
https://github.com/apache/incubator-openwhisk-package-kafka/blob/master/devGuide.md#install-actions
I created a docker build and create steps there too. But the trigger still cannot be created.
I do get expected results with the following commands:
and
Also, I tried:
Then I tried unsetting the namespace:
bin/wsk -i property unset --namespace
and
run
trigger create
againBut same error remains.
On a related note, I am not sure how the docker creation in the devGuide will work, since the port mapping 80:5000 will conflict with port 80 used by nginx. Note that this is a local installation - all in the same machine. If we map it to a different port, how will the trigger know which (non-standard) port to connect to?
But creating the trigger should work even if the docker is not running, so the more fundamental question is how to create the trigger.
The text was updated successfully, but these errors were encountered: