I am trying to run the following -

cleos get transaction c96905dee9a9652c8190f2d2bd5221bb0ac65a06b4381451107221c1076c91a8

I get this -

Error 3200006: invalid http request
Error Details:
The server has rejected the request as invalid!
Please verify this url is valid: http://nodeosd:8888/v1/history/get_transaction
If the condition persists, please contact the RPC server administrator for nodeosd!

Has anyone any idea the cause of this error?

I have this running for nodeos -

[
    {
        "Id": "fd96eb220dc3e20fe8b3779caea38a1653814b97ad16083520bf26d40580586a",
        "Created": "2018-08-09T14:15:09.544844011Z",
        "Path": "/opt/eosio/bin/nodeosd.sh",
        "Args": [
            "--data-dir",
            "/opt/eosio/bin/data-dir",
            "-e",
            "--http-alias=nodeosd:8888",
            "--http-alias=127.0.0.1:8888",
            "--http-alias=localhost:8888",
            "--plugin",
            "eosio::chain_plugin",
            "--plugin",
            "eosio::mongo_db_plugin",
            "--plugin",
            "eosio::history_plugin",
            "--plugin",
            "eosio::chain_plugin",
            "--plugin",
            "eosio::http_plugin"
        ],
        "State": {
            "Status": "running",
            "Running": true,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 15464,
            "ExitCode": 0,
            "Error": "",
            "StartedAt": "2018-08-09T14:15:11.902978386Z",
            "FinishedAt": "0001-01-01T00:00:00Z"
        },
        "Image": "sha256:95dcdb9913215add708cccb029512043fc0b3189c0fd8ae7cb234ccdf276524b",
        "ResolvConfPath": "/var/lib/docker/containers/fd96eb220dc3e20fe8b3779caea38a1653814b97ad16083520bf26d40580586a/resolv.conf",
        "HostnamePath": "/var/lib/docker/containers/fd96eb220dc3e20fe8b3779caea38a1653814b97ad16083520bf26d40580586a/hostname",
        "HostsPath": "/var/lib/docker/containers/fd96eb220dc3e20fe8b3779caea38a1653814b97ad16083520bf26d40580586a/hosts",
        "LogPath": "/var/lib/docker/containers/fd96eb220dc3e20fe8b3779caea38a1653814b97ad16083520bf26d40580586a/fd96eb220dc3e20fe8b3779caea38a1653814b97ad16083520bf26d40580586a-json.log",
        "Name": "/docker_nodeosd_1",
        "RestartCount": 0,
        "Driver": "overlay2",
        "Platform": "linux",
        "MountLabel": "",
        "ProcessLabel": "",
        "AppArmorProfile": "docker-default",
        "ExecIDs": null,
        "HostConfig": {
            "Binds": [
                "nodeos-data-volume:/opt/eosio/bin/data-dir:rw"
            ],
            "ContainerIDFile": "",
            "LogConfig": {
                "Type": "json-file",
                "Config": {}
            },
            "NetworkMode": "docker_default",
            "PortBindings": {
                "8888/tcp": [
                    {
                        "HostIp": "",
                        "HostPort": "8888"
                    }
                ],
                "9876/tcp": [
                    {
                        "HostIp": "",
                        "HostPort": "9876"
                    }
                ]
            },
            "RestartPolicy": {
                "Name": "",
                "MaximumRetryCount": 0
            },
            "AutoRemove": false,
            "VolumeDriver": "",
            "VolumesFrom": [],
            "CapAdd": [
                "IPC_LOCK"
            ],
            "CapDrop": null,
            "Dns": null,
            "DnsOptions": null,
            "DnsSearch": null,
            "ExtraHosts": null,
            "GroupAdd": null,
            "IpcMode": "shareable",
            "Cgroup": "",
            "Links": null,
            "OomScoreAdj": 0,
            "PidMode": "",
            "Privileged": false,
            "PublishAllPorts": false,
            "ReadonlyRootfs": false,
            "SecurityOpt": null,
            "UTSMode": "",
            "UsernsMode": "",
            "ShmSize": 67108864,
            "Runtime": "runc",
            "ConsoleSize": [
                0,
                0
            ],
            "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,
            "DiskQuota": 0,
            "KernelMemory": 0,
            "MemoryReservation": 0,
            "MemorySwap": 0,
            "MemorySwappiness": null,
            "OomKillDisable": false,
            "PidsLimit": 0,
            "Ulimits": null,
            "CpuCount": 0,
            "CpuPercent": 0,
            "IOMaximumIOps": 0,
            "IOMaximumBandwidth": 0,
            "MaskedPaths": [
                "/proc/acpi",
                "/proc/kcore",
                "/proc/keys",
                "/proc/latency_stats",
                "/proc/timer_list",
                "/proc/timer_stats",
                "/proc/sched_debug",
                "/proc/scsi",
                "/sys/firmware"
            ],
            "ReadonlyPaths": [
                "/proc/asound",
                "/proc/bus",
                "/proc/fs",
                "/proc/irq",
                "/proc/sys",
                "/proc/sysrq-trigger"
            ]
        },
        "GraphDriver": {
            "Data": {
                "LowerDir": "/var/lib/docker/overlay2/720a47b3a232c1b7b80044b98eaadd98857352521f0da1b7706018752614cc80-init/diff:/var/lib/docker/overlay2/08756bc37baa342605e9df49f9b90b2555f0a657ae722bc7bc866918125f4a9e/diff:/var/lib/docker/overlay2/92713c491bf25a3241f2d5ce24a8465b0f866dcf56fcd22ca9c3e28604114279/diff:/var/lib/docker/overlay2/7965b27ddbe6ae92ce844db22f7f12f4de9203bd3d8417ebd6504694b99d2b65/diff:/var/lib/docker/overlay2/2534f13c54c92ee323d42c052aa78454b85a760c29fc52852af49c751501a308/diff:/var/lib/docker/overlay2/96245b036da6cb26f8f43e4c76c6a085ebe90943793b9a2d889165a019b785be/diff:/var/lib/docker/overlay2/587bfb1b52896de23f29c0aa8f3dbae479dc37af7dcc82b9ccad072362ed538e/diff:/var/lib/docker/overlay2/568dd6d82425cfb991576c26e69def0c7012ba1f9cdd49dc65b68f7a28bbadf7/diff:/var/lib/docker/overlay2/6adaee7f6b31a99d34df78cface72bb31ef9f18580ff599f0bea6d23b1cbc3dc/diff:/var/lib/docker/overlay2/dadfe0a81d5fa3d98befb45dc39151890798f03c9b9f6e69fe49cb5eaa9d461a/diff:/var/lib/docker/overlay2/dcc20e266049fecf3dcd7ced11ebbab77ab941f5c2ed31ffc923008a722191f9/diff:/var/lib/docker/overlay2/1c4e6d4f4f7798084b53d63035821883a085894191b36f48421cdaeb6c9c0d30/diff:/var/lib/docker/overlay2/3d8a16d4188748027224a8e23ebd96392a778e93f19040b77143dc8be7a3562e/diff:/var/lib/docker/overlay2/f8363fdb756dbc6cf1b24db682af914ab17ec00f30b041b33b91a7a6f554e0ee/diff",
                "MergedDir": "/var/lib/docker/overlay2/720a47b3a232c1b7b80044b98eaadd98857352521f0da1b7706018752614cc80/merged",
                "UpperDir": "/var/lib/docker/overlay2/720a47b3a232c1b7b80044b98eaadd98857352521f0da1b7706018752614cc80/diff",
                "WorkDir": "/var/lib/docker/overlay2/720a47b3a232c1b7b80044b98eaadd98857352521f0da1b7706018752614cc80/work"
            },
            "Name": "overlay2"
        },
        "Mounts": [
            {
                "Type": "volume",
                "Name": "nodeos-data-volume",
                "Source": "/var/lib/docker/volumes/nodeos-data-volume/_data",
                "Destination": "/opt/eosio/bin/data-dir",
                "Driver": "local",
                "Mode": "rw",
                "RW": true,
                "Propagation": ""
            }
        ],
        "Config": {
            "Hostname": "nodeosd",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "8888/tcp": {},
                "9876/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/opt/eosio/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "EOSIO_ROOT=/opt/eosio",
                "LD_LIBRARY_PATH=/usr/local/lib"
            ],
            "Cmd": [
                "/opt/eosio/bin/nodeosd.sh",
                "--data-dir",
                "/opt/eosio/bin/data-dir",
                "-e",
                "--http-alias=nodeosd:8888",
                "--http-alias=127.0.0.1:8888",
                "--http-alias=localhost:8888",
                "--plugin",
                "eosio::chain_plugin",
                "--plugin",
                "eosio::mongo_db_plugin",
                "--plugin",
                "eosio::history_plugin",
                "--plugin",
                "eosio::chain_plugin",
                "--plugin",
                "eosio::http_plugin"
            ],
            "Image": "eosio/eos",
            "Volumes": {
                "/opt/eosio/bin/data-dir": {}
            },
            "WorkingDir": "",
            "Entrypoint": null,
            "OnBuild": null,
            "Labels": {
                "com.docker.compose.config-hash": "8caf49a32c6cd30cdd2707f677b5fe06bec425e38403e452ad5c254523940b32",
                "com.docker.compose.container-number": "1",
                "com.docker.compose.oneoff": "False",
                "com.docker.compose.project": "docker",
                "com.docker.compose.service": "nodeosd",
                "com.docker.compose.version": "1.22.0"
            },
            "StopTimeout": 600
        },
        "NetworkSettings": {
            "Bridge": "",
            "SandboxID": "398995b0b022fe7740981f01225a2453677cb2f80104b8ce78277c017ed3b56c",
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "Ports": {
                "8888/tcp": [
                    {
                        "HostIp": "0.0.0.0",
                        "HostPort": "8888"
                    }
                ],
                "9876/tcp": [
                    {
                        "HostIp": "0.0.0.0",
                        "HostPort": "9876"
                    }
                ]
            },
            "SandboxKey": "/var/run/docker/netns/398995b0b022",
            "SecondaryIPAddresses": null,
            "SecondaryIPv6Addresses": null,
            "EndpointID": "",
            "Gateway": "",
            "GlobalIPv6Address": "",
            "GlobalIPv6PrefixLen": 0,
            "IPAddress": "",
            "IPPrefixLen": 0,
            "IPv6Gateway": "",
            "MacAddress": "",
            "Networks": {
                "docker_default": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": [
                        "nodeosd",
                        "fd96eb220dc3"
                    ],
                    "NetworkID": "1479ad6db41291d3358a6cce3ee38051a9fd783e11dfe0cf78fbdfdfd6b9844a",
                    "EndpointID": "c3366eb5c63e7da4ae14bcf3609f83577922e1202c04268b2cade338ab829877",
                    "Gateway": "172.23.0.1",
                    "IPAddress": "172.23.0.2",
                    "IPPrefixLen": 16,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "MacAddress": "02:42:ac:17:00:02",
                    "DriverOpts": null
                }
            }
        }
    }
]

