Cloud troubleshooting tips
Review the following questions to help you troubleshoot common issues with cloud environments related to IBM Edge Computing for Devices. The tips and guides for each question can help you resolve common issues and obtain information to identify root causes.
- Is your IBM Cloud user account setup correctly?
- Are you able to subscribe to your organization's Kafka broker from IBM Event Streams?
- Are your containers pushed to your Docker registry?
- Are your containers published to Horizon exchange?
- Does your published deployment pattern include all required services and versions?
Is your IBM Cloud user account setup correctly?
You need an IBM Cloud user account to complete any action within IBM Event Streams. To verify your IBM Cloud credentials, or to create an IBM Cloud user account, open a web browser and go to IBM Cloud .
Log in with your account credentials and review your user account settings to verify that your account is set up correctly.
Note: IBM Cloud does provide a free tier of access, but depending on your business or project needs, you might need to upgrade to a paid account.
Are you able to subscribe to your organization's Kafka broker from IBM Event Streams?
Subscribing to the Kafka instance for your organization from IBM Event Streams can help you verify that your Kafka user credentials are correct. This subscription can also help you verify that your Kafka service instance is running in the cloud, and that your edge node is sending data when data is being published.
To subscribe to your Kafka broker, install the kafkacat program with the following command:
sudo apt install kafkacat
After installation, you can subscribe by using a command similar following example that uses the credentials you usually place in environment variable references:
kafkacat -C -q -o end -f "%t/%p/%o/%k: %s\n" -b $MSGHUB_BROKER_URL -X "security.protocol=sasl_ssl" -X "sasl.mechanisms=PLAIN" -X "sasl.username=${MSGHUB_API_KEY:0:16}" -X "sasl.password=${MSGHUB_API_KEY:16}" -t "$MSGHUB_TOPIC"
Where MSGHUB_BROKER_URL is the URL to your Kafka broker, MSGHUB_TOPIC is your Kafka topic, and MSGHUB_API_KEY is your API key for authenticating with IBM Event Streams API.
If the subscription command is successful, the command blocks indefinitely. The command then waits for any publication to your Kafka broker and retrieves and displays any resulting messages. If you do not see any messages from your edge node after a few minutes, review the service log for error messages.
For example, to review the log for the cpu2msghub service, run the following command:
- For Linux and Windows
tail -n 500 -f /var/log/syslog | grep -E 'cpu2msghub\[[0-9]+\]:'
- For macOS
docker logs -f $(docker ps --filter 'name=-cpu2msghub' | tail -n +2 | awk '{print $1}')
Are your containers pushed to your Docker registry?
Typically, a normal development process involves building and tagging your container images and then pushing the containers when you are logged in to Docker Hub. As a best practice after your push your containers, go to Docker Hub and verify that
your container images are available with the correct name and version. To verify your pushed container image name and version, open a web browser and go to Docker Hub .
Log in with your user account and review your listed repositories to verify your container details.
Are your containers published to Horizon exchange?
Horizon exchange is the central warehouse for metadata about the code that is published for your edge nodes. If you have not signed and published your code to the Horizon exchange, the code cannot be pulled to your edge nodes, verified, and ran.
Run the hzn command with the following arguments to view the list of published code to verify that all of your service containers were successfully published:
hzn exchange service list -o $WIOTP_ORG_ID
The parameter WIOTP_ORG_ID is your organization ID.
Does your published deployment pattern include all required services and versions?
On any machine where the hzn command is installed, you can use the command to get details about any deployment pattern. Run the command with the following arguments to pull the listing of deployment patterns from the Horizon exchange:
hzn exchange pattern list | jq .
hzn exchange pattern list "$ORG_ID/*" | jq .
hzn exchange pattern list $ORG_ID/$PATTERN | jq .
The parameter ORG_ID is your organization ID and PATTERN is the name of the deployment pattern you are obtaining information about.