jlesage / docker-jdownloader-2

Docker container for JDownloader 2
MIT License
820 stars 71 forks source link

[Bug] Reconnect script does not run #177

Closed Magisdn closed 1 year ago

Magisdn commented 1 year ago

Current Behavior

Hi! Jdownloader does not run the reconnect script Reconnect should work by running the command ssh admin@192.168.1.1 'system script run reconnect; quit' (reconnect for microtik router)

I output.log

Thread[Executer: /bin/ash ERRstreamobserver,6,main]: /bin/ash: can't open 'ssh admin@192.168.1.1 "system resource print; quit"': No such file or directory

If you install openssh client, set up key authorization between container and router from user app, then the command ssh admin@192.168.1.1 'system script run reconnect; quit' runs fine.

Expected Behavior

Running the reconnect script and changing the IP.

Steps To Reproduce

Settings -> Reconnect -> Reconnect method External batch Reconnect /bin/ash ssh admin@192.168.1.1 'system script run reconnect'

Environment

Container creation

The compose file used.

Container log

[init        ] container is starting...
[cont-env    ] loading container environment variables...
[cont-env    ] APP_NAME: loading...
[cont-env    ] DISPLAY: executing...
[cont-env    ] DISPLAY: terminated successfully.
[cont-env    ] DISPLAY: loading...
[cont-env    ] DOCKER_IMAGE_PLATFORM: loading...
[cont-env    ] DOCKER_IMAGE_VERSION: loading...
[cont-env    ] GTK2_RC_FILES: executing...
[cont-env    ] GTK2_RC_FILES: terminated successfully.
[cont-env    ] GTK2_RC_FILES: loading...
[cont-env    ] GTK_THEME: executing...
[cont-env    ] GTK_THEME: terminated successfully.
[cont-env    ] GTK_THEME: loading...
[cont-env    ] HOME: loading...
[cont-env    ] INSTALL_PACKAGES_INTERNAL: executing...
[cont-env    ] INSTALL_PACKAGES_INTERNAL: terminated successfully.
[cont-env    ] INSTALL_PACKAGES_INTERNAL: loading...
[cont-env    ] QT_STYLE_OVERRIDE: executing...
[cont-env    ] QT_STYLE_OVERRIDE: terminated successfully.
[cont-env    ] QT_STYLE_OVERRIDE: loading...
[cont-env    ] TAKE_CONFIG_OWNERSHIP: loading...
[cont-env    ] XDG_CACHE_HOME: loading...
[cont-env    ] XDG_CONFIG_HOME: loading...
[cont-env    ] XDG_DATA_HOME: loading...
[cont-env    ] XDG_RUNTIME_DIR: loading...
[cont-env    ] XDG_STATE_HOME: loading...
[cont-env    ] container environment variables initialized.
[cont-secrets] loading container secrets...
[cont-secrets] container secrets loaded.
[cont-init   ] executing container initialization scripts...
[cont-init   ] 10-certs.sh: executing...
[cont-init   ] 10-certs.sh: terminated successfully.
[cont-init   ] 10-check-app-niceness.sh: executing...
[cont-init   ] 10-check-app-niceness.sh: terminated successfully.
[cont-init   ] 10-clean-logmonitor-states.sh: executing...
[cont-init   ] 10-clean-logmonitor-states.sh: terminated successfully.
[cont-init   ] 10-clean-tmp-dir.sh: executing...
[cont-init   ] 10-clean-tmp-dir.sh: terminated successfully.
[cont-init   ] 10-fontconfig-cache-dir.sh: executing...
[cont-init   ] 10-fontconfig-cache-dir.sh: terminated successfully.
[cont-init   ] 10-init-users.sh: executing...
[cont-init   ] 10-init-users.sh: terminated successfully.
[cont-init   ] 10-nginx.sh: executing...
[cont-init   ] 10-nginx.sh: terminated successfully.
[cont-init   ] 10-openbox.sh: executing...
[cont-init   ] 10-openbox.sh: terminated successfully.
[cont-init   ] 10-pkgs-mirror.sh: executing...
[cont-init   ] 10-pkgs-mirror.sh: terminated successfully.
[cont-init   ] 10-set-tmp-dir-perms.sh: executing...
[cont-init   ] 10-set-tmp-dir-perms.sh: terminated successfully.
[cont-init   ] 10-vnc-password.sh: executing...
[cont-init   ] 10-vnc-password.sh: terminated successfully.
[cont-init   ] 10-web-data.sh: executing...
[cont-init   ] 10-web-data.sh: terminated successfully.
[cont-init   ] 10-x11-unix.sh: executing...
[cont-init   ] 10-x11-unix.sh: terminated successfully.
[cont-init   ] 10-xdg-runtime-dir.sh: executing...
[cont-init   ] 10-xdg-runtime-dir.sh: terminated successfully.
[cont-init   ] 15-cjk-font.sh: executing...
[cont-init   ] 15-cjk-font.sh: terminated successfully.
[cont-init   ] 15-install-pkgs.sh: executing...
[cont-init   ] 15-install-pkgs.sh: terminated successfully.
[cont-init   ] 55-jdownloader2.sh: executing...
[cont-init   ] 55-jdownloader2.sh: terminated successfully.
[cont-init   ] 85-take-config-ownership.sh: executing...
[cont-init   ] 85-take-config-ownership.sh: terminated successfully.
[cont-init   ] 89-info.sh: executing...
    ╭――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――╮
    │                                                                      │
    │ Application:           JDownloader 2                                 │
    │ Application Version:   n/a                                           │
    │ Docker Image Version:  23.11.1                                       │
    │ Docker Image Platform: linux/amd64                                   │
    │                                                                      │
    ╰――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――╯
