Navigation

    Kopano
    • Register
    • Login
    • Search
    • Categories
    • Get Official Kopano Support
    • Recent
    Statement regarding the closure of the Kopano community forum and the end of the community edition

    Kopano-Search: Unable to change working directory ([Errno 2] No such file or directory: '/var/lib/kopano/empty'

    Kopano Groupware Core
    3
    14
    702
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • thctlo
      thctlo last edited by thctlo

      @fbartels , he already gave all needed info. ;-)
      He is running Debian 10 and its with that kopano-core 8.7.0-3
      (https://packages.debian.org/search?keywords=kopano-core)

      There is only one version atm in the debian tree.

      ps… this is pretty clear.
      kopano-searchNo /usr/bin/python3 found running; none killed.

      fbartels 1 Reply Last reply Reply Quote 0
      • fbartels
        fbartels Kopano @thctlo last edited by

        @thctlo there is no mention of 8.7.something in his op

        Regards Felix

        Resources:
        https://kopano.com/blog/how-to-get-kopano/
        https://documentation.kopano.io/
        https://kb.kopano.io/

        Support overview:
        https://kopano.com/support/

        1 Reply Last reply Reply Quote 0
        • thctlo
          thctlo last edited by

          but it looks like he did.

          I have installed the Debian packages and got initially the error:

          fbartels 1 Reply Last reply Reply Quote 0
          • fbartels
            fbartels Kopano @thctlo last edited by

            @thctlo but that is all guessing and assuming until the op clarifies what he actually did.

            Regards Felix

            Resources:
            https://kopano.com/blog/how-to-get-kopano/
            https://documentation.kopano.io/
            https://kb.kopano.io/

            Support overview:
            https://kopano.com/support/

            1 Reply Last reply Reply Quote 0
            • thctlo
              thctlo last edited by

              Aaahh, yes, your completely right and im always telling myself… Assumption is the mother of all f.ups. …

              1 Reply Last reply Reply Quote 0
              • alex1452
                alex1452 last edited by alex1452

                Dear all,

                @thctlo is absolutely right. I am running the packages from Debian 10. I should have stated that clearly in my initial post.

                kopano-common,now 8.7.0-3 all [installed,automatic]
                kopano-contacts,now 8.7.0-3 amd64 [installed]
                kopano-dagent,now 8.7.0-3 amd64 [installed]
                kopano-libs,now 8.7.0-3 amd64 [installed,automatic]
                kopano-search,now 8.7.0-3 all [installed]
                kopano-server,now 8.7.0-3 amd64 [installed]
                kopano-spooler,now 8.7.0-3 amd64 [installed]
                kopano-webapp-apache2,now 3.5.2+dfsg1-1 all [installed]
                kopano-webapp-common,now 3.5.2+dfsg1-1 all [installed,automatic]
                kopano-webapp-files,now 2.1.5+dfsg1-1 all [installed]
                kopano-webapp-folderwidgets,now 3.5.2+dfsg1-1 all [installed]
                kopano-webapp-gmaps,now 3.5.2+dfsg1-1 all [installed]
                kopano-webapp-pimfolder,now 3.5.2+dfsg1-1 all [installed]
                kopano-webapp-quickitems,now 3.5.2+dfsg1-1 all [installed]
                kopano-webapp-titlecounter,now 3.5.2+dfsg1-1 all [installed]
                kopano-webapp-zdeveloper,now 3.5.2+dfsg1-1 all [installed]
                

                As recommended, I have just done:

                apt-get install python3 python3-tzlocal
                Reading package lists... Done
                Building dependency tree
                Reading state information... Done
                python3 is already the newest version (3.7.3-1).
                python3 set to manually installed.
                The following NEW packages will be installed:
                  python3-tzlocal
                0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
                Need to get 16.4 kB of archives.
                After this operation, 80.9 kB of additional disk space will be used.
                Fetched 16.4 kB in 1s (12.8 kB/s)
                Selecting previously unselected package python3-tzlocal.
                (Reading database ... 19660 files and directories currently installed.)
                Preparing to unpack .../python3-tzlocal_1.5.1-1_all.deb ...
                Unpacking python3-tzlocal (1.5.1-1) ...
                Setting up python3-tzlocal (1.5.1-1) ...
                

                However, the error message is unchanged. Any other idea? Do you require additional information?

                root@kopano87:~# service kopano-search start
                [....] Starting Kopano search: kopano-search2019-09-12 23:36:54,523 - search - ERROR - Traceback (most recent call last):
                  File "/usr/lib/python3/dist-packages/daemon/daemon.py", line 579, in change_working_directory
                    os.chdir(directory)
                FileNotFoundError: [Errno 2] No such file or directory: '/var/lib/kopano/empty'
                
                The above exception was the direct cause of the following exception:
                
                Traceback (most recent call last):
                  File "/usr/lib/python3/dist-packages/kopano/log.py", line 103, in log_exc
                    try: yield
                  File "/usr/lib/python3/dist-packages/kopano/service.py", line 180, in start
                    _daemonize(self.main, options=self.options, log=self.log, config=self.config, service=self)
                  File "/usr/lib/python3/dist-packages/kopano/service.py", line 111, in _daemonize
                    stderr=sys.stderr,
                  File "/usr/lib/python3/dist-packages/daemon/daemon.py", line 390, in __enter__
                    self.open()
                  File "/usr/lib/python3/dist-packages/daemon/daemon.py", line 365, in open
                    change_working_directory(self.working_directory)
                  File "/usr/lib/python3/dist-packages/daemon/daemon.py", line 583, in change_working_directory
                    raise error
                  File "/usr/lib/python3/dist-packages/daemon/daemon.py", line 579, in change_working_directory
                    os.chdir(directory)
                daemon.daemon.DaemonOSEnvironmentError: Unable to change working directory ([Errno 2] No such file or directory: '/var/lib/kopano/empty')
                
                . ok
                
                
                fbartels 1 Reply Last reply Reply Quote 0
                • thctlo
                  thctlo last edited by

                  @alex1452 said in Kopano-Search: Unable to change working directory ([Errno 2] No such file or directory: '/var/lib/kopano/empty':

                  /var/lib/kopano/empty,

                  ah ok. but you error did change a bit.
                  If you did enable the line : (search.cfg)
                  #running_path = /var/lib/kopano/empty
                  yes, then disable it.

                  And try to start kopano-search again.

                  1 Reply Last reply Reply Quote 0
                  • fbartels
                    fbartels Kopano @alex1452 last edited by

                    @alex1452 said in Kopano-Search: Unable to change working directory ([Errno 2] No such file or directory: '/var/lib/kopano/empty':

                    FileNotFoundError: [Errno 2] No such file or directory: ‘/var/lib/kopano/empty’

                    Please report this error to the Debian maintainers so that they can make sure this directory exists in their packages. A simple mkdir would probably fix it on your system.

                    Regards Felix

                    Resources:
                    https://kopano.com/blog/how-to-get-kopano/
                    https://documentation.kopano.io/
                    https://kb.kopano.io/

                    Support overview:
                    https://kopano.com/support/

                    1 Reply Last reply Reply Quote 0
                    • thctlo
                      thctlo last edited by

                      Goodmorning Felix, he already did… (first post)
                      It could also be a missed right on the folder.
                      @alex1452 also check the right it needs to be kopano:kopano.

                      1 Reply Last reply Reply Quote 0
                      • alex1452
                        alex1452 last edited by alex1452

                        @thctlo and @fbartels

                        I did not make any changes to search.cfg. The line is disabled. Here is my full search.cfg:

                        ##############################################################
                        # INDEXED SEARCH SERVICE SETTINGS
                        
                        # Location of the index files
                        #index_path = /var/lib/kopano/search/
                        
                        # run as specific user
                        #run_as_user         = kopano
                        
                        # run as specific group
                        #run_as_group        = kopano
                        
                        # control pid file
                        #pid_file            =   /var/run/kopano/search.pid
                        
                        # run server in this path (when not using the -F switch)
                        #running_path = /var/lib/kopano/empty
                        
                        # Limit the number of results returned (0 = don't limit)
                        # Default: 0
                        #limit_results = 1000
                        
                        ##############################################################
                        # CONNECTION TO STORAGE SERVER SETTINGS
                        #
                        
                        # Socket to find the connection to the storage server.
                        # Use https to reach servers over the network
                        #server_socket = file:///var/run/kopano/server.sock
                        
                        # Login to the storage server using this SSL Key
                        #sslkey_file         = /etc/kopano/ssl/search.pem
                        
                        # The password of the SSL Key
                        #sslkey_pass         = replace-with-server-cert-password
                        
                        ##############################################################
                        # LISTEN SETTINGS
                        #
                        
                        # binding address
                        # To setup for multi-server, use: http://0.0.0.0:port or https://0.0.0.0:port
                        #server_bind_name = file:///var/run/kopano/search.sock
                        
                        # File with RSA key for SSL, used then server_bind_name uses https
                        #ssl_private_key_file = /etc/kopano/search/privkey.pem
                        
                        # File with certificate for SSL, used then server_bind_name uses https
                        #ssl_certificate_file = /etc/kopano/search/cert.pem
                        
                        ##############################################################
                        # LOG SETTINGS
                        
                        # Logging method (syslog, file)
                        #log_method = file
                        
                        # Loglevel (0(none), 1(crit), 2(err), 3(warn), 4(notice), 5(info), 6(debug))
                        #log_level = 3
                        
                        # Logfile for log_method = file, use '-' for stderr
                        # Default: -
                        #log_file = /var/log/kopano/search.log
                        
                        # Log timestamp - prefix each log line with timestamp in 'file' logging mode
                        #log_timestamp = yes
                        
                        
                        ##############################################################
                        # ADVANCED INDEXED SEARCH SETTINGS
                        
                        # Back end search engine (currently only xapian is supported)
                        #search_engine = xapian
                        
                        # Size of indexing cache (used for indexing only, not for searching)
                        #term_cache_size = 64M
                        
                        # Ignore properties upon indexing
                        # Only override this setting to expand the list
                        #index_exclude_properties = 007D 0064 0C1E 0075 678E 678F
                        
                        # Number of indexing processes used during initial indexing
                        # Setting this to a higher value can greatly speed up initial indexing,
                        # especially when attachments are indexed.
                        #index_processes = 1
                        
                        # Index drafts folder
                        #index_drafts = yes
                        
                        # Index junk folder
                        #index_junk = yes
                        
                        # Prepare search suggestions ("did-you-mean?") during indexing
                        # This takes up a large percentage of the used disk space
                        #suggestions = yes
                        
                        ##############################################################
                        # ATTACHMENT INDEX SETTINGS
                        
                        # Should attachments be indexed
                        #index_attachments = no
                        
                        # Maximum file size for attachments
                        #index_attachment_max_size = 5M
                        

                        I manually created /var/lib/kopano/empty (kopano:kopano) and now I am able to start. Thank you so much for your help!

                        Since you are in contact with Debian, there are two more issues with the package:

                        1. The init file makes references to /usr/bin/python which needs to be replaces with /usr/bin/python3 (python 2x is not installed by the package, only python3)

                        2. The init file does not shut shut down the daemon correctly because he does not find it. This leaves the pid file resulting in an error on the next start.

                        Traceback (most recent call last):
                          File "/usr/lib/python3/dist-packages/kopano/log.py", line 103, in log_exc
                            try: yield
                          File "/usr/lib/python3/dist-packages/kopano/service.py", line 180, in start
                            _daemonize(self.main, options=self.options, log=self.log, config=self.config, service=self)
                          File "/usr/lib/python3/dist-packages/kopano/service.py", line 111, in _daemonize
                            stderr=sys.stderr,
                          File "/usr/lib/python3/dist-packages/daemon/daemon.py", line 390, in __enter__
                            self.open()
                          File "/usr/lib/python3/dist-packages/daemon/daemon.py", line 382, in open
                            self.pidfile.__enter__()
                          File "/usr/lib/python3/dist-packages/lockfile/__init__.py", line 197, in __enter__
                            self.acquire()
                          File "/usr/lib/python3/dist-packages/daemon/pidfile.py", line 57, in acquire
                            super(TimeoutPIDLockFile, self).acquire(timeout, *args, **kwargs)
                          File "/usr/lib/python3/dist-packages/lockfile/pidlockfile.py", line 85, in acquire
                            self.path)
                        lockfile.LockTimeout: Timeout waiting to acquire lock for /var/run/kopano/search.pid
                        

                        I suggest that we close this thread as solved. I will open another one in case I find additional errors

                        1 Reply Last reply Reply Quote 0
                        • thctlo
                          thctlo last edited by thctlo

                          Yes. these are known (to me)… and there is more going on in bugs…

                          Why, just read the kopano bug reports/release info as of 8.7.0-8.7.5
                          so read also : https://forum.kopano.io/topic/2682/kopano-packages-from-native-distribution-repositories-e-g-debian-10-and-ubuntu-18-04
                          ^^ good one Felix…

                          Now, you can upgrade it with the kopano packages and the problems you will get are easy to resolve.
                          How is in the kopano forum already, there are more who switched.

                          Its just what i advice, what you do is up 2 you, you might not notice the bugs.
                          And If you find other errors, then do what is adviced atm.

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post