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.0.31 installation not possible on Ubuntu Server 20.4.4 #42

Closed norticum closed 2 years ago

norticum commented 2 years ago

Hello,

can anyone assist me (a Linux noob) to get a running installation on Ubuntu 20.4.4?

By starting the installation with: sudo ./install-as-service.sh I get: chmod: cannot access './Binner.service': No such file or directory Binner.Web is now running - http://localhost:8090

but the Website is not reachable.

By starting Binner.Web with: sudo ./Binner.Web I get: .Net Core bundle path: /home/norticum/ Config file location: /home/norticum/appsettings.json Unhandled exception. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Binner.Common.BinnerConfigurationException: The database filename is invalid on this environment and should be a unix-compatible path: 'C:\Binner\binner.db' at Binner.Common.StorageProviders.BinnerFileStorageProvider.ValidateBinnerConfiguration(BinnerFileStorageConfiguration config) at Binner.Common.StorageProviders.BinnerFileStorageProvider..ctor(IDictionary2 config) --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Span1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions) at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at System.Activator.CreateInstance(Type type, Object[] args) at Binner.Common.StorageProviders.StorageProviderFactory.Create(String providerName, IDictionary`2 config) at Binner.Web.Configuration.StartupConfiguration.ConfigureIoC(IServiceContainer container, IServiceCollection services) at Binner.Web.Program.ConfigureServices(IServiceContainer container) at Binner.Web.Program.Main(String[] args) Aborted

I found that the appsettings.json file was missing and I created one (copy of example from https://github-wiki-see.page/m/replaysMike/Binner/wiki/Configuration) and paced it to the home location.

I also installed Node.js v10.19.0.

I am sure it only can be a small issue but I cant find it. Can anyone help?

-norticum

replaysMike commented 2 years ago

Hi @norticum - I'll run a test install right now and see if I can duplicate. I'll also audit the wiki instructions as some changes were made recently such as the introduction of SSL (https://localhost:8090/) but hasn't made it into the installer yet, would only affect you if you built from source.

The configuration appsettings used should have been the Unix version appsettings.Unix.Production.json which uses the file path ./binner.db for the db location.

replaysMike commented 2 years ago

almost have this resolved as long as the build server doesn't reject anything :)

norticum commented 2 years ago

Hello Mike,

thank you for your help! Is it a bug or what is it?

-norticum

replaysMike commented 2 years ago

I found 2 issues - one of them the UI build was failing with a subtle error which caused the packaged build to incorrectly transform the config. The second issue was the SSL certificate on the web server wasn't being referenced properly so it failed in some installations. I've fixed both issues and just testing the new build on Unix environments before I publish it so hopefully I can release it within the hour

replaysMike commented 2 years ago

@norticum this should now be working correctly on unix environments as of 2.0.59.

Let me know if this release fixes your installation issues and I can close out this ticket

// extract the archive
tar zxfp ./Binner_ubuntu.14.04-x64-VERSION.tar.gz

// to install as a service
sudo chmod +x ./install-as-service.sh
sudo ./install-as-service.sh

// or you can just run directly
sudo chmod +x ./Binner.Web
./Binner.Web
norticum commented 2 years ago

Hi everyone,

I will start from scratch and begin with a fresh installation. I will report any issues here.

Thank you for your help.

-norticum

norticum commented 2 years ago

Hello Mike,

the installation went good without any problem. Thank you very much!

You can close the issue.

-norticum

replaysMike commented 2 years ago

excellent, if you run into any future issues don't hesitate to reach out