Deleted files and debug logging

Dear all,
I’m randomly getting files deleted from one of my community edition servers.
The is os Ubuntu 18.04
Seafile server latest edition
Seafile clients on Android p
Windows clients on win 10
All devices are fully patched.

How do I turn on debug logging so I can try to trace the issues. They occur randomly sometimes a few weeks apart so having logging to the screen is not an option.

It looks to be with files which were recently modified or created, so I’m wondering if is down to a sync issue. I.e if the sync fails seafile takes this as a delete command. I will know more when I can view the logs. The best I have is an Apache server acting as a proxy but depending on the client you can’t tell the operation

How do I enable logging to allow me to see the operations a client is carrying out, and which client is responsible.

Kind regards
Andrew

You can look for deleted logs in the seafile log file or in the Activity table or FileUpdate table in the seahub_db database

trouble is there is very little in seafile.log, below is for the last week, how do i turn on debugging so i can see more

[08/20/2019 06:30:24 PM] Disconnected from daemon
[08/20/19 18:31:19] http-server.c(175): fileserver: worker_threads = 10
[08/20/19 18:31:19] http-server.c(190): fileserver: fixed_block_size = 8388608
[08/20/19 18:31:19] http-server.c(205): fileserver: web_token_expire_time = 3600
[08/20/19 18:31:19] http-server.c(220): fileserver: max_indexing_threads = 1
[08/20/19 18:31:19] http-server.c(235): fileserver: max_index_processing_threads= 3
[08/20/19 18:31:19] http-server.c(257): fileserver: cluster_shared_temp_file_mode = 600
[08/20/2019 06:31:19 PM] …/common/mq-mgr.c(54): [mq client] mq cilent is started
[08/24/19 01:11:03] http-server.c(175): fileserver: worker_threads = 10
[08/24/19 01:11:03] http-server.c(190): fileserver: fixed_block_size = 8388608
[08/24/19 01:11:03] http-server.c(205): fileserver: web_token_expire_time = 3600
[08/24/19 01:11:03] http-server.c(220): fileserver: max_indexing_threads = 1
[08/24/19 01:11:03] http-server.c(235): fileserver: max_index_processing_threads= 3
[08/24/19 01:11:03] http-server.c(257): fileserver: cluster_shared_temp_file_mode = 600
[08/24/2019 01:11:03 AM] …/common/mq-mgr.c(54): [mq client] mq cilent is started
[08/26/19 12:46:33] http-server.c(175): fileserver: worker_threads = 10
[08/26/19 12:46:33] http-server.c(190): fileserver: fixed_block_size = 8388608
[08/26/19 12:46:33] http-server.c(205): fileserver: web_token_expire_time = 3600
[08/26/19 12:46:33] http-server.c(220): fileserver: max_indexing_threads = 1
[08/26/19 12:46:33] http-server.c(235): fileserver: max_index_processing_threads= 3
[08/26/19 12:46:33] http-server.c(257): fileserver: cluster_shared_temp_file_mode = 600
[08/26/2019 12:46:33 PM] …/common/mq-mgr.c(54): [mq client] mq cilent is started

I also tried looking in the DB and tables don’t exist
mysql> show tables;
±------------------------------------------+
| Tables_in_seahub-db |
±------------------------------------------+
| admin_log_adminlog |
| api2_token |
| api2_tokenv2 |
| auth_group |
| auth_group_permissions |
| auth_permission |
| auth_user |
| auth_user_groups |
| auth_user_user_permissions |
| avatar_avatar |
| avatar_groupavatar |
| base_clientlogintoken |
| base_commandslastcheck |
| base_devicetoken |
| base_filecomment |
| base_filediscuss |
| base_groupenabledmodule |
| base_innerpubmsg |
| base_innerpubmsgreply |
| base_userenabledmodule |
| base_userlastlogin |
| base_userstarredfiles |
| captcha_captchastore |
| constance_config |
| contacts_contact |
| django_cas_ng_proxygrantingticket |
| django_cas_ng_sessionticket |
| django_content_type |
| django_migrations |
| django_session |
| drafts_draft |
| drafts_draftreviewer |
| file_tags_filetags |
| group_groupmessage |
| group_messageattachment |
| group_messagereply |
| group_publicgroup |
| institutions_institution |
| institutions_institutionadmin |
| institutions_institutionquota |
| invitations_invitation |
| notifications_notification |
| notifications_usernotification |
| options_useroptions |
| organizations_orgmemberquota |
| organizations_orgsettings |
| post_office_attachment |
| post_office_attachment_emails |
| post_office_email |
| post_office_emailtemplate |
| post_office_log |
| profile_detailedprofile |
| profile_profile |
| registration_registrationprofile |
| related_files_relatedfiles |
| repo_tags_repotags |
| revision_tag_revisiontags |
| revision_tag_tags |
| role_permissions_adminrole |
| share_anonymousshare |
| share_extragroupssharepermission |
| share_extrasharepermission |
| share_fileshare |
| share_orgfileshare |
| share_privatefiledirshare |
| share_uploadlinkshare |
| social_auth_usersocialauth |
| sysadmin_extra_userloginlog |
| tags_filetag |
| tags_fileuuidmap |
| tags_tags |
| termsandconditions_termsandconditions |
| termsandconditions_usertermsandconditions |
| trusted_ip_trustedip |
| two_factor_phonedevice |
| two_factor_staticdevice |
| two_factor_statictoken |
| two_factor_totpdevice |
| wiki_groupwiki |
| wiki_personalwiki |
| wiki_wiki |
±------------------------------------------+

