Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu Server 22.04.1 LTS VM - WebOne v0.12.3 fails to start with Exit Code 131 #76

Closed
dg410a opened this issue Dec 3, 2022 · 11 comments
Labels
3rd party soft Third party product problems, related to WebOne too

Comments

@dg410a
Copy link

dg410a commented Dec 3, 2022

I have WebOne installed on an Ubuntu Server 22.04.1 LTS virtual machine. Didn't install anything else other than the program alongside the dependencies used to run it. WebOne version is v0.12.3.

It will NOT start at all, even after configuring my own settings for "DefaultHostName" and "Port".

Here is the output from the "sudo service webone status" command:

× webone.service - WebOne HTTP Proxy Server
     Loaded: loaded (/etc/systemd/system/webone.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Sat 2022-12-03 23:11:12 UTC; 1s ago
       Docs: https://github.com/atauenis/webone/wiki/
    Process: 5270 ExecStart=/usr/local/bin/webone --daemon (code=exited, status=131)
   Main PID: 5270 (code=exited, status=131)
        CPU: 13ms

Dec 03 23:11:12 dgretroproxy systemd[1]: webone.service: Main process exited, code=exited, status=131/n/a
Dec 03 23:11:12 dgretroproxy systemd[1]: webone.service: Failed with result 'exit-code'.
Dec 03 23:11:12 dgretroproxy systemd[1]: webone.service: Scheduled restart job, restart counter is at 5.
Dec 03 23:11:12 dgretroproxy systemd[1]: Stopped WebOne HTTP Proxy Server.
Dec 03 23:11:12 dgretroproxy systemd[1]: webone.service: Start request repeated too quickly.
Dec 03 23:11:12 dgretroproxy systemd[1]: webone.service: Failed with result 'exit-code'.
Dec 03 23:11:12 dgretroproxy systemd[1]: Failed to start WebOne HTTP Proxy Server.

Before this, I also tried it on a clean CentOS 7 install with the same results. This leads me to believe that this particular package may be broken or that there is something else missing beyond what I've tried.

@dg410a
Copy link
Author

dg410a commented Dec 4, 2022

So, at the moment, I got a Windows 10 VM running and also installed WebOne there. That worked just fine. Was able to configure my proxy settings on my retro machines through there.

But for whatever reason, the Linux distros that I've tried so far (CentOS 7, Ubuntu Server 22.04.1 LTS, and Xubuntu 22.04 LTS) has not worked for me at all. Once again, they were clean OS installs with WebOne downloaded and configured afterwards. Even followed the Linux install instructions. No dice.

@way5
Copy link
Contributor

way5 commented Dec 4, 2022

@dg410a please try this to change webone.service like the following #75 (comment)

and then systemctl enable webone

@atauenis
Copy link
Owner

atauenis commented Dec 4, 2022

What if run WebOne as regular app, not a service? Does it starts or returning an error?

@dg410a
Copy link
Author

dg410a commented Dec 4, 2022

@way5 Configuring webone.service as suggested did not work.

@atauenis Actually did run webone as normally and got this:

You must install .NET to run this application.

App: /usr/share/webone/webone
Architecture: x64
App host version: 6.0.11
.NET location: Not found

Learn about runtime installation:
https://aka.ms/dotnet/app-launch-failed

Download the .NET runtime:
https://aka.ms/dotnet-core-applaunch?missing_runtime=true&arch=x64&rid=ubuntu.22.04-x64&apphost_version=6.0.11

I even tried wget to download the .NET runtime as indicated above to see if I could fix it, but got a 301 at first before it timed out.

Though strangely enough, the apt package manager DID recognize and install NET 6.0 alongside WebOne as seen below:

The following additional packages will be installed:
  ... 
dotnet-host
  dotnet-hostfxr-6.0 dotnet-runtime-6.0
Selecting previously unselected package dotnet-host.
Preparing to unpack .../054-dotnet-host_6.0.111-0ubuntu1~22.04.1_amd64.deb ...
Unpacking dotnet-host (6.0.111-0ubuntu1~22.04.1) ...
Selecting previously unselected package dotnet-hostfxr-6.0.
Preparing to unpack .../055-dotnet-hostfxr-6.0_6.0.111-0ubuntu1~22.04.1_amd64.deb ...
Unpacking dotnet-hostfxr-6.0 (6.0.111-0ubuntu1~22.04.1) ...
...
Selecting previously unselected package dotnet-runtime-6.0.
Preparing to unpack .../059-dotnet-runtime-6.0_6.0.111-0ubuntu1~22.04.1_amd64.deb ...
Unpacking dotnet-runtime-6.0 (6.0.111-0ubuntu1~22.04.1) ...

So, my guess is that somehow, the path configurations were not set up properly in order for this to work right out of the box.

@dg410a
Copy link
Author

dg410a commented Dec 4, 2022

Just got it to work.

So... the Linux instructions specifically said to use 'sudo apt install ./webone.0.12.3.linux-amd64.deb'. It did install the program and acquired the dependencies needed to run the app, but then I got this:

N: Download is performed unsandboxed as root as file '/home/dg410/webone.0.12.3.linux-amd64.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)

After that, it would just refuse to run, either via the service or just normally.

However, when removing webone on its own and leaving the dependencies installed, and then reinstalling the program, but using 'sudo dpkg -i webone.0.12.3.linux-amd64.deb' in favor of 'sudo apt install', running WebOne as normally does work that way. Still can't get the service to work properly though.

EDIT: Nevermind. Recent attempts to reproduce this to find the cause just ended up with the same previous errors again with WebOne refusing to work at all.

EDIT 2: So... I followed the Linux instructions again to install WebOne and did a system restart. Afterwards, the program now works as normally. Service is still not functional though.

EDIT 3: After further testing, WebOne even fails to start on boot when using crontab or rc.local.

@atauenis
Copy link
Owner

atauenis commented Dec 4, 2022

Tried on my VM with Ubuntu 22.04 .0 , everything is working correctly.

2022-12-04_19-23-05

The VM haven't updated from approximately June. Now I've attempted to install all updates (simply sudo apt upgrade -y), and got WebOne broken here with same problem. Even I can't get list of runtimes.

$ dotnet --list-runtimes
A fatal error occurred. The folder [/usr/share/dotnet/host/fxr] does not exist

Reinstall ($ sudo apt purge dotnet-runtime-deps-6.0 dotnet-hostfxr-6.0 dotnet-runtime-6.0 dotnet-host && $ sudo apt install dotnet-runtime-6.0) doesn't helps.

Seems that it is a bug of updated Ubuntu .NET packages. Maintainers has broken something.

Interesting that .NET 7.0 installs correctly. But it's not LTS and have no support for Windows pre-10, so there are currently no plans on updating to .NET 7 (probably WebOne will go to .NET 8 when .NET 6 became out of support).

@atauenis
Copy link
Owner

atauenis commented Dec 4, 2022

Continuing investigation.
Ubuntu's Snap Store containing a half-valid .NET 6 Runtime, but it still not usable with regular binaries.

ibm5170@ibm5170-VirtualBox:~$ sudo snap install dotnet-runtime-60
dotnet-runtime-60 6.0.11 от Microsoft .NET Core (dotnetcore✓) установлен
ibm5170@ibm5170-VirtualBox:~$ cd /snap/dotnet-runtime-60/current
ibm5170@ibm5170-VirtualBox:/snap/dotnet-runtime-60/current$ ./dotnet --list-runtimes
Microsoft.NETCore.App 6.0.11 [/snap/dotnet-runtime-60/26/shared/Microsoft.NETCore.App]

May be creation of some links in system will solve?

@atauenis
Copy link
Owner

atauenis commented Dec 4, 2022

Found a solution:

$ sudo apt purge dotnet-runtime-deps-6.0 dotnet-hostfxr-6.0 dotnet-runtime-6.0 dotnet-host
$ sudo apt install dotnet-apphost-pack-6.0=6.0.8-1 dotnet-host=6.0.8-1 dotnet-hostfxr-6.0=6.0.8-1 dotnet-runtime-6.0=6.0.8-1
$ sudo apt-mark hold aspnetcore-runtime-6.0=6.0.8-1 dotnet-apphost-pack-6.0=6.0.8-1 dotnet-host=6.0.8-1 dotnet-hostfxr-6.0=6.0.8-1 dotnet-runtime-6.0=6.0.8-1 dotnet-sdk-6.0=6.0.400-1 dotnet-targeting-pack-6.0=6.0.8-1
$ sudo apt install ./webone.0.12.3.linux-amd64.deb

The 6.0.8 version of .NET Runtime is working great on Ubuntu 22.04.1, unlike 6.0.11.
Inspired by dotnet/sdk#27082 .

@dg410a
Copy link
Author

dg410a commented Dec 4, 2022

Found a solution:

$ sudo apt purge dotnet-runtime-deps-6.0 dotnet-hostfxr-6.0 dotnet-runtime-6.0 dotnet-host
$ sudo apt install dotnet-apphost-pack-6.0=6.0.8-1 dotnet-host=6.0.8-1 dotnet-hostfxr-6.0=6.0.8-1 dotnet-runtime-6.0=6.0.8-1
$ sudo apt-mark hold aspnetcore-runtime-6.0=6.0.8-1 dotnet-apphost-pack-6.0=6.0.8-1 dotnet-host=6.0.8-1 dotnet-hostfxr-6.0=6.0.8-1 dotnet-runtime-6.0=6.0.8-1 dotnet-sdk-6.0=6.0.400-1 dotnet-targeting-pack-6.0=6.0.8-1
$ sudo apt install ./webone.0.12.3.linux-amd64.deb

The 6.0.8 version of .NET Runtime is working great on Ubuntu 22.04.1, unlike 6.0.11. Inspired by dotnet/sdk#27082 .

Can confirm that this solution works 100%.

Although, I had to refer to here in order to get 6.0.8 to even install. The default apt repository for 22.04.1 would not download the earlier version unless if I configure it to use the PMC feed for NET 6.0. Only then was I able to install 6.0.8 without any issues.

@atauenis atauenis added the 3rd party soft Third party product problems, related to WebOne too label Dec 5, 2022
@atauenis
Copy link
Owner

atauenis commented Dec 19, 2022

Good news. Microsoft has released the 6.0.12-1 Runtime where the bug is fixed. But Ubuntu repositories still have 6.0.111 version (6.0.11 rebuilt by Canonical), so the package version holding still need.

sudo apt purge dotnet-*-6.0 dotnet-host packages-microsoft-prod
sudo apt-mark unhold dotnet*
wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
sudo apt update
sudo apt install dotnet-runtime-deps-6.0=6.0.12-1 dotnet-host=6.0.12-1 dotnet-hostfxr-6.0=6.0.12-1 dotnet-runtime-6.0=6.0.12-1
sudo apt-mark hold dotnet-runtime-deps-6.0=6.0.12-1 dotnet-host=6.0.12-1 dotnet-hostfxr-6.0=6.0.12-1 dotnet-runtime-6.0=6.0.12-1

wget https://github.com/atauenis/webone/releases/download/v0.13.0/webone.0.13.0.linux-amd64.deb
sudo apt install ./webone.0.13.0.linux-amd64.deb

@atauenis
Copy link
Owner

Good news! Canonical pushed 6.0.113-0ubuntu1~22.04.1 version of .NET 6.0 Runtime to repositories, and it is working. The bug has gone.

For test, I've reinstalled Ubuntu 22.04.1 from scratch, then downloaded webone.0.14.0.linux-amd64.deb, double-clicked on it, and after 1 min of waiting, WebOne is ready for incoming connections.

On existing systems Microsoft considers remove packages.microsoft.com repository from system, purge dotnet-*, delete both /usr/lib64/dotnet and /usr/share/dotnet directories (it's where the problem! multiple possible paths for a same things), and install the dotnet-runtime-6.0 (6.0.113).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3rd party soft Third party product problems, related to WebOne too
Projects
None yet
Development

No branches or pull requests

3 participants