45Drives / cockpit-file-sharing

A Cockpit plugin to easily manage samba and NFS file sharing.
GNU General Public License v3.0
596 stars 32 forks source link

ProcessError (exited non-zero) localhost: net: (255) #113

Open AlBundy33 opened 4 weeks ago

AlBundy33 commented 4 weeks ago

Bug Info

Describe the bug Installed latest version in Rocky 9.4 with cockpit 311.2 and now I get this error when opening the samba-page

ProcessError (exited non-zero)

localhost: net:  (255)

Screenshot_20241029-224134_Chrome

this is a new lxc container - so I don't have any shares configured

joshuaboud commented 4 weeks ago

Does the user you logged into cockpit as have administrative access (e.g. a sudoer)? Check the top right part of the cockpit window to see if it says "Administrative access" or " :lock: Limited access"

AlBundy33 commented 4 weeks ago

yes, of course - downgrading to the previous version works as expected (no error message and global settings are visible)

in terminal I can run net conf commands without error.

matzzze commented 3 weeks ago

@AlBundy33 same issue here with debian 12 on bare metal, which version did you use to get rid of the error?

AlBundy33 commented 3 weeks ago

on rocky the latest working version is 3.3.7-1

timwhite1 commented 3 weeks ago

on rocky the latest working version is 3.3.7-1

This worked for me on Alma Linux 9.4 as well.

Needed to block updates to the package to prevent pulling back in 4.2.5 (until new features are fully functional in a few weeks)

Install older version 3.3.7 Cockpit File Sharing plugin

wget https://github.com/45Drives/cockpit-file-sharing/releases/download/v3.3.7/cockpit-file-sharing-3.3.7-1.el8.noarch.rpm sudo dnf install -y cockpit-file-sharing-3.3.7-1.el8.noarch.rpm

Lock updates for the plugin to avoid reinstalling newer buggy version

cp /etc/dnf/dnf.conf /etc/dnf/dnf.conf.bak #backup the original dnf config file if ! grep -q '^exclude=cockpit-file-sharing' /etc/dnf/dnf.conf; then echo 'exclude=cockpit-file-sharing' | sudo tee -a /etc/dnf/dnf.conf > /dev/null fi

Note this simply adds an exclude line to the end of dnf.conf

# exclude=cockpit-file-sharing
dimarcode commented 3 weeks ago

I was having the same issue. The exact same error when opening the samba page, and no global settings available for configuration in the gui. Rolling back to 3.3.7 worked for me as well. Logged in as root on brand new LXC container in proxmox.

kekylin commented 3 weeks ago

The same problem also occurred on Ubuntu 24.04.1 LTS. This is my solution. I hope it will be helpful to those in need.

Steps to solve the error problem of cockpit-file-sharing plugin version 4.2.5. Affected plug-in version: Cockpit File Sharing 4.2.5

Error message: ProcessError (exited non-zero) localhost: net: (255)

Solution steps:

  1. Query the available plug-in version sudo apt list -a cockpit-file-sharing

The terminal returns the following information: ubuntu:~$ sudo apt list -a cockpit-file-sharing Listing... Done cockpit-file-sharing/focal,now 4.2.5-2focal all [installed] cockpit-file-sharing/focal 4.2.5-1focal all cockpit-file-sharing/focal 3.3.7-1focal all cockpit-file-sharing/focal 3.3.6-1focal all cockpit-file-sharing/focal 3.3.5-1focal all

According to the output, there are multiple versions of cockpit-file-sharing available in the system. The currently installed version is 4.2.5-2focal

  1. Uninstall the current version sudo apt remove cockpit-file-sharing

  2. Install the specified version sudo apt install cockpit-file-sharing=3.3.7-1focal

  3. Verify the installation sudo apt list --installed cockpit-file-sharing

The terminal returns the following information: ubuntu:~$ sudo apt list --installed cockpit-file-sharing Listing... Done cockpit-file-sharing/focal,now 3.3.7-1focal all [installed,upgradable to: 4.2.5-2focal] N: There are 30 additional versions. Please use the '-a' switch to see them.

The 3.3.7-1focal version has been successfully installed, and the system also prompts that a new version is available (4.2.5-2focal). Since there is a problem with the current version 4.2.5, you can lock the current version to avoid automatic upgrade to 4.2.5.

  1. Lock the current version: sudo apt-mark hold cockpit-file-sharing

  2. Confirm the lock. You can run the following command to confirm that it has been locked: sudo apt-mark showhold

  3. If the problem is solved in the future and you want to upgrade again, just run the following command to unlock: sudo apt-mark unhold cockpit-file-sharing

jenishngl commented 3 weeks ago

The same problem also occurred on Ubuntu 24.04.1 LTS. This is my solution. I hope it will be helpful to those in need.

Steps to solve the error problem of cockpit-file-sharing plugin version 4.2.5. Affected plug-in version: Cockpit File Sharing 4.2.5

Error message: ProcessError (exited non-zero) localhost: net: (255)

Solution steps:

  1. Query the available plug-in version sudo apt list -a cockpit-file-sharing

The terminal returns the following information: ubuntu:~$ sudo apt list -a cockpit-file-sharing Listing... Done cockpit-file-sharing/focal,now 4.2.5-2focal all [installed] cockpit-file-sharing/focal 4.2.5-1focal all cockpit-file-sharing/focal 3.3.7-1focal all cockpit-file-sharing/focal 3.3.6-1focal all cockpit-file-sharing/focal 3.3.5-1focal all