[cont-init   ] 89-info.sh: terminated successfully.
[cont-init   ] all container initialization scripts executed.
[init        ] giving control to process supervisor.
[supervisor  ] loading services...
[supervisor  ] loading service 'default'...
[supervisor  ] loading service 'logmonitor'...
[supervisor  ] service 'logmonitor' is disabled.
[supervisor  ] loading service 'logrotate'...
[supervisor  ] loading service 'app'...
[supervisor  ] loading service 'gui'...
[supervisor  ] loading service 'openbox'...
[supervisor  ] loading service 'xvnc'...
[supervisor  ] loading service 'nginx'...
[supervisor  ] loading service 'certsmonitor'...
[supervisor  ] service 'certsmonitor' is disabled.
[supervisor  ] all services loaded.
[supervisor  ] starting services...
[supervisor  ] starting service 'xvnc'...
[xvnc        ] Xvnc TigerVNC 1.13.1 - built Nov 10 2023 13:14:48
[xvnc        ] Copyright (C) 1999-2022 TigerVNC Team and many others (see README.rst)
[xvnc        ] See https://www.tigervnc.org for information on TigerVNC.
[xvnc        ] Underlying X server release 12014000
[xvnc        ] Mon Nov 13 16:39:24 2023
[xvnc        ]  vncext:      VNC extension running!
[xvnc        ]  vncext:      Listening for VNC connections on /tmp/vnc.sock (mode 0660)
[xvnc        ]  vncext:      Listening for VNC connections on all interface(s), port 5900
[xvnc        ]  vncext:      created VNC server for screen 0
[supervisor  ] starting service 'openbox'...
[supervisor  ] starting service 'nginx'...
[nginx       ] Listening for HTTP connections on port 5800.
[supervisor  ] starting service 'app'...
[supervisor  ] all services started.
[xvnc        ] Mon Nov 13 16:39:45 2023
[xvnc        ]  Connections: accepted: /tmp/vnc.sock
[xvnc        ]  SConnection: Client needs protocol version 3.8
[xvnc        ]  SConnection: Client requests security type None(1)
[xvnc        ]  VNCSConnST:  Server default pixel format depth 24 (32bpp) little-endian rgb888
[xvnc        ]  VNCSConnST:  Client pixel format depth 24 (32bpp) little-endian bgr888
[xvnc        ] Mon Nov 13 16:39:46 2023
[xvnc        ]  ComparingUpdateTracker: 0 pixels in / 0 pixels out
[xvnc        ]  ComparingUpdateTracker: (1:-nan ratio)
[xvnc        ] Mon Nov 13 16:45:51 2023
[xvnc        ]  Connections: accepted: /tmp/vnc.sock
[xvnc        ]  SConnection: Client needs protocol version 3.8
[xvnc        ]  SConnection: Client requests security type None(1)
[xvnc        ]  VNCSConnST:  Server default pixel format depth 24 (32bpp) little-endian rgb888
[xvnc        ]  VNCSConnST:  Client pixel format depth 24 (32bpp) little-endian bgr888

