RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1970328 - libsmbclient update brake working Nextcloud installation
Summary: libsmbclient update brake working Nextcloud installation
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: samba
Version: 8.4
Hardware: x86_64
OS: All
unspecified
unspecified
Target Milestone: beta
: ---
Assignee: Andreas Schneider
QA Contact: sssd-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-10 09:17 UTC by Marcin Wilk
Modified: 2021-08-04 09:45 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-08-04 09:39:54 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Marcin Wilk 2021-06-10 09:17:46 UTC
Description of problem:
Hello.
I've found problem i believe with libsmbclient. But i'm not sure if it's possible for me to diagnose it more deeply, as i'm not coder or tester.
I'm using RHEL8 for my home NAS, with Nextcloud installed and PHP from "Remi" repo.
For a few months there was problem with Mounting "external" files source - SMB.
Samba was installed locally and was working fine for year or maybe little more.
I can access files with every device in home network (smartphones, Chromecast, Windows and Linux computers).
But Nextcloud somet ime ago stopped to work with it (even it's same computer, and "localhost" is used for address).
And since i do not used Nextcloud very often to access SMB shared folder, i didn't know "when" it started to not work correctly.
Nextcloud was using "Guest" access that still worked from other devices (or even from bash on same host).
So i tried older Nextcloud versions - didn't help. I tried to change main PHP version (7.4 to 8.0) - also didn't help.
Disabling SELinux didn't help too.
After very long searching i find out - that it may be problem with php-smbclient library - or is it?
I was sure this is the reason, because i checked LOGs and find this:
2021-03-03T21:56:26Z SUBDEBUG Installed: php74-php-smbclient-1.0.6-1.el8.remi.x86_64
I remember, that that was the day that main HDD inside my NAS failed. But i had secondary HDD used for backup files, 
so i just put new disk and installed everything once again. I were thinking that it may be problem, because maybe newer PHP was installed.
Removing php-smbclient library and restarting php-fpm module resolved problem.
Downgrading php-smbclient version to older one - didn't help at all. Last night i was thinking - how is that possible that it was working fine earlier without problems.
So i started to check more updates of smbclient things and i found this:
2021-05-19T16:33:14Z SUBDEBUG Upgrade: libsmbclient-4.13.3-3.el8.x86_64
2021-05-19T16:35:51Z SUBDEBUG Upgraded: libsmbclient-4.12.3-14.el8_3.x86_64
I think it is possible that this was the moment, when things stopped to work correctly.
So what i did was removing newest version by:
rpm -e --nodeps libsmbclient
Then download older version:
dnf download libsmbclient-4.12.3-12.el8.3
and install it:
rpm -Uvh --nodeps libsmbclient-4.12.3-12.el8.3.x86_64.rpm
After that i restarted php-fpm "service php80-php-fpm restart", and everything started to work again correctly!
Sadly, i have no idea how to fix this, or how to diagnose more, but i would be very happy to help.
I prepared VirtualBox Guest for testing and confirming that.

Version-Release number of selected component (if applicable):
libsmbclient-4.13.3-3.el8.x86_64

How reproducible:
Upgrade from libsmbclient-4.12.3-14.el8_3.x86_64 to libsmbclient-4.13.3-3.el8.x86_64 and restart PHP session.

Steps to Reproduce:
1. dnf update -y

Actual results:
Nextcloud can't connect to SMB share on localhost.

Expected results:
Shpuld connect without problems.

Additional info:

Comment 1 Andreas Schneider 2021-06-11 11:49:30 UTC
We would need log level 10 output of libsmbclient. You can set 'log level = 10' in the [global] section of the smb.conf file. However I don't know where php-libsmblcient would log to, maybe the server log running php ...

It might also be reproducible with the tool 'smbget' on the cmdline ...

Comment 2 Marcin Wilk 2021-06-12 21:25:38 UTC
(In reply to Andreas Schneider from comment #1)
> We would need log level 10 output of libsmbclient. You can set 'log level =
> 10' in the [global] section of the smb.conf file. However I don't know where
> php-libsmblcient would log to, maybe the server log running php ...
> 
> It might also be reproducible with the tool 'smbget' on the cmdline ...

I prepared log files here (libsmbclient-4.13.3-3.el8.x86_64):
Samba:
https://www.marcinwilk.eu/smbclient/log.smbd
https://www.marcinwilk.eu/smbclient/log.smbd
php-fpm (i setup log level to debug):
https://www.marcinwilk.eu/smbclient/php-fpm-error.log
nginx error was empty (file size 0)
And nextcloud own log file (but i'm not sure if it will help or not):
https://www.marcinwilk.eu/smbclient/nextcloud.log

Here is the log from working session (with libsmbclient-4.12.3-12.el8.3 installed).

I didn't change php-smbclient library - i believe it use libsmbclient, it works just fine with old libsmbclient version).
Also smbget was working just fine.

Comment 3 Andreas Schneider 2021-07-07 10:15:31 UTC
I'm sorry, but there is no libsmbclient debug logging anywhere in that logs which is needed to understand what is going wrong.

Comment 4 mpanaous 2021-07-07 10:50:52 UTC
Hello Marcin,

my name is Marios from the support team. May I ask please to raise a case as to capture properly the issue and the debug logs

The moment you will share here the case number I will chown the case and I will attach it to the bug as expected. 
It will be easier and much faster to work based on the expected procedures

Best Regards,

Marios Panaousis
Red Hat EMEA

Comment 5 Marcin Wilk 2021-07-17 10:46:17 UTC
Thank You for the reply. I couldn't find a way to debug smbclient, can You tell me how can i do that?

Comment 6 Andreas Schneider 2021-08-04 09:39:54 UTC
The smbget tool is using libsmbclient. If it works it confirms that there is not really an issue with Samba. It is probably an issue of php-libsmbclient with the latest libsmbclient version. However php-libsmbclient is not a RHEL package.


Note You need to log in before you can comment on or make changes to this bug.