haiwen / seafile-client

Seafile desktop client.
http://seafile.com
Apache License 2.0
471 stars 279 forks source link

seaf-cli status fails with traceback #1162

Open gschintgen opened 5 years ago

gschintgen commented 5 years ago

Hi, I couldn't get seaf-cli to work as intended. It fails rather hard with some uncaught error(s):

root@seafcli-backup:~# mkdir seafile-client
root@seafcli-backup:~# seaf-cli init -d seafile-client
Writen seafile data directory /root/seafile-client/seafile-data to /root/.ccnet/seafile.ini
root@seafcli-backup:~# seaf-cli status
New device id created
Traceback (most recent call last):
  File "/usr/bin/seaf-cli", line 866, in <module>
    main()
  File "/usr/bin/seaf-cli", line 862, in main
    args.func(args)
  File "/usr/bin/seaf-cli", line 660, in seaf_status
    tasks = seafile_rpc.get_clone_tasks()
  File "/usr/lib/python2.7/dist-packages/pysearpc/client.py", line 110, in newfunc
    ret_str = self.call_remote_func_sync(fcall_str)
  File "/usr/lib/python2.7/dist-packages/pysearpc/named_pipe.py", line 82, in call_remote_func_sync
    self.transport.connect()
  File "/usr/lib/python2.7/dist-packages/pysearpc/named_pipe.py", line 44, in connect
    self.pipe_fd.connect(self.socket_path)
  File "/usr/lib/python2.7/socket.py", line 228, in meth
    return getattr(self._sock,name)(*args)
socket.error: [Errno 2] No such file or directory
root@seafcli-backup:~# seaf-cli start
Starting seafile daemon ...
Started: seafile daemon ...
root@seafcli-backup:~# seaf-cli status
Traceback (most recent call last):
  File "/usr/bin/seaf-cli", line 866, in <module>
    main()
  File "/usr/bin/seaf-cli", line 862, in main
    args.func(args)
  File "/usr/bin/seaf-cli", line 660, in seaf_status
    tasks = seafile_rpc.get_clone_tasks()
  File "/usr/lib/python2.7/dist-packages/pysearpc/client.py", line 110, in newfunc
    ret_str = self.call_remote_func_sync(fcall_str)
  File "/usr/lib/python2.7/dist-packages/pysearpc/named_pipe.py", line 82, in call_remote_func_sync
    self.transport.connect()
  File "/usr/lib/python2.7/dist-packages/pysearpc/named_pipe.py", line 44, in connect
    self.pipe_fd.connect(self.socket_path)
  File "/usr/lib/python2.7/socket.py", line 228, in meth
    return getattr(self._sock,name)(*args)
socket.error: [Errno 2] No such file or directory

Do note that:

I did not ask in the forums first because in my opinion this is clearly a bug: following the official documentation should not result in uncaught exceptions with python tracebacks.

Any help/workaround/fix would be much appreciated.

gschintgen commented 5 years ago

Oops, I noticed that status should only be called after giving a download or sync command. I'll try that now (and I'm optimistic that it will actually work), but still: a basic status command should always work. So for now I'm leaving this issue open.

ukos-git commented 5 years ago

That Info was really helpful. There should be a proper error/status message here.