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

Suddenly updating target replica failed #218

Open
sabbir14 opened this issue Nov 3, 2020 · 8 comments
Open

Suddenly updating target replica failed #218

sabbir14 opened this issue Nov 3, 2020 · 8 comments

Comments

@sabbir14
Copy link

sabbir14 commented Nov 3, 2020

Hello,

I have been using your osync script for around 3 months. It was working properly. But recently I found errors in updating target replica. Syncing has been stopped due to that. I am using quicksync with minimal options as a normal user "osync". This user has full permissions on both initiator and target nodes in the syncing directory. I am attaching my output below for your kind information:

My command:
RSYNC_OPTIONAL_ARGS="--modify-window=2 --omit-dir-times" MINIMUM_SPACE=0 PRESERVE_ACL=no PRESERVE_XATTR=no SOFT_DELETE_DAYS=30 CONFLICT_BACKUP=no SOFT_MAX_EXEC_TIME=0 HARD_MAX_EXEC_TIME=0 RESUME_SYNC=no RESUME_TRY=2 REMOTE_HOST_PING=no /home/osync/osync/osync.sh --initiator="/var/web/html_new/pgw/securepay/stores" --target="ssh://[email protected]:2322//var/web/html_new/pgw/securepay/stores"

OUTPUT:

TIME: 1 - Starting synchronization task.
TIME: 1 - Creating initiator replica file list [/var/web/html_new/pgw/securepay/stores/].
TIME: 1 - Creating target replica file list [/var/web/html_new/pgw/securepay/stores/].
TIME: 1 - Creating initiator replica deleted file list.
TIME: 1 - Creating target replica deleted file list.
TIME: 1 - Updating target replica.
TIME: 2 - Updating target replica failed. Stopping execution.
TIME: 2 - Rsync output:
rsync: failed to set times on "/var/web/html_new/pgw/securepay/stores/qrmerchant/uploads/qrpdf/a2zinternational0live-qr.pdf": Operation not permitted (1)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1179) [sender=3.1.2]
TIME: 2 - osync finished with errors.

@deajan
Copy link
Owner

deajan commented Nov 3, 2020

Pretty sure you need root privileges to change file system times on files you don't own.
Can you verify permissions (and ACL permissions) on the given file ?

I also see you use --modify-window=2 rsync arg, which probably means you're using a network FS / FAT32 as target. If so, what FS is it ?

Do you use apparmor / SELinux ?

@sabbir14
Copy link
Author

sabbir14 commented Nov 4, 2020

Hii,
Thanks for your reply. I am using user "osync" in both nodes to sync. "osync" has full permission on both initiator and target directory. Without root privilege, it was working fine.
I am using xfs filesystem in both nodes.
SELinux is disabled in both nodes.
I am using your stable v1.2
This is the file permission set for "stores" directory in both nodes:

file: stores

owner: sslweb

group: pgwsslweb

flags: -s-

user::rwx
user:sslweb:rwx
user:osync:rwx
group::rwx
mask::rwx
other::---
default:user::rwx
default:user:sslweb:rwx
default:user:osync:rwx
default:group::rwx
default:mask::rwx
default:other::---

@deajan
Copy link
Owner

deajan commented Nov 4, 2020

The problem does not seem to be osync related since rsync itself cannot set permissions.

How about the specific file /var/web/html_new/pgw/securepay/stores/qrmerchant/uploads/qrpdf/a2zinternational0live-qr.pdf ?
What are it's permissions & ACL on both sides ?

@sabbir14
Copy link
Author

sabbir14 commented Nov 4, 2020

Permissions on both nodes:

file: a2zinternational0live-qr.pdf

owner: sslweb

group: pgwsslweb

user::rw-
user:sslweb:rwx
user:osync:rwx
group::rwx
mask::rwx
other::---

@deajan
Copy link
Owner

deajan commented Nov 4, 2020

Okay, to be honest, I don't have a clue, and as I said, this is not osync related.
I could have a quick supervised look on your system if you want.

@sabbir14
Copy link
Author

hii, sorry for my late reply. How can you take access on my system ? I have checked all the related permissions but did not find any clue. It would be better if you give me some suggestions on that. Thanks in advance.

@sabbir14
Copy link
Author

hii, I have just tried with another user now who has full privilege in the target. Now I am getting another error.

TIME: 1 - Starting synchronization task.
TIME: 1 - Creating initiator replica file list [/var/web/html_new/pgw/securepay/stores/].
TIME: 1 - Creating target replica file list [/var/web/html_new/pgw/securepay/stores/].
TIME: 2 - Creating initiator replica deleted file list.
TIME: 2 - Creating target replica deleted file list.
TIME: 2 - Could not prepare initiator deletion list.
TIME: 2 - Could not prepare target deletion list.
TIME: 2 - osync finished with errors.

I have configured another directory for synchronization today which is running fine. But only this directory (/var/web/html_new/pgw/securepay/stores) is not working.

@deajan
Copy link
Owner

deajan commented Dec 22, 2020

Can have a look on 28th december or somewhere that week.
Easiest to do is a teamviewer session. Better would be a ssh session, I'd give you my IP for firewall settings beforehand.

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

2 participants