Container inspect

[
    {
        "Id": "0e7a5cef3fd0eca505d4141451f01fff9d0ae51e8525e077dc3be699ca56bdc8",
        "Created": "2023-11-13T16:39:23.421598072Z",
        "Path": "/init",
        "Args": [],
        "State": {
            "Status": "running",
            "Running": true,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 2707323,
            "ExitCode": 0,
            "Error": "",
            "StartedAt": "2023-11-13T16:39:23.700116211Z",
            "FinishedAt": "0001-01-01T00:00:00Z"
        },
        "Image": "sha256:6d4dade069e85c33746d827a07478c0c8b9257411c57044aaed5711f0c67c2a1",
        "ResolvConfPath": "/var/lib/docker/containers/0e7a5cef3fd0eca505d4141451f01fff9d0ae51e8525e077dc3be699ca56bdc8/resolv.conf",
        "HostnamePath": "/var/lib/docker/containers/0e7a5cef3fd0eca505d4141451f01fff9d0ae51e8525e077dc3be699ca56bdc8/hostname",
        "HostsPath": "/var/lib/docker/containers/0e7a5cef3fd0eca505d4141451f01fff9d0ae51e8525e077dc3be699ca56bdc8/hosts",
        "LogPath": "/var/lib/docker/containers/0e7a5cef3fd0eca505d4141451f01fff9d0ae51e8525e077dc3be699ca56bdc8/0e7a5cef3fd0eca505d4141451f01fff9d0ae51e8525e077dc3be699ca56bdc8-json.log",
        "Name": "/jdownloader-jdownloader-2-1",
        "RestartCount": 0,
        "Driver": "overlay2",
        "Platform": "linux",
        "MountLabel": "",
        "ProcessLabel": "",
        "AppArmorProfile": "docker-default",
        "ExecIDs": null,
        "HostConfig": {
            "Binds": [
                "/data/jdownloader-2:/config:rw",
                "/data/Downloads:/output:rw"
            ],
            "ContainerIDFile": "",
            "LogConfig": {
                "Type": "json-file",
                "Config": {}
            },
            "NetworkMode": "jdownloader_default",
            "PortBindings": {
                "5800/tcp": [
                    {
                        "HostIp": "",
                        "HostPort": "5800"
                    }
                ]
            },
            "RestartPolicy": {
                "Name": "unless-stopped",
                "MaximumRetryCount": 0
            },
            "AutoRemove": false,
            "VolumeDriver": "",
            "VolumesFrom": null,
            "ConsoleSize": [
                0,
                0
            ],
            "CapAdd": null,
            "CapDrop": null,
            "CgroupnsMode": "private",
            "Dns": [],
            "DnsOptions": [],
            "DnsSearch": [],
            "ExtraHosts": [],
            "GroupAdd": null,
            "IpcMode": "private",
            "Cgroup": "",
            "Links": null,
            "OomScoreAdj": 0,
            "PidMode": "",
            "Privileged": false,
            "PublishAllPorts": false,
            "ReadonlyRootfs": false,
            "SecurityOpt": null,
            "UTSMode": "",
            "UsernsMode": "",
            "ShmSize": 67108864,
            "Runtime": "runc",
            "Isolation": "",
            "CpuShares": 0,
            "Memory": 0,
            "NanoCpus": 0,
            "CgroupParent": "",
            "BlkioWeight": 0,
            "BlkioWeightDevice": null,
            "BlkioDeviceReadBps": null,
            "BlkioDeviceWriteBps": null,
            "BlkioDeviceReadIOps": null,
            "BlkioDeviceWriteIOps": null,
            "CpuPeriod": 0,
            "CpuQuota": 0,
            "CpuRealtimePeriod": 0,
            "CpuRealtimeRuntime": 0,
            "CpusetCpus": "",
            "CpusetMems": "",
            "Devices": null,
            "DeviceCgroupRules": null,
            "DeviceRequests": null,
            "MemoryReservation": 0,
            "MemorySwap": 0,
            "MemorySwappiness": null,
            "OomKillDisable": null,
            "PidsLimit": null,
            "Ulimits": null,
            "CpuCount": 0,
            "CpuPercent": 0,
            "IOMaximumIOps": 0,
            "IOMaximumBandwidth": 0,
            "MaskedPaths": [
                "/proc/asound",
                "/proc/acpi",
                "/proc/kcore",
                "/proc/keys",
                "/proc/latency_stats",
                "/proc/timer_list",
                "/proc/timer_stats",
                "/proc/sched_debug",
                "/proc/scsi",
                "/sys/firmware"
            ],
            "ReadonlyPaths": [
                "/proc/bus",
                "/proc/fs",
                "/proc/irq",
                "/proc/sys",
                "/proc/sysrq-trigger"
            ]
        },
        "GraphDriver": {
            "Data": {
                "LowerDir": "/var/lib/docker/overlay2/bc58d40e398a38535216f4388035cd20509f8aff9eaf07a22230ab3cb115ddd5-init/diff:/var/lib/docker/overlay2/409297f267df33b3bf520b13a8fa6ef6a0f5f331641585d039b9b4a0813b1dc3/diff:/var/lib/docker/overlay2/9ed6e72ae7d8e1b57911c40abaa27690ea3e2f002eeff791d3cf4610c5d5bb26/diff:/var/lib/docker/overlay2/26c52c369e7533d9f30733766cb3a989a9369cb703a288d85de46221db234335/diff:/var/lib/docker/overlay2/6a2b0e8090bede92ce60f26a5dd941c337a85ada6f0fccd0cbde2e5d8a3aaf6f/diff:/var/lib/docker/overlay2/59071ad7687182dda3d0bb91f776507a70754f787ae4cfc351bdc12145e5d9cd/diff:/var/lib/docker/overlay2/45298a7ca75647de7d386174f5264e2eb0614fbcda0cb27e37ffd652b1d81e10/diff:/var/lib/docker/overlay2/c4f7a6f0fa37a028e0a88d77ed7fb1efcf217f0687877e6126874689c4f8861f/diff:/var/lib/docker/overlay2/3d905513b59018028f7fdd3138bba409ff9e24b555026b9fb140a3058fe44381/diff:/var/lib/docker/overlay2/e72275b91fc10ac20d33e1ba574981670d9cf8cc8923e1d08b224563dfc4ec59/diff:/var/lib/docker/overlay2/9073cfc0a49ded32fee83bddbdadac0369e21110b9f7fd9c0d0ad86df763fc58/diff:/var/lib/docker/overlay2/e083594f481677063af7d22bfd16b7ac7c6c3dbcb818a5af98d81ddbb5ce55bb/diff:/var/lib/docker/overlay2/4cdacb84666a9c1649bc850a182f8ea05611fccedf0a40f8e4f93b36dd3b2053/diff:/var/lib/docker/overlay2/ae627e3de1ce25a7f16f46defdd2ce24547876cf84e1a3f2a9ed46af11d162aa/diff:/var/lib/docker/overlay2/cef44a1f3493a38a22addc8ea61444fd318019c1b97e588d3a961a512e619274/diff:/var/lib/docker/overlay2/2318ac66440ae348d4e4f3840bd4fad7f7429365d1ca43e738dbf39af02f8dc2/diff:/var/lib/docker/overlay2/7fc393ed7e4924d27868206d28ba06ae55fb2c85eeaf1f4002d4f87c36d35e9b/diff:/var/lib/docker/overlay2/cb75167e1e49f5cc9f5d0061bff2bdc8e95f04a715091a75576325aae42a91f1/diff:/var/lib/docker/overlay2/0ee143c99eac0e664262dcace2a11bcb3e022a62d4b0dd69ade5a5f7821db1f9/diff:/var/lib/docker/overlay2/786cf9a420a46e7add606b1a49f407b32157a44b50cb0426adf80c5097a3ac4a/diff:/var/lib/docker/overlay2/16ae5a7ecea8418257d02bbbefaedd73a742fd99ce99e10f3ea25d1b9f592a1d/diff:/var/lib/docker/overlay2/15b3f0ea3dfd1bf8c94e674f8f7a2971756f871783928b69f0883c3aa0ebfa98/diff:/var/lib/docker/overlay2/c8580b4237201010fce4f0f0d7b364e3b540c5d849055da42edd2e5dbe08ca42/diff:/var/lib/docker/overlay2/7edc21d4ba4cc24254ae7ec1131ca551cff986979d4c29055bcbd1520091ae52/diff:/var/lib/docker/overlay2/099ad1ec0af9b56453ac85215bb58e97549589a416b484434aae7ab2a9d48db1/diff:/var/lib/docker/overlay2/40f9823922152bcbf8442ec3c21b7d6e7974b167c81aa619a888474fca58c2dd/diff:/var/lib/docker/overlay2/76899ada9f95ad4907936c2758ba31a7b50f6a40a6e73ec392a4b5d349fd9c3a/diff:/var/lib/docker/overlay2/06a4c8f1a983ca90d29c08ff894ddb928ff20753958c8b7e874dad4f902a5edb/diff:/var/lib/docker/overlay2/de905ca6591da0a69840f78c6635ca5121762eb0073131dc9181d21ee783ae18/diff:/var/lib/docker/overlay2/2ffcc718de0995dbd73e66b5791a410d60e0afcb895f5ee376284ac970971e88/diff:/var/lib/docker/overlay2/63a9f479911cc24bcd0097d097fe0327308d09d7fd5f627d35d31e6e12d0e2fb/diff:/var/lib/docker/overlay2/3b93e2d9e19e12ef3902611eeeff3830651620557ac73c3771686fcd844d209a/diff:/var/lib/docker/overlay2/02a9c29ce56fb4afc42536131c17e201dbf16418048370315b02d942327d4d29/diff:/var/lib/docker/overlay2/d8b684837d2db7a3a0f29ae4295e60b1b3578d7ad57f95ffa13048388cbf9d6d/diff:/var/lib/docker/overlay2/78fd2761ab4c2a4cc18d7e442c0de6626838f6ceb1ecbf8878e7c90c39ccc3ed/diff:/var/lib/docker/overlay2/291914173bef983db0cd2766100d90f0a53c9279eaa1aa7be151f9efb0db11b1/diff",
                "MergedDir": "/var/lib/docker/overlay2/bc58d40e398a38535216f4388035cd20509f8aff9eaf07a22230ab3cb115ddd5/merged",
                "UpperDir": "/var/lib/docker/overlay2/bc58d40e398a38535216f4388035cd20509f8aff9eaf07a22230ab3cb115ddd5/diff",
                "WorkDir": "/var/lib/docker/overlay2/bc58d40e398a38535216f4388035cd20509f8aff9eaf07a22230ab3cb115ddd5/work"
            },
            "Name": "overlay2"
        },
        "Mounts": [
            {
                "Type": "bind",
                "Source": "/data/jdownloader-2",
                "Destination": "/config",
                "Mode": "rw",
                "RW": true,
                "Propagation": "rprivate"
            },
            {
                "Type": "bind",
                "Source": "/data/Downloads",
                "Destination": "/output",
                "Mode": "rw",
                "RW": true,
                "Propagation": "rprivate"
            }
        ],
        "Config": {
            "Hostname": "afbf076dce3b",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": true,
            "AttachStderr": true,
            "ExposedPorts": {
                "3129/tcp": {},
                "5800/tcp": {},
                "5900/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/base/sbin:/opt/base/bin",
                "ENV=/root/.docker_rc",
                "USER_ID=1000",
                "GROUP_ID=1000",
                "SUP_GROUP_IDS=",
                "UMASK=0022",
                "LANG=en_US.UTF-8",
                "TZ=Etc/UTC",
                "KEEP_APP_RUNNING=0",
                "APP_NICENESS=0",
                "INSTALL_PACKAGES=",
                "PACKAGES_MIRROR=",
                "CONTAINER_DEBUG=0",
                "DISPLAY_WIDTH=1920",
                "DISPLAY_HEIGHT=1080",
                "DARK_MODE=0",
                "SECURE_CONNECTION=0",
                "SECURE_CONNECTION_VNC_METHOD=SSL",
                "SECURE_CONNECTION_CERTS_CHECK_INTERVAL=60",
                "WEB_LISTENING_PORT=5800",
                "VNC_LISTENING_PORT=5900",
                "VNC_PASSWORD=",
                "ENABLE_CJK_FONT=0"
            ],
            "Cmd": [
                "/init"
            ],
            "Image": "jlesage/jdownloader-2:latest",
            "Volumes": {
                "/config": {},
                "/output": {}
            },
            "WorkingDir": "/tmp",
            "Entrypoint": null,
            "OnBuild": null,
            "Labels": {
                "com.docker.compose.config-hash": "0de818b94ed7903352d0d4438d6bba1388f9761157bc55a4255841323d40dee6",
                "com.docker.compose.container-number": "1",
                "com.docker.compose.depends_on": "",
                "com.docker.compose.image": "sha256:f1b3bf3b57dbbee30e3cee81973c818d3bda5606c69086dff0fbc879d16b8bad",
                "com.docker.compose.oneoff": "False",
                "com.docker.compose.project": "jdownloader",
                "com.docker.compose.project.config_files": "/data/compose/24/docker-compose.yml",
                "com.docker.compose.project.working_dir": "/data/compose/24",
                "com.docker.compose.service": "jdownloader-2",
                "com.docker.compose.version": "2.20.2",
                "org.label-schema.description": "Docker container for JDownloader 2",
                "org.label-schema.name": "jdownloader-2",
                "org.label-schema.schema-version": "1.0",
                "org.label-schema.vcs-url": "https://github.com/jlesage/docker-jdownloader-2",
                "org.label-schema.version": "23.11.1"
            }
        },
        "NetworkSettings": {
            "Bridge": "",
            "SandboxID": "8e0bbf4f86cccba09dd4b1751222712b2174d4b426d2bf1fedb1ca50ceae2060",
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "Ports": {
                "3129/tcp": null,
                "5800/tcp": [
                    {
                        "HostIp": "0.0.0.0",
                        "HostPort": "5800"
                    },
                    {
                        "HostIp": "::",
                        "HostPort": "5800"
                    }
                ],
                "5900/tcp": null
            },
            "SandboxKey": "/var/run/docker/netns/8e0bbf4f86cc",
            "SecondaryIPAddresses": null,
            "SecondaryIPv6Addresses": null,
            "EndpointID": "",
            "Gateway": "",
            "GlobalIPv6Address": "",
            "GlobalIPv6PrefixLen": 0,
            "IPAddress": "",
            "IPPrefixLen": 0,
            "IPv6Gateway": "",
            "MacAddress": "",
            "Networks": {
                "jdownloader_default": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": [
                        "jdownloader-jdownloader-2-1",
                        "jdownloader-2",
                        "a5f9a39e79e7",
                        "afbf076dce3b",
                        "0e7a5cef3fd0"
                    ],
                    "NetworkID": "27a29e28dbca44339a95b54cc13229e15f42850b97506c38b5e9700c038b1a02",
                    "EndpointID": "4d299e09036a3ee2b66d5fae19d45239df284c0a84edb2c9ec09c80c6cd955a4",
                    "Gateway": "172.21.0.1",
                    "IPAddress": "172.21.0.2",
                    "IPPrefixLen": 16,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "MacAddress": "02:42:ac:15:00:02",
                    "DriverOpts": null
                }
            }
        }
    }
]

