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

Cannot sync with config file #193

Open
klinquist opened this issue Apr 30, 2020 · 5 comments
Open

Cannot sync with config file #193

klinquist opened this issue Apr 30, 2020 · 5 comments
Labels

Comments

@klinquist
Copy link

Describe the bug
Unable to sync with config file.

To Reproduce
Setup: Mac -> Mac.

What works fine:

osync.sh --initiator='~/code' --target="ssh://kris@IP_ADDRESS//Users/kris/code" --rsakey=~/.ssh/id_ed25519

What does not work fine:

osync.sh osync.conf with the following config file (first 25 lines to be consise)

###### osync - Rsync based two way sync engine with fault tolerance
###### (C) 2013-2019 by Orsiris de Jong (www.netpower.fr)

[GENERAL]
CONFIG_FILE_REVISION=1.3.0

## Sync job identification
INSTANCE_ID="codesync"

## Directories to synchronize.
## Initiator is the system osync runs on. The initiator directory must be a local path.
INITIATOR_SYNC_DIR="/Users/kris/code"

## Target is the system osync synchronizes to (can be the same system as the initiator in case of local sync tasks). The target directory can be a local or remote path.

TARGET_SYNC_DIR="ssh://kris@IP_ADDRESS//Users/kris/code"

## If the target system is remote, you can specify a RSA key (please use full path). If not defined, the default ~/.ssh/id_rsa will be used. See documentation for further information.
SSH_RSA_PRIVATE_KEY="/Users/kris/.ssh/id_ed25519"

## Alternatively, you may specify an SSH password file (less secure). Needs sshpass utility installed.
SSH_PASSWORD_FILE=""

## When using ssh filter, you must specify a remote token matching the one setup in authorized_keys
#_REMOTE_TOKEN=SomeAlphaNumericToken9

Results of _DEBUG=yes osync.sh osync.conf:

$ _DEBUG=yes osync.sh osync.conf
TIME: 0 - Script begin, logging to [/Users/kris/osync.codesync.log].
\e[45m/!\ ERROR in /usr/local/bin/osync.sh: Near line 1060, exit code 1\e[0m
\e[45m/!\ ERROR in /usr/local/bin/osync.sh: Near line 1047, exit code 1\e[0m
TIME: 0 - Local OS: [Darwin Kernel Version 19.4.0: Wed Mar  4 22:28:40 PST 2020; root:xnu-6153.101.6~15/RELEASE_X86_64].
TIME: 0 - -------------------------------------------------------------
TIME: 0 - Thu Apr 30 15:11:38 PDT 2020 - osync 1.2 script begin.
TIME: 0 - -------------------------------------------------------------
TIME: 0 - Sync task [codesync] launched as [email protected] (PID 11686)
TIME: 0 - Remote OS: [Darwin Kernel Version 19.4.0: Wed Mar  4 22:28:40 PST 2020; root:xnu-6153.101.6~15/RELEASE_X86_64 ( )].
TIME: 0 - Disabling compression skips on synchronization on [MacOSX] due to lack of support.
TIME: 0 - Checking minimum disk space in local replica [/Users/kris/code/].
\e[45m/!\ ERROR in /usr/local/bin/osync.sh: Near line 1978, exit code 1\e[0m
TIME: 0 - \e[1;33;41mFailed to check remote replica.\e[0m
sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
\e[45m/!\ ERROR in /usr/local/bin/osync.sh: Near line 709, exit code 1\e[0m
TIME: 0 - WaitForTaskCompletion called by [CheckReplicas] finished monitoring [11726] with exitcode [1].
\e[45m/!\ ERROR in /usr/local/bin/osync.sh: Near line 2198, exit code 1\e[0m
TIME: 0 - \e[1;33;41mCancelling task.\e[0m
TIME: 0 - \e[91mosync finished with errors.\e[0m
TIME: 0 - Debug mode, no alert mail will be sent.
@klinquist
Copy link
Author

Different line numbers, also errors using "master" branch.

TIME: 0 - Script begin, logging to [/Users/kris/osync.codesync.log].
TIME: 0 - \e[33mThis is an unstable dev build [2020042901]. Please use with caution.\e[0m
\e[45m/!\ ERROR in /usr/local/bin/osync.sh: Near line 1383, exit code 1\e[0m
\e[45m/!\ ERROR in /usr/local/bin/osync.sh: Near line 1368, exit code 1\e[0m
TIME: 0 - Local OS: [Darwin Kernel Version 19.4.0: Wed Mar  4 22:28:40 PST 2020; root:xnu-6153.101.6~15/RELEASE_X86_64 ( ) 64-bit Unix].
\e[45m/!\ ERROR in /usr/local/bin/osync.sh: Near line 293, exit code 1\e[0m
TIME: 0 - -------------------------------------------------------------
TIME: 0 - Fri May  1 10:35:11 PDT 2020 - osync 1.3.0-rc1 script begin.
TIME: 0 - -------------------------------------------------------------
TIME: 0 - Sync task [codesync] launched as [email protected] (PID 91156)
TIME: 1 - Remote OS: [Darwin Kernel Version 19.4.0: Wed Mar  4 22:28:40 PST 2020; root:xnu-6153.101.6~15/RELEASE_X86_64 ( ) 64-bit Unix].
TIME: 1 - Disabling compression skips on synchronization on [MacOSX] due to lack of support.
TIME: 1 - ExecTask running for pids [91242 91243].
TIME: 1 - _ExecTasksPidsCheck called by [CheckReplicas] finished monitoring pid [91242] with exitcode [0].
TIME: 1 - ExecTask running for pids [91243].
\e[45m/!\ ERROR in /usr/local/bin/osync.sh: Near line 2530, exit code 1\e[0m
TIME: 1 - \e[1;33;41mFailed to check remote replica.\e[0m
sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
\e[45m/!\ ERROR in /usr/local/bin/osync.sh: Near line 986, exit code 1\e[0m
TIME: 1 - \e[91m_ExecTasksPidsCheck called by [CheckReplicas] finished monitoring pid [91243] with exitcode [1].\e[0m
\e[45m/!\ ERROR in /usr/local/bin/osync.sh: Near line 2807, exit code 1\e[0m
TIME: 1 - \e[1;33;41mCancelling task.\e[0m
TIME: 1 - \e[91mosync finished with errors.\e[0m
TIME: 1 - Debug mode, no alert mail will be sent.

@deajan
Copy link
Owner

deajan commented May 3, 2020

Sorry, I have no Mac currently to have that tested.
Would you mind giving me the (filtered) output file generated by the following command line ?

_DEBUG=true sh -x osync.sh --initiator='~/code' --target="ssh://kris@IP_ADDRESS//Users/kris/code" --rsakey=~/.ssh/id_ed25519 > output 2>&1

@klinquist
Copy link
Author

output.txt

First few thousand lines...

@deajan
Copy link
Owner

deajan commented May 4, 2020

Hmmm... The output.txt file does not contain the prior errors (except of the first ones which are pretty normal while trying to guess host OS).

I'll have a hard time getting to diagnose this without a Mac, which I won't invest into.
Is there any VM image or "cloud mac" or whatever you could recommend to have a test environment mac ?

@deajan deajan added the wontfix label Jun 26, 2020
@deajan
Copy link
Owner

deajan commented Jun 26, 2020

Can't fix that one without a mac VM.

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

No branches or pull requests

2 participants