I get socket error even though I only use CLI!

Hi,

I searched everywhere and I couldn’t find and answer.

I have simply installed cardano-cli, and I want to build and then sign a transaction to withdraw rewards.

Just at the first step when building transaction, I get this error: Missing: —socketpath SOCKET_PATH. But I am not running a node! Can I just build and sign a transaction?

This I get when I follow withdrawal instructions with babbage, but when I try shelley (with old instructions) I don’t get it, but when submitting transaction there is this error:

Command failed: transaction submit Error: Failed to decode the ledger’s CDDL serialisation format. TextEnvelopeCddl error: x.signed: Could not JSON decode TextEnvelopeCddl file at: x.signed Error: Unexpected “\194\160 \194\160 "type": "Witnessed Tx Sh”, expecting record key literal or }

I am sure that the stake.skey is correct.

Any help? Thank you!

1 Like

cardano-cli transaction build requires a connection to the node, to confirm a balanced transaction… while cardano-cli transaction build-raw does not, since that subcommand doesn’t balance anything & therefore doesn’t need access to the network.

This understandable limitation was still publicly undocumented in 2022 and still might be so today; first reported & discussed here:

Soon afterward I wrote a blurb here about when you might want to use one subcommand & when the other… especially with respect to whether or not your operating environment is secure enough to handle the signing key:

Secure Transaction Workflow > FAQ > Why can’t I use cardano-cli transaction build?

1 Like

Thank you that answers my question. What about build-raw, because babbage doesn’t allow build-raw, you think my rewards withdrawal is being rejected because it’s Shelley? Or Shelley is still supposed to work? Logically, since I have the very last cardano-cli installed, and I still can use build-raw and sign transactions, I suppose the error doesn’t come from the fact that Shelley is “deprecated”, but should still work!

It sounds like you have everything you need, though I don’t know what you mean by this statement. The build-raw subcommand has worked from the beginning, including the Babbage ledger era:

$ cardano-cli babbage transaction build-raw
Usage: cardano-cli babbage transaction build-raw 
... options, etc. ...

For a comprehensive review of how to use the CLI, including details about reward withdrawal, you can use the pages here (relatively new, within the last year):

1 Like

Thank you, you are right, I didn’t see “build-raw” in the list of commands with babbage but it’s there

1 Like