Anything else?

No response

jlesage commented 1 year ago

So the problem was the missing ssh binary ? You can use the INSTALL_PACKAGES variable to automatically install the required package. See https://github.com/jlesage/docker-jdownloader-2#environment-variables for more details.

Magisdn commented 1 year ago

Before that, I installed the ssh client in the container.

jlesage commented 1 year ago

Ok, so using INSTALL_PACKAGES fixes your problem ?

Magisdn commented 1 year ago

I installed the ssh slient after deploying the container and it didn't solve the problem.

jlesage commented 1 year ago

So what is the problem once the ssh client is installed ?

Magisdn commented 1 year ago

In output.log

Thread[Executer: /bin/ash ERRstreamobserver,6,main]: /bin/ash: can't open 'ssh admin@192.168.1.1 "system resource print; quit"': No such file or directory

Ssh doesn't run from jdownloader, but it runs manually from the container shell.

jlesage commented 1 year ago

In the script, did you try to use the full path to the ssh binary (e.g. /usr/bin/ssh) ?

Magisdn commented 1 year ago

1699710373323_Sat, Nov 11, 2023 13.46 +0000/jd.gui.swing.jdgui.views.settings.panels.reconnect.ReconnectDialog$1.log.0: /bin/ash: can't open '/usr/bin/ssh admin@192.168.1.1 "system resource print; quit"': No such file or directory

