• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Apt-get related issue
#1
Hello Armin,

Hope you are doing good.

Happy New year!

I am working on the NetFILED (version 2.2.0.0) Gateway for the MQTT application, I am stuck while configuring, I just wanted to know can I use the apt-get command in the NetFILED device without any issue or anything else I have to use?

I am referring below link for configuration -
https://mntolia.com/installing-mosquitto...d-windows/


Br,
Devendra Songra


Attached Files Thumbnail(s)
   
  Reply
#2
netFIELD Connect device is a secure device with Hilscher netFIELD OS. Since this is a proprietary Hilscher made OS there is no official "apt" repository available which you could use like with official and public Linux Ubuntu distributions or Debian distribitions.

So when you open the Terminal in netFIELD Connect and try to call "apt update" ... it will fail always. But there is not such an "apt update" necessary with netFIELD Connect ... since netFIELD Connect is Docker based and all extension software needs to be installed via Docker containers and not - as you tried is now - via direct command line and packet installatons into main netFIELD OS trunk. So your try this is the wrong method how to add software.

To install additional software into ALL Hilscher netFIELD Gateways/and also netPI you have to install the software as Docker container. Installation via Docker containers is one of the bid advantages of Hilscher Gateway. By docker it is secured by design since noone can install additional packages with "apt" command into the main Linux.

Thx
Armin
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#3
The very official Docker container of Mosquitto is this one here: https://hub.docker.com/_/eclipse-mosquitto
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#4
Also see this post of another user sucessfully installed mosquitto container on Hilscher gateway: https://forum.hilscher.com/thread-269.html
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#5
Hello Armin,

I have read and performed the same process, but still, I am getting a connecting messages in node-red. 

attached mosquito log screenshot.

 
Br,
Devendra


Attached Files Thumbnail(s)
   
  Reply
#6
Well you are running into the same issue as the user Tad in this post https://forum.hilscher.com/thread-269.html.

I see in your log file that mosquitto be default is using a default mosquitto.conf file. But in this default mosquitto.conf file "anonymus logins" as Node-Red is performing it is disabled by default as explained in the very official mosquitto container documentation here https://mosquitto.org/documentation/migrating-to-2-0/

So either
a.) you create your own corrected mosquitto.conf file and map it into the container during container start
b.) you post edit the default mosquitto.conf file now in your started container manually using netPI container console mode and edit the file in the container's folder /mosquitto/mosquitto.conf with a text ediutor like "vi"

In both cases a.) and b.) the *.conf file has to contain the two lines 


Code:
listener 1883
allow_anonymous true

After editing the *.conf file restart the container and your mosquitto container is running find and accept anonymous logins of Node-RED.
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#7
Dear Armin,

This I have already perform. And then restarted the container.

"listener 1883

allow_anonymous true"

please find attached Screenshot.


Attached Files Thumbnail(s)
   
  Reply
#8
The latest container of today starts the mosquitto in the version V2.0.14. If you want to create you personal and own mosquitto.conf file from the default file, then get a copy of it from the official mosquitto's source code repository from here https://github.com/eclipse/mosquitto/blo...uitto.conf and then edit the file and add the two missing lines

Then copy (WinSCP for example) your edited file to your netFIELD Compact gateway to the folder e.g. /home/admin/ and then start the container again with

Code:
docker run -d -it -p 1883:1883 -p 9001:9001 --name mosquitto -v /home/admin/mosquitto.conf:/mosquitto/config/mosquitto.conf eclipse-mosquitto

This command above will map your personal mosquitto.conf file into the new container during startup.
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#9
Dear Armin,
 
Thanks for your support, after manually adding edited mosquitto.conf file copy to /home/admin directory using WinSCP software of NetFILED gateway, it work properly for me. attached screenshot for reference.

Br,
Devendra


Attached Files Thumbnail(s)
       
  Reply
#10
Yes now it is perfect. Thx for your positive reply.
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)