Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The seaf-cli status throws un-catched errors #2684

Open
mmahmoudian opened this issue Jun 16, 2023 · 3 comments
Open

The seaf-cli status throws un-catched errors #2684

mmahmoudian opened this issue Jun 16, 2023 · 3 comments

Comments

@mmahmoudian
Copy link

mmahmoudian commented Jun 16, 2023

I have multiple Seafile libraries synced and I tried to run seaf-cli status and it threw the following:

seaf-cli status
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/pysearpc/named_pipe.py", line 85, in _get_transport
    transport = self._pool.get(False)
                ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/queue.py", line 168, in get
    raise Empty
_queue.Empty

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/seaf-cli", line 1023, in <module>
    main()
  File "/usr/bin/seaf-cli", line 1019, in main
    args.func(args)
  File "/usr/bin/seaf-cli", line 779, in seaf_status
    tasks = seafile_rpc.get_clone_tasks()
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pysearpc/client.py", line 125, in newfunc
    ret_str = self.call_remote_func_sync(fcall_str)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pysearpc/named_pipe.py", line 97, in call_remote_func_sync
    transport = self._get_transport()
                ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pysearpc/named_pipe.py", line 87, in _get_transport
    transport = self._create_transport()
                ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pysearpc/named_pipe.py", line 80, in _create_transport
    transport.connect()
  File "/usr/lib/python3.11/site-packages/pysearpc/named_pipe.py", line 44, in connect
    self.pipe.connect(self.socket_path)
ConnectionRefusedError: [Errno 111] Connection refused

Unfortunately there is no way to get the version in conventional way (which is also something that the CLI should provide):

seaf-cli --version
usage: seaf-cli [-h] {init,start,stop,list,list-remote,status,download,download-by-name,sync,desync,create,config} ...
seaf-cli: error: unrecognized arguments: --version

based on my package manager on Linux, I have the following:

package version repo
seafile-client 9.0.2-2 AUR
seafile 9.0.2-2 AUR

And this is the checksum of the seaf-cli python script:

sha256sum "$(which seaf-cli)"
33ee85d850a8d55acf3f05c108b837a83fd98ce73e8a61f7c47185d0489c7b3c  /usr/bin/seaf-cli
@mmahmoudian mmahmoudian changed the title the seaf-cli status throws error The seaf-cli status throws un-catched errors Jun 16, 2023
@killing
Copy link
Member

killing commented Jun 19, 2023

The cause is that your seafile daemon is not running. This should be your local issue.

@mmahmoudian
Copy link
Author

@killing Thank you for the response.

The cause is that your seafile daemon is not running.

On the remote computer, Seafile was running and it's icon is in the system tray area. Also the daemon is running:

ps aux | \grep 'seaf'
mehrad      1646  0.2  0.2 1884256 78712 ?       Ssl  Jun09  32:12 /usr/bin/seafile-applet
mehrad      1775  0.4  0.3 1110912 122172 ?      Sl   Jun09  60:39 /usr/bin/seaf-daemon -c /home/mehrad/.ccnet -d /home/mehrad/Seafile/.seafile-data -w /home/mehrad/Seafile
mehrad    469213  0.0  0.0   6584  2424 pts/7    S+   16:38   0:00 grep seaf

This should be your local issue.

Uncatched error is not user's issue. The software should catch errors and generate proper error for the user.

@konnovdev
Copy link

konnovdev commented Jun 23, 2023

I've just faced this issue all of the sudden as well, and seaf-cli start command fixed it, so I guess in my case the daemon wasn't running. But I'm not sure why it wasn't running, I've been using seaf-cli for a few weeks and it's my first time running into this issue. I never stopped the daemon manually

I agree with @mmahmoudian, you have to show proper user messages when such errors occur, otherwise we as users are forced to waste our time on Github/Stackoverflow trying to figure out what went wrong

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants