drogue-iot / drogue-cloud

Cloud Native IoT
https://drogue.io
Apache License 2.0
114 stars 30 forks source link

some problem on experience drogue cloud #147

Closed jm-observer closed 3 years ago

jm-observer commented 3 years ago

i had install drogue-cloud on my machine, and i can create app/dev by drg.but I ran into a few problems:

  1. i can’t publish msg by http (also can’t connect to mqtt-endpoint), but i can publish in the http-endpoint pod. is there something not configure?
huangjm@DESKTOP-06B3E7S:~$ echo '{"temp":42}' | http --auth 'mqtt_dev@some-app:mqtt_dev' POST https://http-endpoint.172.18.0.2.nip.io:30443/v1/foo

http: error: ConnectionError: ('Connection aborted.', OSError(0, 'Error')) while doing POST request to URL: https://http-endpoint.172.18.0.2.nip.io:30443/v1/foo
  1. how can i adjust kafka's log level?
ctron commented 3 years ago

If you have used the installer script, then a local CA has been created and Drogue Cloud has been configured to use this. However, you local system does not recognize this CA as a trust anchor. The default example commands should all include the --verify (for http, or respective option for the other commands) to enable this per request.

I noticed this option is missing from your example command.

If you run ./scripts/drgadm examples … you should the get complete arguments printed out as an example:

Publish data:
---------------

After you created a device, try these commands at a shell prompt:

  http --auth device1@example-app:foobar --verify build/certs/endpoints/root-cert.pem POST https://http-endpoint.192.168.39.35.nip.io:30443/v1/foo temp:=42
  mqtt pub -v -h mqtt-endpoint.192.168.39.35.nip.io -p 30001 -u device1@example-app -pw foobar -s --cafile build/certs/endpoints/root-cert.pem -t temp -m '{"temp":42}'
ctron commented 3 years ago

Regarding Kafka logging: Drogue Cloud uses Strimzi by default to provision Kafka.

So you can configure Kafka logging using Strimzi: https://strimzi.io/docs/operators/latest/using.html#external-logging_str … if that is what you had in mind. If not, please let me know what you are looking for.

jm-observer commented 3 years ago

If you have used the installer script, then a local CA has been created and Drogue Cloud has been configured to use this. However, you local system does not recognize this CA as a trust anchor. The default example commands should all include the --verify (for http, or respective option for the other commands) to enable this per request.

I noticed this option is missing from your example command.

If you run ./scripts/drgadm examples … you should the get complete arguments printed out as an example:

Publish data:
---------------

After you created a device, try these commands at a shell prompt:

  http --auth device1@example-app:foobar --verify build/certs/endpoints/root-cert.pem POST https://http-endpoint.192.168.39.35.nip.io:30443/v1/foo temp:=42
  mqtt pub -v -h mqtt-endpoint.192.168.39.35.nip.io -p 30001 -u device1@example-app -pw foobar -s --cafile build/certs/endpoints/root-cert.pem -t temp -m '{"temp":42}'

Thanks! The problem has been solved. The reason is that I installed it on WSL and did not set hosts.