"Unknown option '--cafile'." - mosquitto

WSL for Windows 10 is installed. Latest Moquitto version is available in the system.
Mosquitto_pub and mosquitto_sub commands for test purpose are working fine.
But when user pass the below command, it displays an error:
mosquitto_sub --cafile ca-chain.cert.pem --insecure -h <<ip address>> -p 8883 -u "c516c66a-4970-4a45-817b-d912871e9033" -P "1853398586" -t "c516c66a-4970-4a45-817b-d912871e9033/control/devices/rsp"
Error: Unknown option '--cafile'.
mosquitto_sub is a simple mqtt client that will subscribe to a single topic and print all messages it receives.

Your mosquitto-clients appears to be outdated.
You can install a newer version from https://mosquitto.org/download/.
You wrote in the comments that you installed via:
sudo apt-get install mosquitto mosquitto-clients
You could use https://launchpad.net/~mosquitto-dev/+archive/ubuntu/mosquitto-ppa:
sudo apt-add-repository ppa:mosquitto-dev/mosquitto-ppa
sudo apt-get update

Related

RAPIDS.ai dependencies cuml and cudf not found no matter how I install

I have followed every version of the instructions on the AWS-EC2 setup for RAPIDS.ai: https://rapids.ai/cloud#AWS-EC2
I can confirm that I am using the exact instance type in the instructions, and following the steps exactly.
When I try to use the docker approach, the --gpus all command is not accepted.
When I try to use the conda approach, the install fails with the error:
PackageNotFoundError: Packages missing in current channels:
- glibc
I have tried (many) different solutions provided to solve both of these problems, none of them seem to work. I really just need to test some python code with cuml and cudf imports in a notebook. Been at this for 7 hours (after giving up on my local and SageMaker).
You note that the --gpus all command is not accepted, which suggests that you do not have the NVIDIA Docker runtime installed.
I followed the instructions you linked and I did run into an issue where the sudo yum install -y nvidia-docker2 command failed and I needed to disable an Amazon yum repo that was causing come conflicts as outlined in this issue.
$ sudo yum-config-manager --disable amzn2-graphics
$ sudo yum install -y nvidia-docker2
$ sudo yum-config-manager --enable amzn2-graphics
Once I'd done that and run sudo systemctl restart docker I was able to start the RAPIDS container.
$ docker run --gpus all --rm -it -p 8888:8888 -p 8787:8787 -p 8786:8786 rapidsai/rapidsai:cuda11.2-runtime-ubuntu18.04-py3.7
This container image and its contents are governed by the NVIDIA Deep Learning Container License.
By pulling and using the container, you accept the terms and conditions of this license:
https://developer.download.nvidia.com/licenses/NVIDIA_Deep_Learning_Container_License.pdf
A JupyterLab server has been started!
To access it, visit http://localhost:8888 on your host machine.
Ensure the following arguments were added to "docker run" to expose the JupyterLab server to your host machine:
-p 8888:8888 -p 8787:8787 -p 8786:8786
Make local folders visible by bind mounting to /rapids/notebooks/host
(rapids) root#be7253bb4fdb:/rapids/notebooks#
Turns out, the frist AMI suggested in the documentation is not compatible. Use the Deep Learning NVIDIA one instead.

socket: address family not supported by protocol

CentOS 7
Docker version 20.10.6, build 370c289
I try to run image like this:
docker run -d --name sonarqube -p 9000:9000 -v sonarqube-conf:/opt/sonarqube/conf -v sonarqube-data:/opt/sonarqube/data -v sonarqube-logs:/opt/sonarqube/logs -v sonarqube-extensions:/opt/sonarqube/extensions sonarqube
But get error:
docker: Error response from daemon: driver failed programming external connectivity on endpoint sonarqube (asfsfdsfdsfdsfdsfdsfds): Error starting userland proxy: listen tcp6 [::]:9000: socket: address family not supported by protocol.
This blog post discusses the problem and solution:
For some reason IPv6 (the hint is tcp6) is screwing things up. The problem is that I disabled IPv6 from the start on this host. Mainly because of some concerns in regards of routing and internet accessibility (I have a formal IPv6 subnet at home).
In your case, this is the solution which worked for a container of mine where I was seeing the same issue. Replace the host port with the host LAN IPv4 address (I used 172.16.18.93 in the following snippet) and port:
docker run -d --name sonarqube -p 172.16.18.93:9000:9000 -v sonarqube-conf:/opt/sonarqube/conf -v sonarqube-data:/opt/sonarqube/data -v sonarqube-logs:/opt/sonarqube/logs -v sonarqube-extensions:/opt/sonarqube/extensions sonarqube
I found solution.
Install Docker ver 20.10.5
E.g. from repo:
sudo yum install docker-ce-20.10.5 docker-ce-cli-20.10.5 containerd.io
And now problem is gone.
so for those that run in to this issue, the thing that solved it for me was to update docker
reviewing the documentation, just grab the latest release of docker. https://docs.docker.com/engine/install/ubuntu/
i.e
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin

