replaysMike / Binner

Open source parts inventory system for makers, electronics hobby, and professional engineers
https://binner.io
GNU General Public License v3.0
268 stars 41 forks source link

Binner 2.2.0 doesn´t run on Ubuntu 20.04.4 LTS #94

Closed norticum closed 1 year ago

norticum commented 1 year ago

Hello Mike,

Binner doesn´t run on Ubuntu. The Service is not started correctly.

image

I can´t find the error.

Could you assist? I already have two different Versions of binner active and running to compare each other but I cant get Version 2.2.0 to work.

BR

norticum

replaysMike commented 1 year ago

oh dear, looks like the config wasn't successfully read (it's null). ok let me spin up a VM and see what's going on.

replaysMike commented 1 year ago

if you have it handy, can you share the contents of your appsettings.json? If it's sensitive at all, you can email to it me at mikeb@refactor.ca

replaysMike commented 1 year ago

v2.2.1 is building right now and I included a patch to add better error validation of the appsettings.json . If you have any other info for me I could assist further

norticum commented 1 year ago

Hello Mike,

my appsettings.json is default. I did´nt any changes to the file.

appsettings.zip

replaysMike commented 1 year ago

hmm ok I found something. When running on Ubuntu it works fine if I run it from the current folder (not as a service). But when run as a service, it's throwing the error you described which can't find the config. I'm not sure yet what causes this, or why it's any different now.

image

replaysMike commented 1 year ago

Solved! I'll push another patch into v2.2.1 (takes 30 min to build & deploy) but if you want to solve it instantly:

first remove the service:

sudo systemctl stop Binner.service
sudo systemctl disable Binner.service
sudo rm /etc/systemd/system/Binner.service
sudo systemctl daemon-reload
sudo systemctl reset-failed

then update Binner.service.systemctl.template:

[Unit]
Description=Binner

[Service]
WorkingDirectory=@INSTALLPATH@
ExecStart=@INSTALLPATH@/Binner.Web

[Install]
WantedBy=multi-user.target

Save that and rerun sudo ./install-as-service.sh

norticum commented 1 year ago

Hello again,

thank you very much, it works now!

BR

norticum

replaysMike commented 1 year ago

Now included in release v2.2.1