My docker containers -

CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                          NAMES 
6515319af10a        eosio/eos           "/opt/eosio/bin/keos…"   30 minutes ago      Up 30 minutes                                      docker_keosd_1 
fd96eb220dc3        eosio/eos           "/opt/eosio/bin/node…"   30 minutes ago      Up 30 minutes      0.0.0.0:8888->8888/tcp, 0.0.0.0:9876-9876/tcp   docker_nodeosd_1

I add -p in the nodeos part and now I get this -

cleos get transaction c96905dee9a9652c8190f2d2bd5221bb0ac65a06b4381451107221c1076c91a8
Error 3200004: fail to resolve host
Error Details:
Error resolving "nodeosd:${url}" : Host not found (non-authoritative), try again later
  • Can you try to set http-validate-host = false in your config.ini ? – Lonkly Aug 9 at 15:53
  • I tried - no difference. cleos get block works so the chain is running. – Trevor Oakley Aug 9 at 16:38

You want to add the --filter-on switch against the account/action you want to capture when running nodeos

E.g.

--filter-on ${Contract}:${Action}

--filter-on karmaaccount:createpost:

Full example

nodeos -e -p eosio -d /mnt/dev/data --config-dir /mnt/dev/config --http-validate-host=false --plugin eosio::wallet_api_plugin --plugin eosio::wallet_plugin --plugin eosio::producer_plugin --plugin eosio::history_plugin --plugin eosio::chain_api_plugin --plugin eosio::history_api_plugin --plugin eosio::http_plugin --filter-on karmaaccount:createpost: --http-server-address=0.0.0.0:8888 --access-control-allow-origin=* --contracts-console &

