pysearpc.common.SearpcError: cannot find function get_backup_status

Hi there,

since quite some time (pro-6.0.7) I see the following error, when I execute

sudo -u seafile ./seaf-backup-cmd.sh status

Traceback (most recent call last):
File “/srv/seafile/seafile-pro-server-6.1.8/seaf-backup-cmd.py”, line 50, in
args.func(args)
File “/srv/seafile/seafile-pro-server-6.1.8/seaf-backup-cmd.py”, line 11, in show_backup_status
ret_str = seafile_api.get_backup_status()
File “/srv/seafile/seafile-pro-server-6.1.8/seafile/lib64/python2.6/site-packages/seaserv/api.py”, line 919, in get_backup_status
return seafserv_threaded_rpc.get_backup_status()
File “/srv/seafile/seafile-pro-server-6.1.8/seafile/lib64/python2.6/site-packages/pysearpc/client.py”, line 112, in newfunc
return fret(ret_str)
File “/srv/seafile/seafile-pro-server-6.1.8/seafile/lib64/python2.6/site-packages/pysearpc/client.py”, line 25, in _fret_string
raise SearpcError(dicts[‘err_msg’])
pysearpc.common.SearpcError: cannot find function get_backup_status.

I am quite sure that this is not a seafile problem, but one of my environment.

here is what I am running currently:

  • seafile-pro-server_6.1.8_x86-64
  • debian stretch
  • python 2.7.9-1

It is worth mentioning, that apart from the error message when running seaf-backup-cmd.sh, everything else works. Particularly the real-time backup works (both the mysql replication, as well as the synchronisation of the data by seafile).

Nevertheless, I would like to solve this problem.

Any hint is appreciated.

Best,
Hp

I have recorded the problem. We will look at it later, probably in the next week.

any news?

I’m sorry we haven’t found time to look the problem yet. We will give it a look in this week.

@hkunz Make sure you don’t have ‘backup_url’ option under the ‘[backup]’ group in seafile.conf. Otherwise the server will think it’s the primary server and don’t export the ‘get_backup_status’ API.

I have a two seafile application servers and a third seafile server for the background tasks. The background server is also configured to sync the data for the real-time backup.

As far as I understand I have to have to backup_url option on the background server in order to serve the backups, or am I wrong. And this would also be the server on which I expect to run the seaf-backup command to check if the backups work, right?

at least this worked for me in the past.

I am confused by your suggestion, could you clarify this?

Furthermore, when I run the seaf-backup command on one of my seafile application servers (which do NOT have a backup_url setting) I get exactly the same error message.

Best,
Hp

ohhh, guys. thanks for pointing me in to right direction. after switching on my brain I realized:

  • seaf-backup.sh has to be run on the backup node (of course)
  • that I had a subtle config error on the backup server

now everything works (again)!

Many thanks,
Hp

1 Like