On the following link i found
https://download.seafile.com/published/seafile-manual/security/auditing.md

[Audit]

Audit log is disabled default.

Leads to additional SQL tables being filled up, make sure your SQL server is able to handle it.

enabled = true

in controller.log

tail -f controller.log
[08/27/19 16:59:19] seafile-controller.c(79): spawn_process: /usr/bin/python2.7 -m seafevents.main --config-file /opt/seafile/conf/seafevents.conf --logfile /opt/seafile/logs/seafevents.log -P /opt/seafile/pids/seafevents.pid
[08/27/19 16:59:19] seafile-controller.c(94): spawned /usr/bin/python2.7, pid 25245
[08/27/19 16:59:29] seafile-controller.c(453): pid file /opt/seafile/pids/seafevents.pid does not exist
[08/27/19 16:59:29] seafile-controller.c(486): seafevents need restart…
[08/27/19 16:59:29] seafile-controller.c(79): spawn_process: /usr/bin/python2.7 -m seafevents.main --config-file /opt/seafile/conf/seafevents.conf --logfile /opt/seafile/logs/seafevents.log -P /opt/seafile/pids/seafevents.pid
[08/27/19 16:59:29] seafile-controller.c(94): spawned /usr/bin/python2.7, pid 25246
[08/27/19 16:59:39] seafile-controller.c(453): pid file /opt/seafile/pids/seafevents.pid does not exist
[08/27/19 16:59:39] seafile-controller.c(486): seafevents need restart…
[08/27/19 16:59:39] seafile-controller.c(79): spawn_process: /usr/bin/python2.7 -m seafevents.main --config-file /opt/seafile/conf/seafevents.conf --logfile /opt/seafile/logs/seafevents.log -P /opt/seafile/pids/seafevents.pid
[08/27/19 16:59:39] seafile-controller.c(94): spawned /usr/bin/python2.7, pid 25251
[08/27/19 16:59:49] seafile-controller.c(453): pid file /opt/seafile/pids/seafevents.pid does not exist
[08/27/19 16:59:49] seafile-controller.c(486): seafevents need restart…
[08/27/19 16:59:49] seafile-controller.c(79): spawn_process: /usr/bin/python2.7 -m seafevents.main --config-file /opt/seafile/conf/seafevents.conf --logfile /opt/seafile/logs/seafevents.log -P /opt/seafile/pids/seafevents.pid
[08/27/19 16:59:49] seafile-controller.c(94): spawned /usr/bin/python2.7, pid 25253

if i run the python code by hand with
/usr/bin/python2.7 -m seafevents.main --config-file /opt/seafile/conf/seafevents.conf --logfile /opt/seafile/logs/seafevents.log

i get
/usr/bin/python2.7: No module named seafevents

I’m pretty sure those logs only appear in the pro edition…

I think your right. So on the community edition how do I track the issue down ?

With out the simple capability trace an issue I have no options but to migrate to another product.

Are any seafile representatives here. How can debugging be enabled so I can atleast see in a text file activity in order to trace an issue.

I take it seafile no longer take part in the form ? i.e leaving the community users to fix their own issues.

@AndrewW I am not from Seafile, but we are a Seafile partner. In this capacity, let me say this:
On one hand, I am sorry that you encounter these issues. On the other, I am frustrated about your attitude. Seafile Community is a very robust software. It runs without problems on thousands of machines. So it is quite likely that the problem you observe is limited to your machine. Hence, the onus of figuring the problem out is on you. Moreover, Seafile CE is open-source software provided to you free of charge. You are using this product all the while critizing those that made it possible for you to use it. This is not only ungrateful but arrogant.

If the forum does not provide the assistance you need, you can choose to do what every other professional customer in need of help would do: You make use of the professional, but not free of charge support provided by Seafile itself and its partners (such as us, datamate).

Rdb, Thank you for your reply, firstly let me apologise if my frustration was taken the wrong way. I work a lot with open source, which seafile claims to be. The usual requirement when logging bugs is to provide lots of evidence to assist the developers. Hence the log data request. As it happens I think I have found a bug in very specific scenarios, but want to carry out some further research before logging a bug . I do not agree with your statement “the onus of figuring the problem out is on you” this is what is so great about the community, every one helps each other. Sadly the community for seafile to me does not appear as large as it used to be, and seafile no longer appear to take part encouraging community growth. This is a real shame as from your last statement if you want support you need to purchase a contract, is a long way from community. Lastly I don’t recall criticising, those who made it possible (again apologies if it came across that way), simply a concern about data loss in very specific scenarios and the lack of community. If I have found a bug by reporting it and potentially getting involved in the fix I have been part of the community, and also helped the pro users.

1 Like