According to the output, there are multiple versions of cockpit-file-sharing available in the system. The currently installed version is 4.2.5-2focal

  1. Uninstall the current version sudo apt remove cockpit-file-sharing
  2. Install the specified version sudo apt install cockpit-file-sharing=3.3.7-1focal
  3. Verify the installation sudo apt list --installed cockpit-file-sharing

The terminal returns the following information: ubuntu:~$ sudo apt list --installed cockpit-file-sharing Listing... Done cockpit-file-sharing/focal,now 3.3.7-1focal all [installed,upgradable to: 4.2.5-2focal] N: There are 30 additional versions. Please use the '-a' switch to see them.

The 3.3.7-1focal version has been successfully installed, and the system also prompts that a new version is available (4.2.5-2focal). Since there is a problem with the current version 4.2.5, you can lock the current version to avoid automatic upgrade to 4.2.5.

  1. Lock the current version: sudo apt-mark hold cockpit-file-sharing
  2. Confirm the lock. You can run the following command to confirm that it has been locked: sudo apt-mark showhold
  3. If the problem is solved in the future and you want to upgrade again, just run the following command to unlock: sudo apt-mark unhold cockpit-file-sharing

Isnt this just installing an older version to fix the issue temporarily?

kekylin commented 3 weeks ago

The same problem also occurred on Ubuntu 24.04.1 LTS. This is my solution. I hope it will be helpful to those in need.

Steps to solve the error problem of cockpit-file-sharing plugin version 4.2.5. Affected plug-in version: Cockpit File Sharing 4.2.5

Error message: ProcessError (exited non-zero) localhost: net: (255)

Solution steps:

  1. Query the available plug-in version sudo apt list -a cockpit-file-sharing

The terminal returns the following information: ubuntu:~$ sudo apt list -a cockpit-file-sharing Listing... Done cockpit-file-sharing/focal,now 4.2.5-2focal all [installed] cockpit-file-sharing/focal 4.2.5-1focal all cockpit-file-sharing/focal 3.3.7-1focal all cockpit-file-sharing/focal 3.3.6-1focal all cockpit-file-sharing/focal 3.3.5-1focal all

According to the output, there are multiple versions of cockpit-file-sharing available in the system. The currently installed version is 4.2.5-2focal

  1. Uninstall the current version sudo apt remove cockpit-file-sharing
  2. Install the specified version sudo apt install cockpit-file-sharing=3.3.7-1focal
  3. Verify the installation sudo apt list --installed cockpit-file-sharing

The terminal returns the following information: ubuntu:~$ sudo apt list --installed cockpit-file-sharing Listing... Done cockpit-file-sharing/focal,now 3.3.7-1focal all [installed,upgradable to: 4.2.5-2focal] N: There are 30 additional versions. Please use the '-a' switch to see them.

The 3.3.7-1focal version has been successfully installed, and the system also prompts that a new version is available (4.2.5-2focal). Since there is a problem with the current version 4.2.5, you can lock the current version to avoid automatic upgrade to 4.2.5.

  1. Lock the current version: sudo apt-mark hold cockpit-file-sharing
  2. Confirm the lock. You can run the following command to confirm that it has been locked: sudo apt-mark showhold
  3. If the problem is solved in the future and you want to upgrade again, just run the following command to unlock: sudo apt-mark unhold cockpit-file-sharing

Isnt this just installing an older version to fix the issue temporarily?

Yes, fix the problem by installing an older version. If you need to use the new feature iSCSI, this is not a good solution.

muellermartin commented 1 week ago

I'm also on Debian 12 (bookworm) and get the same error. If I open the browser console (Firefox), I see this additional error – maybe this is related?

ExitedProcess(Server(localhost), Command(["net","conf","showshare","global"], {"superuser":"try","binary":true,"err":"message"})) (exited 255):
stdout:
error getting share parameters: SBC_ERR_NO_SUCH_SERVICE

stderr:
ProcessError (exited non-zero): localhost: net:  (255)
AlBundy33 commented 1 week ago

good point - this may be the issue 🤔

root@debian-lxc:~# net conf showshare
Usage:
net conf showshare <sharename>
root@debian-lxc:~# net conf showshare global
error getting share parameters: SBC_ERR_NO_SUCH_SERVICE
root@debian-lxc:~# net conf list
root@debian-lxc:~# net conf showshare global
error getting share parameters: SBC_ERR_NO_SUCH_SERVICE
root@debian-lxc:~#
muellermartin commented 1 week ago

My guess was right: The other error message from the browser console was related! Running net conf showshare global results in the same error (error getting share parameters: SBC_ERR_NO_SUCH_SERVICE) and net conf listshares showed no global configuration (only one share that I configured via cockpit-file-sharing.

I could solve this error by first commenting out the include = registry line in /etc/samba/smb.conf and then running sudo net conf import /etc/samba/smb.conf global. This imports the global configuration/share. After that the include = registry can be activated again. (Note: not disabling this line results in an infinite import loop)

Strangely I also had to install samba as it was no dependency of cockpit-file-sharing.

After that it seems to work :)

sigmaprojects commented 1 week ago

@muellermartin confirming those steps worked for me. The error is gone now.

dimarcode commented 1 week ago

@muellermartin confirming those steps worked for me. The error is gone now.

This works in the newest version of cockpit and Ubuntu 24.04?

sigmaprojects commented 1 week ago

@muellermartin confirming those steps worked for me. The error is gone now.

This works in the newest version of cockpit and Ubuntu 24.04?

It was in Debian 12 for me

matjanss commented 4 days ago

@muellermartin Worked for me aswell. Debian 12.

AlBundy33 commented 4 days ago

@muellermartin confirming those steps worked for me. The error is gone now.

This works in the newest version of cockpit and Ubuntu 24.04?

Why not simply try it? 🤔 If it's not working you can install an older version.