From nodeos --help

Config Options for eosio::history_plugin:
  -f [ --filter-on ] arg                Track actions which match 
                                        receiver:action:actor. Actor may be 
                                        blank to include all. Receiver and 
                                        Action may not be blank.

Official documentation for the API endpoint can be found on the Developers Portal however the payload structure is wrong as forces id to be an Integer when it should be a string.

A successful payload looks like this

{
    "id": "f73636bf702ef0129f500bcfe654329c48c0903888e0b7dc01296dec91c41cc9"
}

With a response like this.

{
    "id": "f73636bf702ef0129f500bcfe654329c48c0903888e0b7dc01296dec91c41cc9",
    "trx": {
        "receipt": {
            "status": "executed",
            "cpu_usage_us": 866,
            "net_usage_words": 42,
            "trx": [
                1,
                {
                    "signatures": [
                        "SIG_K1_KXQLRQgmib7cYqD9QkZUjoZbCBuxhzQxfGnVpTXLMfj6QqReeSb8WERsoviEZNfZqW8xzRph8zGGRs3N9MuR5bKaZSwVP2"
                    ],
                    "compression": "none",
                    "packed_context_free_data": "",
                    "packed_trx": "e1a4805b3000b8ed140b000000000190a7a6081923af810040c6b4aa6cd445010000989cde63aec100000000a8ed3232ec0101000000000000000000989cde63aec197014c65742773206765742077696c6420746f6461792e20596f752063616e20776f726b206c6f7473206f66206861707079207468696e677320696e20686572652e20412066616e20627275736820697320612066616e746173746963207069656365206f662065717569706d656e742e204175746f6d61746963616c6c792c2062656175746966756c207468696e67732068617070656e2e01610162012e516d54344165574539513945616f794c4a6971615a755951386d4a6571345a426e636a6a4648396451397544564101046861736801010000000000000000"
                }
            ]
        },
        "trx": {
            "expiration": "2018-08-25T00:37:53",
            "ref_block_num": 48,
            "ref_block_prefix": 185920952,
            "max_net_usage_words": 0,
            "max_cpu_usage_ms": 0,
            "delay_sec": 0,
            "context_free_actions": [],
            "actions": [
                {
                    "account": "karmaaccount",
                    "name": "createpost",
                    "authorization": [
                        {
                            "actor": "sarabrown",
                            "permission": "active"
                        }
                    ],
                    "data": {
                        "post": {
                            "id": 1,
                            "author": "sarabrown",
                            "description": "Let's get wild today. You can work lots of happy things in here. A fan brush is a fantastic piece of equipment. Automatically, beautiful things happen.",
                            "lat": "a",
                            "lng": "b",
                            "imagehashes": [
                                "QmT4AeWE9Q9EaoyLJiqaZuYQ8mJeq4ZBncjjFH9dQ9uDVA"
                            ],
                            "videohashes": [
                                "hash"
                            ],
                            "categories": [
                                1
                            ]
                        }
                    },
                    "hex_data": "01000000000000000000989cde63aec197014c65742773206765742077696c6420746f6461792e20596f752063616e20776f726b206c6f7473206f66206861707079207468696e677320696e20686572652e20412066616e20627275736820697320612066616e746173746963207069656365206f662065717569706d656e742e204175746f6d61746963616c6c792c2062656175746966756c207468696e67732068617070656e2e01610162012e516d54344165574539513945616f794c4a6971615a755951386d4a6571345a426e636a6a46483964513975445641010468617368010100000000000000"
                }
            ],
            "transaction_extensions": [],
            "signatures": [
                "SIG_K1_KXQLRQgmib7cYqD9QkZUjoZbCBuxhzQxfGnVpTXLMfj6QqReeSb8WERsoviEZNfZqW8xzRph8zGGRs3N9MuR5bKaZSwVP2"
            ],
            "context_free_data": []
        }
    },
    "block_time": "2018-08-25T00:37:23.500",
    "block_num": 50,
    "last_irreversible_block": 2496,
    "traces": [
        {
            "receipt": {
                "receiver": "karmaaccount",
                "act_digest": "5cf91290925b22530ced63ab3bcc1639ed24ff3b32b3cbcc3769f153f18acf06",
                "global_sequence": 69,
                "recv_sequence": 11,
                "auth_sequence": [
                    [
                        "sarabrown",
                        1
                    ]
                ],
                "code_sequence": 1,
                "abi_sequence": 1
            },
            "act": {
                "account": "karmaaccount",
                "name": "createpost",
                "authorization": [
                    {
                        "actor": "sarabrown",
                        "permission": "active"
                    }
                ],
                "data": {
                    "post": {
                        "id": 1,
                        "author": "sarabrown",
                        "description": "Let's get wild today. You can work lots of happy things in here. A fan brush is a fantastic piece of equipment. Automatically, beautiful things happen.",
                        "lat": "a",
                        "lng": "b",
                        "imagehashes": [
                            "QmT4AeWE9Q9EaoyLJiqaZuYQ8mJeq4ZBncjjFH9dQ9uDVA"
                        ],
                        "videohashes": [
                            "hash"
                        ],
                        "categories": [
                            1
                        ]
                    }
                },
                "hex_data": "01000000000000000000989cde63aec197014c65742773206765742077696c6420746f6461792e20596f752063616e20776f726b206c6f7473206f66206861707079207468696e677320696e20686572652e20412066616e20627275736820697320612066616e746173746963207069656365206f662065717569706d656e742e204175746f6d61746963616c6c792c2062656175746966756c207468696e67732068617070656e2e01610162012e516d54344165574539513945616f794c4a6971615a755951386d4a6571345a426e636a6a46483964513975445641010468617368010100000000000000"
            },
            "elapsed": 651,
            "cpu_usage": 0,
            "console": "",
            "total_cpu_usage": 0,
            "trx_id": "f73636bf702ef0129f500bcfe654329c48c0903888e0b7dc01296dec91c41cc9",
            "inline_traces": [
                {
                    "receipt": {
                        "receiver": "karmaaccount",
                        "act_digest": "46a45a3eecb3b293150fc3b09c696df9e5dd8b3f9fca24c6756349c02b151836",
                        "global_sequence": 70,
                        "recv_sequence": 12,
                        "auth_sequence": [
                            [
                                "karmaaccount",
                                9
                            ]
                        ],
                        "code_sequence": 1,
                        "abi_sequence": 1
                    },
                    "act": {
                        "account": "karmaaccount",
                        "name": "postid",
                        "authorization": [
                            {
                                "actor": "karmaaccount",
                                "permission": "active"
                            }
                        ],
                        "data": {
                            "id": 5
                        },
                        "hex_data": "0500000000000000"
                    },
                    "elapsed": 25,
                    "cpu_usage": 0,
                    "console": "",
                    "total_cpu_usage": 0,
                    "trx_id": "f73636bf702ef0129f500bcfe654329c48c0903888e0b7dc01296dec91c41cc9",
                    "inline_traces": []
                }
            ]
        }
    ]
}

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.