Can't see dashboard - Exception while running command(['/usr/bin/hostnamectl', '--static']): [Errno 24] Too many open files

[Please complete the below template with details of the problem reported on your Web-UI. Be as detailed as possible. Community members, including developers, shall try and help. Thanks for your time in reporting this issue! We recommend purchasing commercial support for expedited support directly from the developers.]

Brief description of the problem

This error showed up when I accessed the dashboard.

Detailed step by step instructions to reproduce the problem

This error showed up when I accessed the dashboard.

Web-UI screenshot

Error Traceback provided on the Web-UI

Traceback (most recent call last): File "/opt/rockstor/src/rockstor/rest_framework_custom/generic_view.py", line 41, in _handle_exception yield File "/opt/rockstor/src/rockstor/storageadmin/views/appliances.py", line 41, in get_queryset self._update_hostname() File "/opt/rockstor/eggs/Django-1.8.16-py2.7.egg/django/utils/decorators.py", line 145, in inner return func(*args, **kwargs) File "/opt/rockstor/src/rockstor/storageadmin/views/appliances.py", line 48, in _update_hostname cur_hostname = gethostname() File "/opt/rockstor/src/rockstor/system/osi.py", line 760, in gethostname o, e, rc = run_command([HOSTNAMECTL, '--static']) File "/opt/rockstor/src/rockstor/system/osi.py", line 107, in run_command raise Exception(msg) Exception: Exception while running command(['/usr/bin/hostnamectl', '--static']): [Errno 24] Too many open files

@Sublevel4 Welcome to the Rockstor community.

Yes this is a long standing problem and we are as yet not at not certain of it’s origin, but it’s very likely associated with our AFP subsystem. I have my suspicions of it’s cause but haven’t had to time to dedicate to it. And given Apple are moving to using SMB by default now the motivation to support AFP going forward has been questioned.

Please look to the following issues and their linked forum threads for where we are at with this issue:

https://github.com/rockstor/rockstor-core/issues/2020

which in turn is a duplicate of our main issue for the multiple ways “To many open files” tends to break a system:

where the discussion / investigation is more developed.

I’ve added your report here to the latter of these.

Forum member @erisler has proposed a fix for this but it has yet to be properly code reviewed and there is some doubt by @Flyer as to it’s fix / work around status but you could give it a try yourself and report back. The change proposed is a single line and relatively simple. @erisler kindly prepared a pull request in the following:

If I could have further informed technical input on this pull request I’d feel happier about merging it so if anyone is up on this area please feel free to take a look and review the indicated code. I’m currently siding with @Flyer on this one though.

Hope that helps, if only to re-awaken attention on the proposed pull request / fix proposal by @erisler. And thanks for reporting your findings.

Yep, this is happening to me, too.

        Traceback (most recent call last):

File “/opt/rockstor/src/rockstor/rest_framework_custom/generic_view.py”, line 41, in _handle_exception
yield
File “/opt/rockstor/src/rockstor/storageadmin/views/appliances.py”, line 41, in get_queryset
self._update_hostname()
File “/opt/rockstor/eggs/Django-1.8.16-py2.7.egg/django/utils/decorators.py”, line 145, in inner
return func(*args, **kwargs)
File “/opt/rockstor/src/rockstor/storageadmin/views/appliances.py”, line 48, in _update_hostname
cur_hostname = gethostname()
File “/opt/rockstor/src/rockstor/system/osi.py”, line 877, in gethostname
o, e, rc = run_command([HOSTNAMECTL, “–static”])
File “/opt/rockstor/src/rockstor/system/osi.py”, line 166, in run_command
raise Exception(“Exception while running command({}): {}”.format(cmd, e))
Exception: Exception while running command([’/usr/bin/hostnamectl’, ‘–static’]): [Errno 24] Too many open files

@MRC-MBU what version of Rockstor are you experiencing this with. We have removed one of the suspects for the cause of this, AFP, so see if you still experience this with our newer Rockstor 4.0.8-0 “Built on openSUSE” variant. A DIY Installer can be made via the following repo:

Hope that helps. In the mean time a reboot should sort this for the time being.