• SolvedFixed
  • "An unexpected error has occurred" Grommunio Web Search

WalterH
Sorry, i didn'd consider of sharing logs because i thought, Joerg had submitted the relevant logs. My bad.

I have checked the nginx-logs, the logs in admin-gui and journalctl -f. There are no errors.

I tried to raise log-level by adding http_debug=1 and msrpc_debug=1 in /etc/gromox/http.cfg, like described in documentation, but without any effect, even after reboot. Where am i going wrong?

Joerg changed the title to "An unexpected error has occurred" Grommunio Web Search .
9 days later

This should be the solution:

odo125
I have found the problem of webapp search ("An unexpected error has occurred"), at least in my installation. The files created by grommunio-index.service in the folder /var/lib/grommunio-web/sqlite-index have the wrong permissions. After creating they are owned by user grommunio and group gromox. If I change the permissions to owner groweb and group groweb the websearch is working again.

Joerg
I can confirm that. However, I had to adjust the rights of the index.sqlite3 file to: -rw-rw---- (0660). In order to show search-results, a re-indexing was necessary: grommunio-index -v -c -A

    15 days later

    Joerg
    I tried it both. I changed the user and group of the files in the /var/lib/grommunio-web/sqlite-index folder to groweb:groweb and set the permissions of the index.sqlite3 file to 0660.

    After did so, the websearch was woking but I got this failures when I was reindexing:

    [ERROR] Failed to insert message 10/1918698: attempt to write a readonly database
    [ERROR] Failed to insert message 10/1918699: SQLite query failed: 8

    I think, the way with the wrong permissions is right, but this is in my case not the solution.

      Die Rechte müssen so aussehen:

      # ls -l /var/lib/ | grep grommunio-web
      drwxrwx--- 1 groweb    groweb     44 Feb 15 12:12 grommunio-web/
      
       # ls -l /var/lib/grommunio-web
      total 4
      drwxrwx---  1 groweb groweb   74 Feb 19 18:22 session/
      drwxrwx--- 27 groweb groweb 4096 Feb 15 12:12 sqlite-index/
      drwxrwx---  1 groweb groweb   36 Feb 15 12:12 tmp/
      
      # ls -l /var/lib/grommunio-web/sqlite-index/
      drwxrwx--- 2 grommunio groweb 27 Feb 20 07:30 user\@domain.tld/

      jstampfer ndex.sqlite3 file to 0660

      0660 ist definitiv falsch.

      Hoffe das hilft weiter?

      • Andy replied to this.

        So funktioniert das indizieren und die Websuche wunderbar. Vielen herzlichen Dank.

        Was mir in dem Zusammenhang noch aufgefallen ist: Die Datumsabgrenzung funktioniert leider bei mir in der Websuche nicht: Weder "Letzte Woche" noch "Benutzerdefiniert" mit unterschiedlichen Start- und Enddaten.

        Had the same problem, worked for me too, thanks!
        Summary:

        chown -R groweb:groweb /var/lib/grommunio-web/sqlite-index/
        chmod -R 660 /var/lib/grommunio-web/sqlite-index/

        In case the search is slow after that, try rebuilding the index:
        grommunio-index -v -c -A

        14 days later

        WalterH 0660 ist definitiv falsch

        Genauso ist das, es sollte 0770, also drwxrwx--- sein. Die Frage ist, ob die Unterordner session und tmp und Dateien in den Unterordnern genauso sein müssen, denn da gibt es Unterschiede.

        localhost:/var/lib/grommunio-web # ls -al
        total 4
        drwxrwx---  5 groweb groweb   52 Mär  5 23:46 .
        drwxr-xr-x 50 root   root   4096 Feb 18 10:36 ..
        drwxrwx---  2 groweb groweb   51 Mär  7 00:25 session
        drwxrwx---  4 groweb groweb   70 Mär  5 23:46 sqlite-index
        drwxrwx---  4 groweb groweb   40 Mär  5 23:46 tmp
        localhost:/var/lib/grommunio-web #
        a month later

        Ich hatte dieses Problem ebenfalls. Setzen der Berechtigungen wie von sdennis beschrieben hat bei mir geholfen.

        Habe eben nur 770 statt 660 gemacht (wobei es auch mit 660 schon funktioniert hat).

        Es war vorher grommunio:gromox und 640

          19 days later

          Hallo,
          ich habe versucht die Rechte wie oben beschrieben zu setzen, jedoch bekomme ich mit
          grommunio-index -v -c -A
          folgende Fehlermeldung:
          [2024-05-13T21:13:25] grommunio-index /var/lib/gromox/user/1/2 -e ::1 -o /var/lib/grommunio-web/sqlite-index/catchall@***************.***/index.sqlite3
          [FATAL] Send failed: Connection refused
          ... exited with status 2

          auch bei dem Kommando
          /usr/libexec/gromox/cgkrepair -e catchall@***************.***
          bekomme ich die Fehlermeldung:
          exmdb_client: protocol error connecting to [::1]:5000//var/lib/gromox/user/
          exm: load_hierarchy_table RPC failed
          The operation did not complete.

          Hat hier evtl. wer eine Idee was ich hier falsch mache?
          Vielen Dank

          • Andy replied to this.

            bart versucht die Rechte wie oben beschrieben zu setzen

            Hast Du das so gemacht?

            chown -R groweb:groweb /var/lib/grommunio-web/sqlite-index/
            chmod -R 770 /var/lib/grommunio-web/sqlite-index/
            grommunio-index -v -c -A

            Wenn ja, dann sollte das von daher passen.

            localhost:/var/lib/grommunio-web/sqlite-index # ls -al
            drwxrwx--- 4 groweb groweb 70 Mär 5 23:46 .
            drwxrwx--- 5 groweb groweb 52 Mär 5 23:46 ..
            drwxrwx--- 2 groweb groweb 27 Mär 7 08:45 user1@domain.dl
            drwxrwx--- 2 groweb groweb 27 Mär 7 08:45 user2@domain.dl
            drwxrwx--- 2 groweb groweb 27 Mär 7 08:45 user...n...@domain.dl
            localhost:/var/lib/grommunio-web/sqlite-index #
            • bart replied to this.

              Versuche man gromox-http zu restarten ob das hilft?
              systemctl restart gromox-http

              • bart replied to this.

                Andy
                Hallo Andy,

                ja genau so:

                backup:~# chown -R groweb:groweb /var/lib/grommunio-web/sqlite-index/
                backup:~ # chmod -R 770 /var/lib/grommunio-web/sqlite-index/
                backup:~ # grommunio-index -v -c -A

                [2024-05-14T17:47:55] grommunio-index /var/lib/gromox/user/1/2 -e ::1 -o /var/lib/grommunio-web/sqlite-index/catchall@***************.***/index.sqlite3
                [FATAL] Send failed: Connection refused
                ... exited with status 2
                Leider hat dies nicht geholfen.

                WalterH

                Hallo Walter,

                dies hatte ich auch schon getestet, leider auch ohne Erfolg.
                Das ist der Ausdruck von journalctl:

                backup:~ # journalctl -u gromox-http -n 25
                May 14 18:00:09 backup http[23801]: mysql_adaptor: Current schema n131 is recent.
                May 14 18:00:09 backup http[23801]: timer_agent: timer address is [::1]:6666
                May 14 18:00:18 backup http[23801]: getaddrinfo backup: Temporary failure in name resolution
                May 14 18:00:18 backup http[23801]: exmdb_provider: failed to start bounce producer
                May 14 18:00:18 backup http[23801]: service: init of libgxs_exmdb_provider.so not successful
                May 14 18:00:18 backup http[23801]: system: failed to run services
                May 14 18:00:18 backup systemd[1]: gromox-http.service: Main process exited, code=exited, status=1/FAILURE
                May 14 18:00:18 backup systemd[1]: gromox-http.service: Failed with result 'exit-code'.
                May 14 18:00:18 backup systemd[1]: gromox-http.service: Scheduled restart job, restart counter is at 80.
                May 14 18:00:18 backup systemd[1]: Stopped Gromox HTTP service.
                May 14 18:00:18 backup systemd[1]: Started Gromox HTTP service.
                May 14 18:00:18 backup http[23819]: gromox-http 2.28.1.g256f9d8 (pid 23819 uid 0)
                May 14 18:00:18 backup http[23819]: system: system TLS listening port 10443
                May 14 18:00:18 backup http[23819]: system: maximum file descriptors: 524288
                May 14 18:00:18 backup http[23819]: exmdb_provider: listen address is [::1]:5000
                May 14 18:00:18 backup http[23819]: exmdb_provider: defaulting to implicit access ACL containing ::1.
                May 14 18:00:18 backup http[23819]: Reexecing /usr/libexec/gromox/http
                May 14 18:00:18 backup http[23819]: gromox-http 2.28.1.g256f9d8 (pid 23819 uid 479)
                May 14 18:00:18 backup http[23819]: system: system TLS listening port 10443
                May 14 18:00:18 backup http[23819]: system: maximum file descriptors: 524288
                May 14 18:00:18 backup http[23819]: exmdb_provider: listen address is [::1]:5000
                May 14 18:00:18 backup http[23819]: exmdb_provider: defaulting to implicit access ACL containing ::1.
                May 14 18:00:18 backup http[23819]: ldap_adaptor: default host <ldapi:///>, base <>, #conn=8, mailattr=mail
                May 14 18:00:18 backup http[23819]: mysql_adaptor: Current schema n131 is recent.
                May 14 18:00:18 backup http[23819]: timer_agent: timer address is [::1]:6666

                Tabula rasa

                this will reset the web-mail sessions/cache/index but the user-configuration is safe in the exmdb so no worries.

                # just to be sure nothing is getting in the way
                systemctl stop nginx.service gromox-http.service
                # backup to be safe
                cp -a /var/lib/grommunio-web{,.bak}
                # clean up / you can leave out the -i if you are sure :)
                rm -rfi /var/lib/grommunio-web/{session,sqlite-index,tmp}/*
                # run indexer
                systemctl start grommunio-index.service
                systemctl start nginx.service gromox-http.service
                systemctl --failed

                Hi crpd,

                thanks a lot for the hint, unfortunately it didn't worked for me.

                systemctl stop nginx.service gromox-http.service
                backup:~ # rm -rf /var/lib/grommunio-web/{session,sqlite-index,tmp}/*
                backup:~ # systemctl start grommunio-index.service
                Job for grommunio-index.service failed because the control process exited with error code.
                See "systemctl status grommunio-index.service" and "journalctl -xeu grommunio-index.service" for details.
                backup:~ # systemctl start nginx.service gromox-http.service
                backup:~ # systemctl --failed
                  UNIT                    LOAD   ACTIVE SUB    DESCRIPTION
                ● grommunio-index.service loaded failed failed Fulltext search index regeneration
                
                LOAD   = Reflects whether the unit definition was properly loaded.
                ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
                SUB    = The low-level unit activation state, values depend on unit type.
                1 loaded units listed.

                Journal list follows:

                backup:~ # journalctl -xeu grommunio-index.service
                ░ An ExecStart= process belonging to unit grommunio-index.service has exited.
                ░░
                ░░ The process' exit code is 'exited' and its exit status is 1.
                May 14 22:02:02 backup systemd[1]: grommunio-index.service: Failed with result 'exit-code'.
                ░░ Subject: Unit failed
                ░░ Defined-By: systemd
                ░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
                ░░
                ░░ The unit grommunio-index.service has entered the 'failed' state with result 'exit-code'.
                May 14 22:02:02 backup systemd[1]: Failed to start Fulltext search index regeneration.
                ░░ Subject: A start job for unit grommunio-index.service has failed
                ░░ Defined-By: systemd
                ░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
                ░░
                ░░ A start job for unit grommunio-index.service has finished with a failure.
                ░░
                ░░ The job identifier is 3305428 and the job result is failed.
                May 14 22:03:49 backup systemd[1]: Starting Fulltext search index regeneration...
                ░░ Subject: A start job for unit grommunio-index.service has begun execution
                ░░ Defined-By: systemd
                ░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
                ░░
                ░░ A start job for unit grommunio-index.service has begun execution.
                ░░
                ░░ The job identifier is 3308117.
                May 14 22:03:49 backup grommunio-index[18149]: [2024-05-14T22:03:49] /usr/bin/grommunio-index /var/lib/gromox/user/1/0 -e ::1 -o /var/lib/grommunio-web/sqlite-index/roland@backup.kroener.email/index.sqlite3
                May 14 22:03:49 backup grommunio-index[18149]: [FATAL] Send failed: Connection refused
                May 14 22:03:49 backup grommunio-index[18149]:         ... exited with status 2
                May 14 22:03:49 backup grommunio-index[18149]: [2024-05-14T22:03:49] /usr/bin/grommunio-index /var/lib/gromox/user/1/1 -e ::1 -o /var/lib/grommunio-web/sqlite-index/sandra@backup.kroener.email/index.sqlite3
                May 14 22:03:49 backup grommunio-index[18149]: [FATAL] Send failed: Connection refused
                May 14 22:03:49 backup grommunio-index[18149]:         ... exited with status 2
                May 14 22:03:49 backup grommunio-index[18149]: [2024-05-14T22:03:49] /usr/bin/grommunio-index /var/lib/gromox/user/0/2 -e ::1 -o /var/lib/grommunio-web/sqlite-index/marianne@backup.kroener.email/index.sqlite3
                May 14 22:03:49 backup grommunio-index[18149]: [FATAL] Send failed: Connection refused
                May 14 22:03:49 backup grommunio-index[18149]:         ... exited with status 2
                May 14 22:03:49 backup grommunio-index[18149]: [2024-05-14T22:03:49] /usr/bin/grommunio-index /var/lib/gromox/user/1/2 -e ::1 -o /var/lib/grommunio-web/sqlite-index/catchall@backup.kroener.email/index.sqlite3
                May 14 22:03:49 backup grommunio-index[18149]: [FATAL] Send failed: Connection refused
                May 14 22:03:49 backup grommunio-index[18149]:         ... exited with status 2
                May 14 22:03:50 backup systemd[1]: grommunio-index.service: Main process exited, code=exited, status=1/FAILURE
                ░░ Subject: Unit process exited
                ░░ Defined-By: systemd
                ░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
                ░░
                ░░ An ExecStart= process belonging to unit grommunio-index.service has exited.
                ░░
                ░░ The process' exit code is 'exited' and its exit status is 1.
                May 14 22:03:50 backup systemd[1]: grommunio-index.service: Failed with result 'exit-code'.
                ░░ Subject: Unit failed
                ░░ Defined-By: systemd
                ░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
                ░░
                ░░ The unit grommunio-index.service has entered the 'failed' state with result 'exit-code'.
                May 14 22:03:50 backup systemd[1]: Failed to start Fulltext search index regeneration.
                ░░ Subject: A start job for unit grommunio-index.service has failed
                ░░ Defined-By: systemd
                ░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
                ░░
                ░░ A start job for unit grommunio-index.service has finished with a failure.
                ░░
                ░░ The job identifier is 3308117 and the job result is failed.
                lines 2573-2631/2631 (END)

                I basically knew that this will follow /o\

                Is everything else working fine on that server?

                Well.. maybe that could help us 🙈

                • grep -vH 'pass' /etc/gromox/{gromox,http,exmdb_provider}.cfg

                • ss -ltpn |cat

                • systemctl restart 'grom*' 'nginx' 'postfix' 'maria*'

                • journcalctl --unit='gromox*' --since -5min

                © 2020-2024 grommunio GmbH. All rights reserved. | https://grommunio.com | Data Protection | Legal notice