hi @peter , I’m also seeing this same issue with mender-cli using the cp command. I’m able to connect via the terminal command, port-forward etc, but cp throws a 405 and the request doesn’t seem to be hitting the machine’s client at all.
> mender-cli cp ./scripts/test/moadmin-start.original 2d204bca-518c-4a74-9ce0-b5e602890de0:/home/moadmin/testing_file -v
results in
Using configuration file: /Users/atartanian/Development/moutfitters/mo_local_kiosk/.mender-clirc
VERBOSE verbose output is ON
VERBOSE sending request:
GET /api/management/v1/deviceconnect/devices/2d204bca-518c-4a74-9ce0-b5e602890de0 HTTP/1.1
Host: hosted.mender.io
Authorization: Bearer <redacted>
VERBOSE Uploading the file to /home/moadmin/testing_file
VERBOSE sending request:
PUT //api/management/v1/deviceconnect/devices/2d204bca-518c-4a74-9ce0-b5e602890de0/upload HTTP/1.1
Host: hosted.mender.io
Authorization: Bearer <redacted>
Content-Type: multipart/form-data; boundary=d2a00a6d8fe7ea03f73d3a0cb3e5e1e3fe716b58bb7f50e8f594cd2f0ae5
Error: Received unexpected response code: 405
FAILURE: Error: <html>
<head><title>405 Not Allowed</title></head>
<body>
<center><h1>405 Not Allowed</h1></center>
<hr><center>nginx</center>
</body>
</html>
mender-connect config looks like this:
{
"ShellCommand": "/bin/sh",
"User": "root"
}
and here’s the process showing that mender-connect is running (our devices are running a minimal version of ps so I can’t use the axuw options):
root@raspberrypi4-64:/etc/mender# ps | grep mender
632 root 1652m S /usr/bin/mender --no-syslog daemon
633 root 1565m S /usr/bin/mender-connect daemon
62469 root 2960 S grep mender
any help would be much appreciated!
EDIT: I’ve also found that downloading files doesn’t work either, but throws a 404 File Not Found on Device
> mender-cli cp 2d204bca-518c-4a74-9ce0-b5e602890de0:/home/moadmin/moadmin-start ./isItWorking -v
Using configuration file: /Users/atartanian/Development/moutfitters/mo_local_kiosk/.mender-clirc
VERBOSE verbose output is ON
VERBOSE sending request:
GET /api/management/v1/deviceconnect/devices/2d204bca-518c-4a74-9ce0-b5e602890de0 HTTP/1.1
Host: hosted.mender.io
Authorization: Bearer <redacted>
VERBOSE sending request:
GET //api/management/v1/deviceconnect/devices/2d204bca-518c-4a74-9ce0-b5e602890de0/download?path=%2Fhome%2Fmoadmin%2Fmoadmin-start HTTP/1.1
Host: hosted.mender.io
Authorization: Bearer <redacted>
VERBOSE Response:
HTTP/1.1 404 Not Found
Content-Length: 54
Connection: keep-alive
Content-Type: application/json
Date: Fri, 31 May 2024 19:20:45 GMT
Referrer-Policy: no-referrer
Server: nginx
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
X-Content-Type-Options: nosniff
X-Xss-Protection: 1; mode=block
{"error": {"status_code": 404,"message": "Not Found"}}
File not found on the device
FAILURE: Error: {"error": {"status_code": 404,"message": "Not Found"}}