superset icon indicating copy to clipboard operation
superset copied to clipboard

Superset failing to start

Open alonbecker opened this issue 3 years ago • 5 comments

On Superset 1.5.0 with unpinned dependencies on authlib, mysqlclient and pydruid I am getting the following error and superset isf failing to start:

{"@tag":"run-sh.stderr","@timestamp":"2022-06-02T04:25:16.076134894-07:00","message":" CachelibFileSystemCache.init(","source_host":"data--superset-6c8b44bb74-4r8lq","tsar_wrapped":true} {"@tag":"run-sh.stderr","@timestamp":"2022-06-02T04:25:16.076148208-07:00","message":"TypeError: init() got an unexpected keyword argument 'hash_method'","source_host":"data--superset-6c8b44bb74-4r8lq","tsar_wrapped":true} {"@tag":"run-sh.stderr","@timestamp":"2022-06-02T04:25:16.076165579-07:00","message":"[2022-06-02 04:25:16 -0700] [31] [INFO] Worker exiting (pid: 31)","source_host":"data--superset-6c8b44bb74-4r8lq","tsar_wrapped":true} {"@tag":"run-sh.stderr","@timestamp":"2022-06-02T04:25:16.363703841-07:00","message":"Traceback (most recent call last):","source_host":"data--superset-6c8b44bb74-4r8lq","tsar_wrapped":true} {"@tag":"run-sh.stderr","@timestamp":"2022-06-02T04:25:16.363816146-07:00","message":" File "/usr/local/lib/python3.8/dist-packages/gunicorn/arbiter.py", line 209, in run","source_host":"data--superset-6c8b44bb74-4r8lq","tsar_wrapped":true} {"@tag":"run-sh.stderr","@timestamp":"2022-06-02T04:25:16.363838612-07:00","message":" self.sleep()","source_host":"data--superset-6c8b44bb74-4r8lq","tsar_wrapped":true} {"@tag":"run-sh.stderr","@timestamp":"2022-06-02T04:25:16.363853892-07:00","message":" File "/usr/local/lib/python3.8/dist-packages/gunicorn/arbiter.py", line 357, in sleep","source_host":"data--superset-6c8b44bb74-4r8lq","tsar_wrapped":true} {"@tag":"run-sh.stderr","@timestamp":"2022-06-02T04:25:16.363868322-07:00","message":" ready = select.select([self.PIPE[0]], [], [], 1.0)","source_host":"data--superset-6c8b44bb74-4r8lq","tsar_wrapped":true} {"@tag":"run-sh.stderr","@timestamp":"2022-06-02T04:25:16.363883594-07:00","message":" File "/usr/local/lib/python3.8/dist-packages/gunicorn/arbiter.py", line 242, in handle_chld","source_host":"data--superset-6c8b44bb74-4r8lq","tsar_wrapped":true} {"@tag":"run-sh.stderr","@timestamp":"2022-06-02T04:25:16.363898036-07:00","message":" self.reap_workers()","source_host":"data--superset-6c8b44bb74-4r8lq","tsar_wrapped":true} {"@tag":"run-sh.stderr","@timestamp":"2022-06-02T04:25:16.363911795-07:00","message":" File "/usr/local/lib/python3.8/dist-packages/gunicorn/arbiter.py", line 525, in reap_workers","source_host":"data--superset-6c8b44bb74-4r8lq","tsar_wrapped":true} {"@tag":"run-sh.stderr","@timestamp":"2022-06-02T04:25:16.363934181-07:00","message":" raise HaltServer(reason, self.WORKER_BOOT_ERROR)","source_host":"data--superset-6c8b44bb74-4r8lq","tsar_wrapped":true} {"@tag":"run-sh.stderr","@timestamp":"2022-06-02T04:25:16.363948677-07:00","message":"gunicorn.errors.HaltServer: \u003cHaltServer 'Worker failed to boot.' 3\u003e","source_host":"data--superset-6c8b44bb74-4r8lq","tsar_wrapped":true}

I tried pinning the versions of these dependencies, but not sure that this is the issue. I am running superset on Kubernetes and a new build probably took place. The requirement.txt file that we are using for installing deps is as follows:

apache-superset==1.5.0 PyAthenaJDBC>1.0.9 PyAthena==2.7.0 pydruid==0.6.2 markupsafe==2.0.1 Authlib==0.15.5 mysqlclient==2.0.3

Any ideas what could be wrong....

alonbecker avatar Jun 02 '22 11:06 alonbecker

Can you provide more info? was it working before? The error is TypeError: init() got an unexpected keyword argument 'hash_method'" Please share your gunicorn config

dpgaspar avatar Jun 09 '22 09:06 dpgaspar

We've encountered the same problem and narrowed it down to the use of FileSystemCache as one of the configurable caches:

  DATA_CACHE_CONFIG = {
    'CACHE_TYPE': 'FileSystemCache',
    'CACHE_DEFAULT_TIMEOUT': 60 * 60 * 24, # 1 day
    'CACHE_DIR': '/tmp/',
    'CACHE_THRESHOLD': 1000
  }

This configuration throws the hash_method error for us on version 1.5.0 upwards of Superset. Commenting out this declaration ensures the app starts properly.

I've been unable to further diagnose the problem so far but am continuing to investigate.

johntwyman avatar Jun 29 '22 04:06 johntwyman

I had the same problem lately with Apache Airflow, but turns out Flask 1.1.4 was expecting a version of cachelib that I didn't install. After version 0.6.0, cachelib started supporting a hash_method for the FileSystemCache backend, so if you superset instance is using cachelib<0.6.0 it will most likely fail. For my Airflow instance, installing cachelib==0.9.0 resolved my problem with FileSystemCache backend.

This is the change that introduced such hash_method change.

snwbr avatar Jul 08 '22 13:07 snwbr

Forced installation of a later version of cachelib has helped me, but

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
apache-superset 2.0.0 requires cachelib<0.5,>=0.4.1, but you have cachelib 0.9.0 which is incompatible.

savermyas avatar Aug 24 '22 05:08 savermyas

Forced** installation of a later version of cachelib has helped me, but

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
apache-superset 2.0.0 requires cachelib<0.5,>=0.4.1, but you have cachelib 0.9.0 which is incompatible.

Did you manage to resolve it?

pozdrowiony avatar Nov 24 '22 15:11 pozdrowiony

This version of Superset is no longer supported. If anyone is still encountering this in current versions (3.x) please re-open this issue, open a new Issue with updated context, or raise a PR to address the problem. Thanks!

rusackas avatar Feb 13 '24 20:02 rusackas