acmesh-official / acmesh-official/acme.sh
truenas_ws fails on Truenas 26.0.0-BETA.3
- Lingua principale
- Shell
- Stelle
- 47.6k
- Fork
- 5.7k
- Merge medio
- 7g 1h
- PR unite (30g)
- 16
Descrizione
I've got acme.sh installed on a TrueNAS SCALE 26.0.0-BETA.3 machine, as up to date as I can get it:
```
root@truenas[~]# acme.sh --upgrade
[Thu Aug 20 23:37:53 MDT 2026] Already up to date!
[Thu Aug 20 23:37:53 MDT 2026] Upgrade successful!
```
It was installed using curl as per https://gist.github.com/SamEureka/504eb35b963bb64ec20d0e94169b497e (which I know isn't official directions, just providing my source) and successfully provisioned a new cert. I'm trying to get it added to Truenas now and... no luck.
With a freshly issued API key, I'm getting a login failure using deploy with truenas_ws:
```
root@truenas[~]# acme.sh --deploy -d MYHOSTNAME --deploy-hook truenas_ws --debug 2
[Thu Aug 20 23:39:28 MDT 2026] Let's find the script directory.
[Thu Aug 20 23:39:28 MDT 2026] _SCRIPT_='/root/.acme.sh/acme.sh'
[Thu Aug 20 23:39:28 MDT 2026] _script='/root/.acme.sh/acme.sh'
[Thu Aug 20 23:39:28 MDT 2026] _script_home='/root/.acme.sh'
[Thu Aug 20 23:39:28 MDT 2026] Using config home: /root/.acme.sh
[Thu Aug 20 23:39:28 MDT 2026] LE_WORKING_DIR='/root/.acme.sh'
https://github.com/acmesh-official/acme.sh
v3.1.5
[Thu Aug 20 23:39:28 MDT 2026] Running cmd: deploy
[Thu Aug 20 23:39:28 MDT 2026] Using config home: /root/.acme.sh
[Thu Aug 20 23:39:28 MDT 2026] default_acme_server='https://acme-v02.api.letsencrypt.org/directory'
[Thu Aug 20 23:39:28 MDT 2026] ACME_DIRECTORY='https://acme-v02.api.letsencrypt.org/directory'
[Thu Aug 20 23:39:28 MDT 2026] _ACME_SERVER_HOST='acme-v02.api.letsencrypt.org'
[Thu Aug 20 23:39:28 MDT 2026] _ACME_SERVER_PATH='directory'
[Thu Aug 20 23:39:28 MDT 2026] The domain 'MYHOSTNAME' seems to already have an ECC cert, let's use it.
[Thu Aug 20 23:39:28 MDT 2026] DOMAIN_PATH='/root/.acme.sh/MYHOSTNAME_ecc'
[Thu Aug 20 23:39:28 MDT 2026] DOMAIN_CONF='/root/.acme.sh/MYHOSTNAME_ecc/MYHOSTNAME.conf'
[Thu Aug 20 23:39:28 MDT 2026] _deployApi='/root/.acme.sh/deploy/truenas_ws.sh'
[Thu Aug 20 23:39:28 MDT 2026] _domain='MYHOSTNAME'
[Thu Aug 20 23:39:28 MDT 2026] _file_key='/root/.acme.sh/MYHOSTNAME_ecc/MYHOSTNAME.key'
[Thu Aug 20 23:39:28 MDT 2026] _file_cert='/root/.acme.sh/MYHOSTNAME_ecc/MYHOSTNAME.cer'
[Thu Aug 20 23:39:28 MDT 2026] _file_ca='/root/.acme.sh/MYHOSTNAME_ecc/ca.cer'
[Thu Aug 20 23:39:28 MDT 2026] _file_fullchain='/root/.acme.sh/MYHOSTNAME_ecc/fullchain.cer'
[Thu Aug 20 23:39:28 MDT 2026] Checking environment variables...
[Thu Aug 20 23:39:28 MDT 2026] TrueNAS protocol not set. Using 'ws'.
[Thu Aug 20 23:39:28 MDT 2026] DEPLOY_TRUENAS_HOSTNAME='localhost'
[Thu Aug 20 23:39:28 MDT 2026] DEPLOY_TRUENAS_PROTOCOL='ws'
[Thu Aug 20 23:39:28 MDT 2026] _ws_uri='ws://localhost/websocket'
[Thu Aug 20 23:39:28 MDT 2026] DEPLOY_TRUENAS_APIKEY='[hidden](please add '--output-insecure' to see this value)'
[Thu Aug 20 23:39:28 MDT 2026] Environment variables: OK
[Thu Aug 20 23:39:28 MDT 2026] Checking TrueNAS health...
[Thu Aug 20 23:39:28 MDT 2026] _ws_call arg1='system.ready'
[Thu Aug 20 23:39:28 MDT 2026] _ws_call arg2
[Thu Aug 20 23:39:28 MDT 2026] _ws_call arg3
[Thu Aug 20 23:39:28 MDT 2026] _ws_response='Failed to login: Legacy TrueNAS servers do not implement SCRAM authentication'
[Thu Aug 20 23:39:28 MDT 2026] TrueNAS is not ready.
[Thu Aug 20 23:39:28 MDT 2026] Please check environment variables DEPLOY_TRUENAS_APIKEY, DEPLOY_TRUENAS_HOSTNAME, DEPLOY_TRUENAS_PROTOCOL and DEPLOY_TRUENAS_PORT.
[Thu Aug 20 23:39:28 MDT 2026] Verify API key.
[Thu Aug 20 23:39:28 MDT 2026] Error deploying for domain: MYHOSTNAME
[Thu Aug 20 23:39:28 MDT 2026] Error encountered while deploying.
```
Looking at some previous issues and debugging steps, I've validated that `midclt` is working as (I think?) expected:
```
root@truenas[~]# midclt call system.ready
True
root@truenas[~]# midclt call system.info
{"version": "26.0.0-BETA.3", "buildtime": {"$date": 1787147346000}, "hostname": "truenas", "physmem": 14434062336, "model": "AMD Ryzen 7 255 w/ Radeon 780M Graphics", "cores": 16, "physical_cores": 8, "loadavg": [0.12060546875, 0.05908203125, 0.060546875], "uptime": "0:49:42.002668", "uptime_seconds": 2982.00266825, "system_serial": "MD507L5N25CAMLA00006", "system_product": "N5", "system_product_version": "1.0", "license": null, "boottime": {"$date": 1787288024000}, "datetime": {"$date": 1787291006000}, "timezone": "America/Denver", "system_manufacturer": "Micro Computer (HK) Tech Limited", "ecc_memory": false}
root@truenas[~]# midclt call system.version
TrueNAS-26.0.0-BETA.3
root@truenas[~]# midclt call system.product_type
COMMUNITY_EDITION
```
If I'm reading the code right, the "TrueNAS is not ready" should be coming from https://github.com/acmesh-official/acme.sh/blob/master/deploy/truenas_ws.sh#L228-L241 , but the call to `system.ready` looks like it's returning the right thing?
```
root@truenas[~]# midclt call system.ready | cat -A
True$
root@truenas[~]# echo $?
0
```
Following down the code's calls:
```
root@truenas[~]# midclt call system.general.config
{"id": 1, "ui_certificate": 1, "ui_httpsport": 443, "ui_httpsredirect": false, "ui_httpsprotocols": ["TLSv1.2", "TLSv1.3"], "ui_port": 80, "ui_address": ["0.0.0.0"], "ui_v6address": ["::"], "ui_allowlist": [], "ui_consolemsg": true, "ui_x_frame_options": "SAMEORIGIN", "kbdmap": "us", "timezone": "America/Denver", "usage_collection": true, "wizardshown": false, "usage_collection_is_set": true, "ds_auth": false, "ui_certificate_name": "truenas_default"}
root@truenas[~]# midclt call system.general.config | jq -r ."ui_certificate"."id"
jq: error (at :1): Cannot index number with string "id"
root@truenas[~]# midclt call system.general.config | jq -r '.ui_certificate'
1
```
At this point I'm not sure what's going wrong. There's clearly a difference in how it responds when I call `midclt` on the commandline vs the code. Let me know what other info I can provide?
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.