searxng / searxng

SearXNG is a free internet metasearch engine which aggregates results from various search services and databases. Users are neither tracked nor profiled.
https://docs.searxng.org
GNU Affero General Public License v3.0
13.75k stars 1.44k forks source link

UWSGI Searxng Endless HTTP 308 Redirect to the same URL #1594

Closed tunloop closed 2 years ago

tunloop commented 2 years ago

Discussed in https://github.com/searxng/searxng/discussions/1572

Originally posted by **erasedhammer99** July 28, 2022 After battling numerous install errors, I finally got a smooth error-less install on debian 11 using the install scripts in this documentation: https://docs.searxng.org/admin/installation.html sudo -H ./utils/searx.sh install all sudo -H ./utils/filtron.sh install all sudo -H ./utils/morty.sh install all All three of those scripts showed no error and all the services are running and ports open. My nginx configuration: ``` server { # Load configuration files for the default server block. include /etc/nginx/default.d/*.conf; listen 80 default_server; server_name _; } ``` settings.yml ``` # SearXNG settings, before editing this file read: # # https://docs.searxng.org/admin/engines/settings.html use_default_settings: true general: # Debug mode, only for development debug: false # change displayed name instance_name: "Privacy Search" search: # Filter results. 0: None, 1: Moderate, 2: Strict safe_search: 0 # Existing autocomplete backends: "dbpedia", "duckduckgo", "google", # "startpage", "swisscows", "qwant", "wikipedia" - leave blank to turn it off # by default. autocomplete: 'duckduckgo' # Default search language - leave blank to detect from browser information or # use codes from 'languages.py' default_lang: '' # remove format to deny access, use lower case. formats: - html server: base_url: https://search.privacy port: 8888 bind_address: "127.0.0.1" secret_key: "****" # change this! # Proxying image results through SearXNG image_proxy: true default_http_headers: X-Content-Type-Options : nosniff X-XSS-Protection : 1; mode=block X-Download-Options : noopen X-Robots-Tag : noindex, nofollow Referrer-Policy : no-referrer ui: query_in_title: false default_theme: simple theme_args: simple_style: dark results_on_new_tab: true result_proxy: url: https://search.privacy/morty key: !!binary "****=" ``` Outputs of all inspect services: ``` # sudo -H ./utils/searx.sh inspect service INFO: using instance at: /usr/local/searx/searx-src INFO: switching to /usr/local/searx/searx-src/.config.sh service status & log ==================== sourced /usr/local/searx/searx-src/.config.sh : SERVICE_USER : searx SERVICE_HOME : /usr/local/searx ---- SearXNG instance setup (status: python-installed) SEARXNG_SETTINGS_PATH : /etc/searxng/settings.yml SEARX_PYENV : /usr/local/searx/searx-pyenv SEARX_SRC : /usr/local/searx/searx-src SEARXNG_URL : http://search INFO: Service account searx exists. INFO: ~searx: python environment is available. INFO: ~searx: SearXNG software is installed. INFO: uWSGI app searxng.ini is enabled. INFO searx : merge the default settings ( /usr/local/searx/searx-src/searx/settings.yml ) and the user setttings ( /etc/searxng/settings.yml ) INFO searx : max_request_timeout=None INFO: public URL --> http://search INFO: internal URL --> http://127.0.0.1:8888 INFO: got 200 from http://127.0.0.1:8888 INFO: got 429 from http://search Enable SearXNG debug mode? [NO/yes] N Unit searx.service could not be found. // use CTRL-C to stop monitoring the log # sudo -H ./utils/filtron.sh inspect service INFO: using instance at: /usr/local/searx/searx-src INFO: switching to /usr/local/searx/searx-src/.config.sh service status & log ==================== sourced /usr/local/searx/searx-src/.config.sh : SERVICE_USER : filtron SERVICE_HOME : /usr/local/filtron FILTRON_TARGET : 127.0.0.1:8888 FILTRON_API : 127.0.0.1:4005 FILTRON_LISTEN : 127.0.0.1:4004 FILTRON_URL_PATH : / ---- SearXNG instance setup (status: python-installed) SEARXNG_SETTINGS_PATH : /etc/searxng/settings.yml SEARX_PYENV : /usr/local/searx/searx-pyenv SEARX_SRC : /usr/local/searx/searx-src SEARXNG_URL : http://search INFO: service account filtron available. ./utils/filtron.sh: line 256: go_is_available: command not found ERROR: ~filtron: go is not installed INFO: ~filtron: filtron app is installed INFO: got 404 from http://127.0.0.1:4005 ERROR: API not available at: http://127.0.0.1:4005 INFO: got 429 from http://127.0.0.1:4004 INFO: got 200 from http://127.0.0.1:8888 INFO: Filtron's target is available at: http://127.0.0.1:8888 INFO: got 429 from http://search INFO: golang go1.17.2 is installed (min needed is: go1.17.2) INFO: public URL --> http://search INFO: internal URL --> http://127.0.0.1:4004 Enable filtron debug mode? [NO/yes] N ● filtron.service - filtron Loaded: loaded (/lib/systemd/system/filtron.service; enabled; vendor preset: enabled) Active: active (running) since Thu 2022-07-28 13:16:08 EDT; 19min ago Main PID: 367 (filtron) Tasks: 5 (limit: 1133) Memory: 17.7M CPU: 490ms CGroup: /system.slice/filtron.service └─367 /usr/local/filtron/go-apps/bin/filtron -api 127.0.0.1:4005 -listen 127.0.0.1:4004 -rules /etc/filtron/rules.json -target 127.0.0.1:8888 Jul 28 13:32:55 search filtron[367]: [suspiciously frequent IP] 2022-07-28 13:32:55.442 192.168.0.2 GET search.privacy/ "" "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_11) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.5140.92 Safari/537.36" Jul 28 13:32:55 search filtron[367]: [suspiciously frequent IP] 2022-07-28 13:32:55.469 192.168.0.2 GET search.privacy/ "" "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_11) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.5140.92 Safari/537.36" Jul 28 13:32:55 search filtron[367]: [suspiciously frequent IP] 2022-07-28 13:32:55.519 192.168.0.2 GET search.privacy/ "" "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_11) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.5140.92 Safari/537.36" Jul 28 13:32:55 search filtron[367]: [suspiciously frequent IP] 2022-07-28 13:32:55.558 192.168.0.2 GET search.privacy/ "" "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_11) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.5140.92 Safari/537.36" Jul 28 13:32:55 search filtron[367]: [suspiciously frequent IP] 2022-07-28 13:32:55.596 192.168.0.2 GET search.privacy/ "" "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_11) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.5140.92 Safari/537.36" Jul 28 13:32:55 search filtron[367]: [suspiciously frequent IP] 2022-07-28 13:32:55.628 192.168.0.2 GET search.privacy/ "" "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_11) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.5140.92 Safari/537.36" Jul 28 13:32:55 search filtron[367]: [suspiciously frequent IP] 2022-07-28 13:32:55.662 192.168.0.2 GET search.privacy/ "" "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_11) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.5140.92 Safari/537.36" Jul 28 13:34:35 search filtron[367]: [roboagent limit] 2022-07-28 13:34:35.421 192.168.0.4 HEAD search/ "" "curl/7.74.0" Jul 28 13:35:29 search filtron[367]: [roboagent limit] 2022-07-28 13:35:29.592 HEAD 127.0.0.1:4004/ "" "curl/7.74.0" Jul 28 13:35:29 search filtron[367]: [roboagent limit] 2022-07-28 13:35:29.643 192.168.0.4 HEAD search/ "" "curl/7.74.0" INFO: public URL --> http://search // use CTRL-C to stop monitoring the log # sudo -H ./utils/morty.sh inspect service INFO: using instance at: /usr/local/searx/searx-src INFO: switching to /usr/local/searx/searx-src/.config.sh service status & log ==================== sourced /usr/local/searx/searx-src/.config.sh : SERVICE_USER : morty SERVICE_HOME : /usr/local/morty PUBLIC_URL_MORTY: : http://search/morty/ MORTY_LISTEN: : 127.0.0.1:3000 ---- SearXNG instance setup (status: python-installed) SEARXNG_SETTINGS_PATH : /etc/searxng/settings.yml SEARX_PYENV : /usr/local/searx/searx-pyenv SEARX_SRC : /usr/local/searx/searx-src SEARXNG_URL : http://search INFO: service account morty available. ./utils/morty.sh: line 276: go_is_available: command not found ERROR: ~morty: go is not installed INFO: ~morty: morty app is installed INFO: got 200 from http://127.0.0.1:3000 INFO: got 200 from http://search/morty/ INFO: golang go1.17.2 is installed (min needed is: go1.17.2) INFO: public URL --> http://search/morty/ INFO: morty URL --> http://127.0.0.1:3000 Enable morty debug mode (needs reinstall of systemd service)? [NO/yes] N ● morty.service - morty Loaded: loaded (/lib/systemd/system/morty.service; enabled; vendor preset: enabled) Active: active (running) since Thu 2022-07-28 13:16:08 EDT; 20min ago Main PID: 371 (morty) Tasks: 5 (limit: 1133) Memory: 18.2M CPU: 212ms CGroup: /system.slice/morty.service └─371 /usr/local/morty/go-apps/bin/morty -key xQS0FPpQJkiMwYT4ztXKIxAfkCuGzuqCJICFe10SAus= -listen 127.0.0.1:3000 -timeout 5 Jul 28 13:16:08 search systemd[1]: Started morty. Jul 28 13:16:08 search morty[371]: 2022/07/28 13:16:08 listening on 127.0.0.1:3000 // use CTRL-C to stop monitoring the log ``` I have confimred go is available in the environment, so I am not sure why the script is confused there: ``` # ./utils/filtron.sh --getenv GO_VERSION INFO: using instance at: /usr/local/searx/searx-src INFO: switching to /usr/local/searx/searx-src/.config.sh go1.17.2 root@search:/opt/searxng# sudo -H ./utils/filtron.sh shell INFO: using instance at: /usr/local/searx/searx-src INFO: switching to /usr/local/searx/searx-src/.config.sh // exit with [CTRL-D] filtron@search:~$ which go /usr/local/filtron/local/go/bin/go filtron@search:~$ go version go version go1.17.2 linux/amd64 # ./utils/morty.sh --getenv GO_VERSION INFO: using instance at: /usr/local/searx/searx-src INFO: switching to /usr/local/searx/searx-src/.config.sh go1.17.2 root@search:/opt/searxng# sudo -H ./utils/morty.sh shell INFO: using instance at: /usr/local/searx/searx-src INFO: switching to /usr/local/searx/searx-src/.config.sh // exit with [CTRL-D] morty@search:~$ which go /usr/local/morty/local/go/bin/go morty@search:~$ go version go version go1.17.2 linux/amd64 ``` netstat output: ``` Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.1:4004 0.0.0.0:* LISTEN 367/filtron tcp 0 0 127.0.0.1:4005 0.0.0.0:* LISTEN 367/filtron tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 1084/nginx: master tcp 0 0 127.0.0.1:8888 0.0.0.0:* LISTEN 499/uwsgi tcp 0 0 127.0.0.1:3000 0.0.0.0:* LISTEN 371/morty ``` When browsing to http://search firefox says: The page isn’t redirecting properly When browsing to http://search/morty firefox says: Warning! This instance does not support direct URL opening. When browsing to http://search/static firefox says: Page not found, go to search page I am not sure what is wrong here. All I have done is run their provided scripts, and it is not functional. Is this a known issue with their install scripts? I find their documentation very lacking. Can anyone help me ?
return42 commented 2 years ago

Discussed in https://github.com/searxng/searxng/discussions/1572

Please do not flood the issue tracker in the hope someone will response on any entry. Why not asking for help on #searxng:matrix.org ?

Please note: