Overview
1 Reviewing Logfiles
2 Common Mistakes
3 Docker Monitor
4 Configure Passwordless SSH (MacOS)
Reviewing Logfiles
1 The Pulse Agent writes to its local OS syslog. You can use journalctl to watch the logs in real time and set a unit descriptor to filter only for Pulse activity by issuing the following command
journalctl -u iotc-agent -f
2 Watching the logs in this manner can be helpful when you are triggering some other activity (like working on sending in Pulse System Properties or Metrics via script)
Common Mistakes
1 ‘Enrollment Failures’ when attempting to onboard Connected Things : Make sure that the Connected Thing is Whitelisted in the Parent Gateway’s Template, otherwise the new Thing will not be allowed to enroll.
Docker Monitor
1 If you are spinning up new Docker Containers on your Gateway and they are not showing up in Pulse, check for the existence of [containername].container files in the Pulse Agent /data/data directory.
ls /opt/vmware/iotc-agent/data/data/*.container
There is a .container file for each Docker Container that Pulse attempts to register - cat one of these to verify if there is an ID present within the .container file.
cat /opt/vmware/iotc-agent/data/data/[name].container
If there is no value present, Pulse will not be able to successfully register the Container as a Connected Thing to your Virtual IoT Gateway.
2 Stop the Docker Monitor service
service dockermonitor stop
Run the following command to remove your existing *.container files
rm /opt/vmware/iotc-agent/data/data/*.container
Change into your /opt/dockermonitor directory
cd /opt/dockermonitor
Run the dockermonitor.sh script manually and see if you receive messages indicating that your containers have been registered and that send properties are responding successfully (status 0 responses)
./dockermonitor.sh
Break out of the script by pressing Ctrl-C then start your DockerMonitor service back up
service dockermonitor start
Configure Passwordless SSH (MacOS)
If you are tired of typing your password every time you SSH to your Gateway, this procedure is for you
1 Verify that you do not already have an existing SSH key present on your laptop/workstation (if you do have keys present like in the screenshot below, skip to step 3 as you do not want to overwrite these)
ls -al ~/.ssh/id_*.pub
2 If you have no key present, generate a new key pair using the following command
ssh-keygen -t rsa -b 4096 -C "your_email@domain.com"
Press Enter to accept the default file location and file name
Enter passphrase (press empty for no passphrase):
3 Copy your Public Key to the Gateway that you want to use Passwordless SSH for using the following command
ssh-copy-id remote_username@gateway_ip_address
4 Verify that you can now SSH without having to enter your password
ssh remote_username@gateway_ip_address
comments powered by Disqus