searxng / searxng-docker

The docker-compose files for setting up a SearXNG instance with docker.
GNU Affero General Public License v3.0
1.35k stars 317 forks source link

Searxng crashing after update #103

Closed KamilKurde closed 1 year ago

KamilKurde commented 1 year ago

After updating trough docker-compose searxng is no longer starting with following logs

searxng    | SearXNG version 2022.12.02-ffb72dfd
searxng    | ⚠️  Check new version /etc/searxng/uwsgi.ini.new to make sure SearXNG is working properly
searxng    | Use existing /etc/searxng/settings.yml
searxng    | Listen on 0.0.0.0:8080
searxng    | [uWSGI] getting INI configuration from /etc/searxng/uwsgi.ini
searxng    | [uwsgi-static] added mapping for /static => /usr/local/searxng/searx/static
searxng    | *** Starting uWSGI 2.0.21 (64bit) on [Sun Dec  4 16:21:56 2022] ***
searxng    | compiled with version: 12.2.1 20220924 on 09 November 2022 12:47:28
searxng    | os: Linux-5.15.0-1017-oracle #22~20.04.1-Ubuntu SMP Wed Aug 24 11:13:15 UTC 2022
searxng    | nodename: a4d6f4da822f
searxng    | machine: aarch64
searxng    | clock source: unix
searxng    | pcre jit disabled
searxng    | detected number of CPU cores: 2
searxng    | current working directory: /usr/local/searxng
searxng    | detected binary path: /usr/sbin/uwsgi
searxng    | chdir() to /usr/local/searxng/searx/
searxng    | your memory page size is 4096 bytes
searxng    | detected max file descriptor number: 1048576
searxng    | building mime-types dictionary from file /etc/mime.types...1323 entry found
searxng    | lock engine: pthread robust mutexes
searxng    | thunder lock: disabled (you can enable it with --thunder-lock)
searxng    | *** Cache "searxngcache" initialized: 11MB (key: 2136 bytes, keys: 4272000 bytes, data: 8192000 bytes, bitmap: 250 bytes) preallocated ***
searxng    | uwsgi socket 0 bound to TCP address 0.0.0.0:8080 fd 4
searxng    | Python version: 3.10.8 (main, Oct 26 2022, 16:58:21) [GCC 12.2.1 20220924]
searxng    | Python main interpreter initialized at 0xffffb3913b70
searxng    | python threads support enabled
searxng    | your server socket listen backlog is limited to 100 connections
searxng    | your mercy for graceful operations on workers is 60 seconds
searxng    | mapped 362016 bytes (353 KB) for 8 cores
searxng    | *** Operational MODE: preforking+threaded ***
searxng    | added /usr/local/searxng/ to pythonpath.
searxng    | spawned uWSGI master process (pid: 6)
searxng    | spawned uWSGI worker 1 (pid: 10, cores: 4)
searxng    | spawned uWSGI worker 2 (pid: 11, cores: 4)
searxng    | cache sweeper thread enabled
searxng    | spawned 2 offload threads for uWSGI worker 2
searxng    | spawned 2 offload threads for uWSGI worker 1
searxng    | Traceback (most recent call last):
searxng    |   File "/usr/local/searxng/searx/webapp.py", line 1390, in <module>
searxng    |     search_initialize(enable_checker=True, check_network=True, enable_metrics=settings['general']['enable_metrics'])
searxng    |   File "/usr/local/searxng/searx/search/__init__.py", line 30, in initialize
searxng    |     load_engines(settings_engines)
searxng    |   File "/usr/local/searxng/searx/engines/__init__.py", line 298, in load_engines
searxng    |     engine = load_engine(engine_data)
searxng    |   File "/usr/local/searxng/searx/engines/__init__.py", line 121, in load_engine
searxng    |     engine_module = engine_data['engine']
searxng    | KeyError: 'engine'
searxng    | unable to load app 0 (mountpoint='') (callable not found or import error)
searxng    | *** no app loaded. going in full dynamic mode ***
searxng    | Traceback (most recent call last):
searxng    |   File "/usr/local/searxng/searx/webapp.py", line 1390, in <module>
searxng    |     search_initialize(enable_checker=True, check_network=True, enable_metrics=settings['general']['enable_metrics'])
searxng    |   File "/usr/local/searxng/searx/search/__init__.py", line 30, in initialize
searxng    |     load_engines(settings_engines)
searxng    |   File "/usr/local/searxng/searx/engines/__init__.py", line 298, in load_engines
searxng    |     engine = load_engine(engine_data)
searxng    |   File "/usr/local/searxng/searx/engines/__init__.py", line 121, in load_engine
searxng    |     engine_module = engine_data['engine']
searxng    | KeyError: 'engine'
searxng    | unable to load app 0 (mountpoint='') (callable not found or import error)
searxng    | *** no app loaded. going in full dynamic mode ***

