Is there a way to get a verbose trace of what was executed on restart from configuration.yaml

I get this log in Home assistant Core logs, but it’s not useful information.

I don’t know how to troubleshoot this.

See my post at Command Line Sensor broke in 2024.7, How do I fix?

Is there a way to get a verbose traceback of where and when the comman_line command failed.

I can execute the command_trace command manually in a terminal window and it works.

I can also execute the command in a shell script from a terminal window and it works.

It just doesn’t work when called from restart in the configuration.yaml file.

[core-ssh config]$ ./comman.txt
<Reading
     xmlns="urn:ieee:std:2030.5:ns"
     href="/upt/1/mr/3/r">
    <qualityFlags>01</qualityFlags>
    <timePeriod>
        <duration>1</duration>
        <start>1720636845</start>
    </timePeriod>
    <value>20758668</value>
</Reading>
[core-ssh config]$ cat comman.txt
OPENSSL_CONF=/config/xcelcerts/myown/openssl.cnf /usr/bin/curl --ciphers ECDHE-ECDSA-AES128-CCM8 --insecure --url https://10.0.0.226:8081/upt/1/mr/3/r --cert /config/xcelcerts/myown/cert.pem --key /config/xcelcerts/myown/key.pem
[core-ssh config]$


[core-ssh config]$ OPENSSL_CONF=/config/xcelcerts/myown/openssl.cnf /usr/bin/curl --ciphers ECDHE-ECDSA-AES128-CCM8 --insecure --url https://10.0.0.226:8081/upt/1/mr/3/r --cert /config/xcelcerts/myown/cert.pem --key /config/xcelcerts/myown/key.pem
<Reading
     xmlns="urn:ieee:std:2030.5:ns"
     href="/upt/1/mr/3/r">
    <qualityFlags>01</qualityFlags>
    <timePeriod>
        <duration>1</duration>
        <start>1720719568</start>
    </timePeriod>
    <value>20779517</value>
</Reading>
[core-ssh config]$

Log Details in Homeassistant Core:

Logger: homeassistant.components.command_line.utils
Source: components/command_line/utils.py:56
integration: Command Line (documentation, issues)
First occurred: 11:37:05 AM (1030 occurrences)
Last logged: 12:06:43 PM

Command failed (with return code 1): OPENSSL_CONF=/config/xcelcerts/myown/openssl.cnf /usr/bin/curl --ciphers ECDHE-ECDSA-AES128-CCM8 --insecure --url https://10.0.0.226:8081/upt/1/mr/1/r --cert /config/xcelcerts/myown/cert.pem --key /config/xcelcerts/myown/key.pem 2>&1 | grep -o '<value>.*</value>' | grep -Eo '([+-]?[0-9]+)'
Command failed (with return code 1): OPENSSL_CONF=/config/xcelcerts/myown/openssl.cnf /usr/bin/curl --ciphers ECDHE-ECDSA-AES128-CCM8 --insecure --url https://10.0.0.226:8081/upt/1/mr/2/r --cert /config/xcelcerts/myown/cert.pem --key /config/xcelcerts/myown/key.pem 2>&1 | grep -o '<value>.*</value>' | grep -Eo '[0-9]+'
Command failed (with return code 1): OPENSSL_CONF=/config/xcelcerts/myown/openssl.cnf /usr/bin/curl --ciphers ECDHE-ECDSA-AES128-CCM8 --insecure --url https://10.0.0.226:8081/upt/1/mr/3/r --cert /config/xcelcerts/myown/cert.pem --key /config/xcelcerts/myown/key.pem 2>&1 | grep -o '<value>.*</value>' | grep -Eo '[0-9]+'

You can set the integration logging level to debug, that may reveal more information. See:

Thanks @tom_l

Command line execution do generally not print out more error information to the error channel than those single lines.
You might get a little error description in the console channel, but that channel is normally ignored when running commands in background.

I guess your issue is that you are actually not testing in the right terminal.
There is a couple of terminal addons available for HA, but they are running in their own container with their own setup.
The command line execution is running in the HA container though with its setup, so you actually need to test in this specific container.
There is a guide on how to connect to this container with a ssh connection, I do not have the link for it here, but try asking for the guide on the forum or maybe @tom_l can provide it.