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

SSH communication between ocrd-manager and ocrd-controller fails #13

Closed
SvenMarcus opened this issue May 9, 2022 · 4 comments · Fixed by #23 or #45
Closed

SSH communication between ocrd-manager and ocrd-controller fails #13

SvenMarcus opened this issue May 9, 2022 · 4 comments · Fixed by #23 or #45

Comments

@SvenMarcus
Copy link
Collaborator

It seems there is still an SSH key issue with ocrd-manager and ocrd-controller.
When executing the script step from Kitodo, the ocrd-manager logs show the following:

May  9 06:38:06 ocrd-manager for_production.sh: running with 3 26 /data/3 deu Fraktur ocr.sh CONTROLLER=ocrd-controller:22
May  9 06:38:06 ocrd-manager for_production.sh: '/data/3/images' -> 'ocr-d//data/3'
May  9 06:38:06 ocrd-manager for_production.sh: '/data/3/images/FILE_0010_ORIGINAL.jpg' -> 'ocr-d//data/3/FILE_0010_ORIGINAL.jpg'
May  9 06:38:06 ocrd-manager for_production.sh: '/data/3/images/FILE_0011_ORIGINAL.jpg' -> 'ocr-d//data/3/FILE_0011_ORIGINAL.jpg'
May  9 06:38:06 ocrd-manager for_production.sh: '/data/3/images/FILE_0012_ORIGINAL.jpg' -> 'ocr-d//data/3/FILE_0012_ORIGINAL.jpg'
May  9 06:38:06 ocrd-manager for_production.sh: '/data/3/images/FILE_0013_ORIGINAL.jpg' -> 'ocr-d//data/3/FILE_0013_ORIGINAL.jpg'
May  9 06:38:06 ocrd-manager for_production.sh: '/data/3/images/FILE_0014_ORIGINAL.jpg' -> 'ocr-d//data/3/FILE_0014_ORIGINAL.jpg'
May  9 06:38:06 ocrd-manager for_production.sh: async mode - exit and signal end of processing using active mq client
May  9 06:38:06 ocrd-manager for_production.sh: Warning: Permanently added the ECDSA host key for IP address '172.19.0.5' to the list of known hosts.#015
May  9 06:38:06 ocrd-manager for_production.sh: Permission denied, please try again.#015
May  9 06:38:06 ocrd-manager for_production.sh: Permission denied, please try again.#015
May  9 06:38:06 ocrd-manager for_production.sh: ocrd@ocrd-controller: Permission denied (publickey,password).#015
@markusweigelt
Copy link
Collaborator

@SvenMarcus Thx i will check the permissions

May  9 06:38:06 ocrd-manager for_production.sh: Warning: Permanently added the ECDSA host key for IP address '172.19.0.5' to the list of known hosts.#015

Last week i changed the behavior so that the ip is added to the known host. Is the ocrd manager submodule up to date?

@SvenMarcus
Copy link
Collaborator Author

SvenMarcus commented May 27, 2022

We still got this error with the version from May 24th

Warning: Permanently added the ECDSA host key for IP address '172.19.0.5' to the list of known hosts.#015
Permission denied, please try again.#015
Permission denied, please try again.#015
ocrd@ocrd-controller: Permission denied (publickey,password).#015

Adding -i ~/.ssh/id_rsa in /usr/bin/ocr.sh in the ocrd-manager solves the issue.

ocrd_exec () {
    logger -p user.info -t $TASK "execute commands via ssh by the controller"
    {
        echo "set -e"
        for param in "$@"
        do
            $param
        done
    } | ssh -i ~/.ssh/id_rsa -T -p "${CONTROLLERPORT}" ocrd@${CONTROLLERHOST} 2>&1 | logger -p user.info -t $TASK
}

@bertsky
Copy link
Member

bertsky commented May 27, 2022

Adding -i ~/.ssh/id_rsa in /usr/bin/ocr.sh in the ocrd-manager solves the issue.

That's odd. This is already the default search path for the OpenSSH client! (See IdentityFile in man ssh_config.)

The only relevant difference between the default and the CLI setting may be the time at which ~ is expanded: Perhaps it can be resolved to / by the shell correctly, but not by ssh?

@markusweigelt markusweigelt linked a pull request Jun 24, 2022 that will close this issue
@bertsky
Copy link
Member

bertsky commented Aug 26, 2022

Still seems to be broken, says @SvenMarcus

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

Successfully merging a pull request may close this issue.

3 participants