jlesage commented 1 year ago

Use /bin/sh as the interpreter. It worked for me.

Magisdn commented 1 year ago

From container shell manual run

/tmp $ ssh admin@192.168.1.1 "system resource print; quit"
                   uptime: 3d5h15m4s
                  version: 7.12 (stable)
               build-time: Nov/09/2023 07:45:06
         factory-software: 6.45.9
              free-memory: 51.8MiB
             total-memory: 128.0MiB
                      cpu: ARM
                cpu-count: 4
            cpu-frequency: 672MHz
                 cpu-load: 4%
           free-hdd-space: 1116.0KiB
          total-hdd-space: 15.2MiB
  write-sect-since-reboot: 6777
         write-sect-total: 228308
        architecture-name: arm
               board-name: hAP ac^2
                 platform: MikroTik

interrupted
/tmp $

Mikrotik log

Nov/14/2023 22:04:06 user admin logged in from 192.168.1.7 via ssh
Nov/14/2023 22:04:07 user admin logged out from 192.168.1.7 via ssh

But in the jdownloader log after pressing the Test button 1699988999373_Tue, Nov 14, 2023 19.09 +0000/jd.gui.swing.jdgui.views.settings.panels.reconnect.ReconnectDialog$1.log.0: /bin/sh: can't open '/usr/bin/ssh admin@192.168.1.1 "system resource print; quit"': No such file or directory

