mqttHub
mqttHub copied to clipboard
Server does not run as single file: -p:PublishSingleFile=true
Build with dotnet publish -f net5.0 -r linux-x64 -c Release --sc -p:PublishSingleFile=true
leads to the following problem on start up:
[LOGO]
The official MQTT server implementation of MQTTnet
Copyright (c) 2017-2020 The MQTTnet Team
https://github.com/chkr1011/MQTTnet
System.ArgumentException: The path is empty. (Parameter 'path')
at System.IO.Path.GetFullPath(String path)
at System.Diagnostics.FileVersionInfo.GetVersionInfo(String fileName)
at MQTTnet.Server.Program.PrintLogo()
at MQTTnet.Server.Program.Main(String[] args)
Possibly related to API incompatibility
I don't think this will work at all because the application requires certain directories like the Python standard library and custom scripts and the folders.
It does start up without -p:PublishSingleFile=true
but not sure if it really works, did not test it in action.
What do you mean by "requires certain directories"? If it is possible for the user to add scripts, then the application should make sure that the directories are present after start-up (or create them). If so, please document which directories it creates. Also interesting for when running in a Docker container to persist the scripts.
The Python standard library should be installed on the host, I guess. So the application should be able to find it via $PATH/%PATH% or a custom environment variable that points to Python.
This application uses IronPython which comes with its own implementation of the standard library. I have no clue if an installed one on the system can or will be used instead. I will add the directories to the Wiki soon.
If it starts and accepts connections everything is fine.
IronPython is shipped with your application. So all fine after dotnet restore
and dotnet build
. The Debian image used in #5 does not ship with Python pre-installed, yet the MQTTnet.Server starts properly. So all good then.