I checked every single engine I have configured and they are all (except for wikidata, and removing it doesn't fix it) in https://github.com/searxng/searxng/blob/master/searx/settings.yml. Removing whole engines section makes searxng start correctly. Here is my config:

# see https://docs.searxng.org/admin/engines/settings.html#use-default-settings
use_default_settings:
  engines:
    remove:
     - reddit
general:
  debug: false
  privacypolicy_url: false
  donation_url: false
  contact_url: false
  enable_metrics: true
server:
  # base_url is defined in the SEARXNG_BASE_URL environment variable, see .env and docker-compose.yml
  secret_key: [REDACTED]
  limiter: false
  image_proxy: true
  method: "GET"
  default_http_headers:
    X-XSS-Protection : 1; mode=block
    X-Download-Options : noopen
    X-Robots-Tag : noindex, nofollow
    Referrer-Policy : no-referrer
languages:
  - pl-PL
  - en
ui:
  static_use_hash: true
  query_in_title: true
  infinite_scroll: true
  theme_args:
    simple_style: dark
redis:
  url: redis://redis:6379/0
search:
  safe_search: 0
  autocomplete: "google"
  autocomplete_min: 3
  languages:
  - pl-PL
  - en
  formats:
   - html
outgoing:
  enable_http2: true
  request_timeout: 3.0
  max_request_timeout: 3.0
  keepalive_expiry: 120
enabled_plugins:
  - 'Open Access DOI rewrite'
  - 'Search on category select'
  - 'Self Informations'
  - 'Tracker URL remover'
engines:
  - name: 1x
    disabled: false
    display_error_messages: false
  - name: alexandria
    disabled: false
    display_error_messages: false
  - name: apk mirror
    disabled: false
    display_error_messages: false
  - name: arch linux wiki
    disabled: false
    display_error_messages: false
  - name: archive is
    disabled: false
    display_error_messages: false
  - name: artic
    disabled: false
    display_error_messages: false
  - name: arxiv
    disabled: false
    display_error_messages: false
  - name: askubuntu
    disabled: false
    display_error_messages: false
  - name: azlyrics
    disabled: false
    display_error_messages: false
  - name: bandcamp
    display_error_messages: false
  - name: bing
    disabled: false
    display_error_messages: false
    weight: 2
  - name: bing images
    disabled: false
    weight: 2
  - name: bing news
    disabled: false
    display_error_messages: false
  - name: bing videos
    disabled: false
    display_error_messages: false
  - name: bitbucket
    disabled: false
    display_error_messages: false
  - name: brave
    disabled: false
    display_error_messages: false
  - name: codeberg
    disabled: false
    display_error_messages: false
  - name: crossref
    disabled: false
    display_error_messages: false
  - name: currency
    disabled: false
    display_error_messages: false
  - name: dailymotion
    disabled: false
    display_error_messages: false
  - name: ddg definitions
    disabled: false
    display_error_messages: false
  - name: deviantart
    disabled: false
    display_error_messages: false
  - name: dictzone
    disabled: false
    display_error_messages: false
  - name: docker hub
    display_error_messages: false
  - name: duckduckgo
    disabled: false
    display_error_messages: false
  - name: duckduckgo images
    disabled: false
    display_error_messages: false
  - name: duckduckgo weather
    disabled: false
    weight: 10
  - name: emojipedia
    disabled: false
    display_error_messages: false
  - name: etymonline
    disabled: false
    display_error_messages: false
  - name: fdroid
    disabled: false
  - name: flickr
    disabled: false
    display_error_messages: false
  - name: free software directory
    disabled: false
    display_error_messages: false
  - name: genius
    disabled: false
    display_error_messages: false
  - name: gentoo
    disabled: true
  - name: github
    disabled: false
  - name: gitlab
    disabled: false
    display_error_messages: false
  - name: google
    weight: 10
  - name: google images
    disabled: false
    weight: 10
  - name: google news
    disabled: false
    weight: 10
  - name: google play apps
    disabled: false
  - name: google scholar
    disabled: false
    display_error_messages: false
  - name: google videos
    disabled: false
    display_error_messages: false
  - name: imdb
    disabled: false
    display_error_messages: false
  - name: kickass
    disabled: true
  - name: library genesis
    disabled: false
    display_error_messages: false
  - name: library of congress
    disabled: false
    display_error_messages: false
  - name: lingva
    disabled: false
    display_error_messages: false
  - name: mankier
    disabled: false
    display_error_messages: false
  - name: mixcloud
    display_error_messages: false
  - name: mojeek
    disabled: false
    display_error_messages: false
  - name: mymemory translated
    disabled: false
    display_error_messages: false
  - name: neeva
    disabled: false
    display_error_messages: false
  - name: openairedatasets
    disabled: false
    display_error_messages: false
  - name: openairepublications
    disabled: false
    display_error_messages: false
  - name: openrepos
    disabled: false
    display_error_messages: false
  - name: openverse
    disabled: false
    display_error_messages: false
  - name: photon
    disabled: false
    display_error_messages: false
  - name: piratebay
    disabled: true
  - name: pubmed
    disabled: false
    display_error_messages: false
  - name: qwant
    disabled: false
    display_error_messages: false
  - name: qwant images
    disabled: false
    display_error_messages: false
  - name: qwant news
    disabled: false
    display_error_messages: false
  - name: searchcode code
    disabled: false
    display_error_messages: false
  - name: semantic scholar
    disabled: false
    display_error_messages: false
  - name: sepiasearch
    disabled: false
    display_error_messages: false
  - name: sjp.pwn
    disabled: false
    display_error_messages: false
  - name: solidtorrents
    disabled: true
  - name: soundcloud
    disabled: false
    display_error_messages: false
  - name: stackoverflow
    disabled: false
    display_error_messages: false
    weight: 5
  - name: startpage
    disabled: false
    display_error_messages: false
  - name: superuser
    disabled: false
    display_error_messages: false
  - name: tineye
    disabled: true
    display_error_messages: false
  - name: twitter
    disabled: false
    weight: 10
  - name: unsplash
    disabled: false
    display_error_messages: false
  - name: vimeo
    disabled: false
    display_error_messages: false
  - name: wikibooks
    disabled: false
    display_error_messages: false
  - name: wikinews
    disabled: false
    display_error_messages: false
  - name: wikipedia
    disabled: false
    display_error_messages: false
  - name: wikiquote
    disabled: false
    display_error_messages: false
  - name: wikisource
    disabled: false
    display_error_messages: false
  - name: wikiversity
    disabled: false
    display_error_messages: false
  - name: wiktionary
    disabled: false
    display_error_messages: false
  - name: wolframalpha
    categories: general
    disabled: false
    display_error_messages: false
    keepalive_expiry: 120.0
    max_keepalive_connections: 10
    weight: -100
  - name: wordnik
    disabled: false
    display_error_messages: false
  - name: yahoo news
    disabled: false
    display_error_messages: false
  - name: youtube
    disabled: false
    weight: 10
  - name: z-library
    display_error_messages: false
return42 commented 1 year ago

Remove the z-library engine / the engine has been removed

KamilKurde commented 1 year ago

Yeah, my bad, when checking engines (by names) I didn't check if they are actually used, I just checked if they are in the file. Thank you

return42 commented 1 year ago

Yeah, my bad, ..

It's not your fault, we should have implement #1951 .. but did not have time yet / sorry.