ubuntu16.04 system keeps reporting errors when installing milvus CPU version

I installed it by following the instruction from Milvus. But every time I installed it with docker, it failed to start.
The docker command is as followed:
sudo docker run -d --name milvus_cpu_0.10.5 \
-p 19530:19530 \
-p 19121:19121 \
-v /home/$USER/milvus/db:/var/lib/milvus/db \
-v /home/$USER/milvus/conf:/var/lib/milvus/conf \
-v /home/$USER/milvus/logs:/var/lib/milvus/logs \
-v /home/$USER/milvus/wal:/var/lib/milvus/wal \
milvusdb/milvus:0.10.5-cpu-d010621-4eda95
And docker logs didn't show any information.
screenshot
Many factors might cause this problem. First, make sure that your machine supports these instruction sets.

GUI application via Docker - X11 - "Unable to init server"

I'm trying to run Firefox in a Debian docker image but can't connect to the X11 server.
I'm using the method described here, but changed the base image to the latest Debian. I also changed the user creation method.
Dockerfile
FROM debian:latest
RUN apt-get update && apt-get install -y firefox-esr
RUN useradd --shell /bin/bash --create-home developer && \
usermod -aG sudo developer
USER developer
ENV HOME /home/developer
CMD /usr/bin/firefox
Building the container
docker build -t firefox .
Command to start the container
docker run -ti --rm \
-e DISPLAY=$DISPLAY \
-v /tmp/.X11-unix:/tmp/.X11-unix \
firefox
ERROR
Unable to init server: Could not connect: Connection refused
Error: cannot open display: :0
Operating system
OpenSUSE Leap 15.2
Context
I'm doing the above to understand how to run a GUI app via docker. The aim is to run the latest version of FreeCAD (v19), which is currently broken on OpenSUSE.
docker run --rm \
--net=host \
--env="DISPLAY" \
--volume="$HOME/.Xauthority:/home/developer/.Xauthority:rw" \
firefox
This should work with your Dockerfile!
Couple of points
.Xauthority file also needs to be shared as it holds the cookies and auth sessions for the X server. Hence it has to be read/write too.
If you dont want to do --net=host then you can listen on a TCP port bound to unix socket and forward that to the container.

How to use mosquitto_pub to publsih the topic/message with specific time interval on the mqtt server?

I am working on Raspberry Pi with os "Raspbian GNU/Linux 8 (jessie)".Now what i am trying is to send the simple message from my raspberry pi to the mqtt server which i have created on the "api.cloudmqtt.com". I am able to send (from raspberry pi to my server) and Receive (from server to my raspberry pi)
with the following Commands
1.
pi#RevPi100102:~ $ mosquitto_pub -h "farmer.cloudmqtt.com" -p "18989" -u "obvrnnss" -P "xxxxxxxxx" -t "Test check" -m "Hello from RevPi"
2.
pi#RevPi100102:~ $ mosquitto_sub -h "farmer.cloudmqtt.com" -p "18989" -u "obvrnnss" -P "xxxxxxxxx" -t "Test check"
After this i tried to send the same message to server using the -r and for this i took help from link for mosquitto_pub
pi#RevPi100102:~ $ mosquitto_pub -h "farmer.cloudmqtt.com" -p "18989" -u "obvrnnss" -P "xxxxxxxxxx" -t "Test check" -m "Hello from RevPi" -r --repeat-delay "2"
I am getting the following error,
Error: Unknown option '--repeat-delay'.
Can someone help me to find where i am going wrong and how to use the command -r and --repeat-delay.I am not expertise in Linux commands.
Firstly the -r flag is not the short version of --repeat or --repeat-delay
From the mosquitto_pub doc
-r,
--retain
If retain is given, the message will be retained as a "last known good" value on the broker. See mqtt(7) for more information.
To get repeating messages you need to use the --repeat flag. This can then be combined with the --repeat-delay flag to set the time between each message being published.
Secondly, the repeat functionality is new, it was only added at version 1.6 of mosquitto. You not said what version you are using but if it is the default that ships with raspbian then it is unlikely you have this feature.

Resources