jlesage commented 1 year ago

Looks like there is a bug in JD... or at least on Linux the way the content of "batch script" is used doesn't work well. The content is passed as a single parameter to the interpreter.

I would suggest that you instead put your command in a file. For example, in /config/reconnect.sh:

#!/bin/sh
/usr/bin/ssh admin@192.168.1.1 "system resource print; quit"

Then, in JD, put this in batch script:

/config/reconnect.sh
Magisdn commented 1 year ago

/config/reconnect.sh It won't start at all. Not found in the logs

./config/reconnect.sh

1700076373524_Wed, Nov 15, 2023 19.26 +0000/jd.gui.swing.jdgui.views.settings.panels.reconnect.ReconnectDialog$1.log.0: /bin/sh: can't open './config/reconnect.sh': No such file or directory

1700076373524_Wed, Nov 15, 2023 19.26 +0000/jd.gui.swing.jdgui.views.settings.panels.reconnect.ReconnectDialog$1.log.0: /bin/sh: can't open 'ls': No such file or directory

Any command fails to start.

jlesage commented 1 year ago
'./config/reconnect.sh': No such file or directory

It should be an absolute path, without an initial dot (/config/reconnect.sh instead of ./config/reconnect.sh).

Magisdn commented 1 year ago

/config/reconnect.sh It won't start at all. Not found in the logs

jlesage commented 1 year ago

According to the log you provided, ./config/reconnect.sh was specified in JD under "Batch Script", instead of /config/reconnect.sh.

It should look like this:

image

If you want to manually execute the script, you can do:

/bin/sh /config/reconnect.sh
Magisdn commented 1 year ago

I changed the jd interface back to English and the reconnect started working. Miracle :)