cumulusmx / CumulusMX

The CumulusMX weather program
GNU General Public License v3.0
81 stars 23 forks source link

Issues running in Linux docker container after build 3133 #176

Closed lkinley closed 1 year ago

lkinley commented 1 year ago

I'm using CumulusMX in a docker container from an image I build myself.

There was some update in version 3.12.0 b3141 that keeps it from starting. Build 3133 or before works fine. I'm getting a device resource or resource busy error:

System.IO.IOException: Device or resource busy
  at System.IO.FileSystem.DeleteFile (System.String fullPath) [0x0006d] in <d13c8b563008422a8c5aaec0a74089cc>:0 
  at System.IO.File.Delete (System.String path) [0x00014] in <d13c8b563008422a8c5aaec0a74089cc>:0 
  at CumulusMX.Cumulus.ReadIniFile () [0x0836e] in <0731ed9dc26e46bdb951344b2c20e54f>:0 
  at CumulusMX.Cumulus..ctor (System.Int32 HTTPport, System.Boolean DebugEnabled, System.String startParms) [0x0141d] in <0731ed9dc26e46bdb951344b2c20e54f>:0 
  at CumulusMX.Program.RunAsAConsole (System.Int32 port, System.Boolean debug) [0x00048] in <0731ed9dc26e46bdb951344b2c20e54f>:0 
  at CumulusMX.Program.Main (System.String[] args) [0x00558] in <0731ed9dc26e46bdb951344b2c20e54f>:0 
**** An error has occurred - please zip up the MXdiags folder and post it in the forum ****

Any idea what change could be causing this and how to correct it?

I run the container with:

docker run -d \
        -v /mnt/user/appdata/cumulusmx/Cumulus.ini:/CumulusMX/Cumulus.ini \
        -v /mnt/user/appdata/cumulusmx/data:/CumulusMX/data \
        -v /mnt/user/appdata/cumulusmx/backups:/CumulusMX/backup \
        -v /mnt/user/appdata/cumulusmx/MXdiags:/CumulusMX/MXdiags \
        -v /dev/bus/usb:/dev/bus/usb \
        -p 8998:8998 \
        --privileged \
        --name cumulusmx \
        --hostname cumulusmx \
        cumulusmx:$tag
optoisolated commented 1 year ago

I'm running the latest build 3.25.0 in a docker container, and it seems to work fine.

I've had this issue happen to me before with the INI file mapping as a directory instead of a file. In my docker config I have the Cumulis.ini in a /config/ directory in that path. I believe the INI file was moved from the root of the cumulus folder about that around about that build number which is probably why you're having that issue. Try moving your .ini file into a config directory and mapping that directory through and restarting your container.

-v /mnt/user/appdata/cumulusmx/config:/CumulusMX/config

mcrossley commented 1 year ago

This is an issue for the docker image, not Cumulus MX.

lkinley commented 1 year ago

It was something in my config which goes back to 2012 and the original Cumulus. Something changed in 3.12.0 that broke on that old config file.

I ran the wizard to create a new config and all is good again.