Error reading server preface
I built a minimal blockchain project using Ignite and successfully ran Ignite Chain Serve. Sending tokens to addresses as instructed in the tutorial also worked fine. However, the REST API is malfunctioning; accessing any address on port 1317 results in the following error message: curl xxxx/cosmos/base/tendermint/v1beta1/node_info { “code”: 14, “message”: “connection error: desc = “error reading server preface: EOF””, “details”: } The program appears to be running normally. Blockchain is running. : : Alice’s account address: cosmos1gm854qshrd22dj9lrj26sqmvw0at2tr5jqzpmk : : Bob’s account address: cosmos1nufjqs3qqaj7hhcegtktffyjxvt9es4fecn4l8 : : Tendermint node: xxxxx : : Blockchain API: xxxxxx : : Token faucet: xxxxx⋆ Data directory: /home/mohuang/.checkers ⋆ App binary: /home/mohuang/go/bin/checkersd Press the ‘q’ key to stop serving What could be causing this? I’ve also checked the app.toml file. app-db-backend = “” halt-height = 0 halt-time = 0 iavl-cache-size = 781250 iavl-disable-fastnode = false index-events = inter-block-cache = true min-retain-blocks = 0 minimum-gas-prices = “0stake” pruning = “default” pruning-interval = “0”…
Excerpt (1186 of 2119 characters). Read the whole post on the forum ↗
hey, what do you mean by “accessing any address on port 1317“? which endpoints do you actually call?
on the same machine where the blockchain is running something like this should work
curl http://127.0.0.1:1317/cosmos/base/tendermint/v1beta1/node_info
curl http://127.0.0.1:1317/cosmos/base/tendermint/v1beta1/node_info
Thanks for your reply. I’m unable to access any of the REST API addresses, even though the ports appear to be open. For example, when I try to access
curl x.x.x.x:1317/cosmos/base/tendermint/v1beta1/node_info
I get an error message.
root@node01:/home/mohuang/sdk# curl x.x.x.x:1317/cosmos/base/tendermint/v1beta1/node_info
{“code”:14,“message”:“connection error: desc = “error reading server preface: EOF””,“details”:}
I couldn’t reply with the address, so I’m using X instead.
well, i don’t get it, what is “any of the REST API addresses“? could you explain what you are doing exactly?
- does this work from the same machine where the blockchain node is running?
curl http://127.0.0.1:1317/cosmos/base/tendermint/v1beta1/node_info - are you trying to call this endpoint from another machine and x.x.x.x is ip address of the machine where the blockchain node is running?
I apologize, perhaps my wording was inaccurate. The address you provided is inaccessible; accessing it will result in the following message:
{“code”:14,“message”:“connection error: desc = “error reading server preface: EOF””,“details”:}
and it’s not accessing from another machine, but from the local machine.
curl http://127.0.0.1:1317/cosmos/base/tendermint/v1beta1/node_info
hm, alright, could you share output of
curl -v http://127.0.0.1:1317/cosmos/base/tendermint/v1beta1/node_infoOf course you can. I don’t know why I can’t upload images. This is the result I got when I executed “curl your address” in the command line.
root@node01:/home/mohuang/sdk# curl -v xxxxx:/cosmos/base/tendermint/v1beta1/node_info
- Trying 127.0.0.1:1317…
- Connected to 127.0.0.1 (127.0.0.1) port 1317
- using HTTP/1.x
GET /cosmos/base/tendermint/v1beta1/node_info HTTP/1.1
Host: 127.0.0.1:1317
User-Agent: curl/8.14.1
Accept: /
- Request completely sent off
< HTTP/1.1 503 Service Unavailable
< Content-Type: application/json
< X-Server-Time: 1763109653
< Date: Fri, 14 Nov 2025 08:40:53 GMT
< Content-Length: 99
<- Connection #0 to host 127.0.0.1 left intact
{“code”:14,“message”:“connection error: desc = “error reading server preface: EOF””,“details”:}
alright, your config might have an issue, could you try adding tcp to grpc part of the config, then redeploy the chain and try again?
[grpc]
address = "tcp://0.0.0.0:9090"This is my app.toml configuration; gRPC itself is 0.0.0.0:9090.
app-db-backend = “”
halt-height = 0
halt-time = 0
iavl-cache-size = 781250
iavl-disable-fastnode = false
index-events =
inter-block-cache = true
min-retain-blocks = 0
minimum-gas-prices = “0stake”
pruning = “default”
pruning-interval = “0”
pruning-keep-recent = “0”
query-gas-limit = “0”[api]
address = “tcp://0.0.0.0:1317”
enable = true
enabled-unsafe-cors = true
#max-open-connections = 1000
#rpc-max-body-bytes = 1000000
#rpc-read-timeout = 10
#rpc-write-timeout = 0
swagger = true[grpc]
address = “0.0.0.0:9090”
enable = true
max-recv-msg-size = “10485760”
max-send-msg-size = “2147483647”[grpc-web]
enable = true[mempool]
max-txs = -1[rpc]
cors_allowed_origins = [“*”][state-sync]
snapshot-interval = 0
snapshot-keep-recent = 2[streaming]
[streaming.abci]
keys =
plugin = “”
stop-node-on-err = true[telemetry]
datadog-hostname = “”
enable-hostname = false
enable-hostname-label = false
enable-service-label = false
enabled = false
global-labels =
metrics-sink = “”
prometheus-retention-time = 0
service-name = “”
statsd-addr = “”
[grpc]
address = “0.0.0.0:9090”
yes, so try to change it to
[grpc]
address = "tcp://0.0.0.0:9090"
redeploy the chain and try calling rest endpoint again
tcp://0.0.0.0:9090
[grpc]
address = “tcp://0.0.0.0:9090”
enable = true
max-recv-msg-size = “10485760”
max-send-msg-size = “2147483647”
After modifying the configuration and re-running ignite chain serve, I still get the same error message
alright, a few questions:
- when you redeploy the chain - are there logs similar to the ones below? could you share complete startup logs?
INFO Starting gRPC server on tcp://0.0.0.0:9090
INFO Starting REST server on tcp://0.0.0.0:1317
- is there any output of this (needs net-tools installed)
ss -tlnp | grep -E ':(1317|9090)'
- what is the output of
curl -v http://localhost:1317/swagger/
This is the startup log.: Blockchain is running alice’s account address: cosmos1gm854qshrd22dj9lrj26sqmvw0at2tr5jqzpmk bob’s account address: cosmos1nufjqs3qqaj7hhcegtktffyjxvt9es4fecn4l8 Tendermint node: 0.0.0.0:26657 Blockchain API: 0.0.0.0:1317 Token faucet: 0.0.0.0:4500 ⋆ Data directory: /home/mohuang/.checkers ⋆ App binary: /home/mohuang/go/bin/checkersd This is a port check: root@node01:/home/mohuang/sdk# lsof -i:1317 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME checkersd 176978 mohuang 36u IPv6 288642 0t0 TCP *:1317 (LISTEN) root@node01:/home/mohuang/sdk# lsof -i:9090 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME checkersd 176978 mohuang 37u IPv6 291969 0t0 TCP *:9090 (LISTEN) This is the result of the address access: root@node01:/home/mohuang/sdk# curl -v localhost:1317/swagger/ • Host localhost:1317 was resolved. • IPv6: ::1 • IPv4: 127.0.0.1 • Trying [::1]:1317… • Connected to localhost (::1) port 1317 • using HTTP/1.x GET /swagger/ HTTP/1.1 Host: localhost:1317 User-Agent: curl/8.14.1 Accept: / • Request completely sent off < HTTP/1.1 200 OK < Accept-Ranges: bytes < Content-Length: 1466 <…
Excerpt (1192 of 2241 characters). Read the whole post on the forum ↗
alright, so by the looks of it - grpc connection is the issue - why it matters is because rest endpoint calls grpc internally, so if grpc doesn’t work - rest won’t work either.
could you try calling grpc directly (needs grpcurl installed):
grpcurl --plaintext localhost:9090 list
and also could you try this and redeploy the chain (to force ipv4 over ipv6, to narrow it down since networking is likely the issue):
[grpc]
address = "tcp://127.0.0.1:9090"
This is the result of the gRPC call; it looks fine. I’ll redeploy later and force IPv4 to try it out. root@node01:/home/mohuang# grpcurl --plaintext localhost:9090 list checkers.checkers.v1.Query cosmos.app.v1alpha1.Query cosmos.auth.v1beta1.Query cosmos.authz.v1beta1.Query cosmos.autocli.v1.Query cosmos.bank.v1beta1.Query cosmos.base.node.v1beta1.Service cosmos.base.reflection.v1beta1.ReflectionService cosmos.base.reflection.v2alpha1.ReflectionService cosmos.base.tendermint.v1beta1.Service cosmos.circuit.v1.Query cosmos.consensus.v1.Query cosmos.distribution.v1beta1.Query cosmos.epochs.v1beta1.Query cosmos.evidence.v1beta1.Query cosmos.feegrant.v1beta1.Query cosmos.gov.v1.Query cosmos.gov.v1beta1.Query cosmos.group.v1.Query cosmos.mint.v1beta1.Query cosmos.nft.v1beta1.Query cosmos.params.v1beta1.Query cosmos.reflection.v1.ReflectionService cosmos.slashing.v1beta1.Query cosmos.staking.v1beta1.Query cosmos.tx.v1beta1.Service cosmos.upgrade.v1beta1.Query grpc.reflection.v1alpha.ServerReflection ibc.applications.interchain_accounts.controller.v1.Query ibc.applications.interchain_accounts.host.v1.Query ibc.applications.transfer.v1.Query…
Excerpt (1185 of 1321 characters). Read the whole post on the forum ↗
yeah, it looks good.
so let’s try with address = “tcp://127.0.0.1:9090” and if it still doesn’t work after redeployment - could you share results of lsof -i:9090 again. binding could be system dependent, so we want to check if it is ipv4 with this setting
Oh my god, it seems to be working.
I set it to tcp1270019090, and it seems to be working.
But it seems I can’t access it using other IPs.
alright, good progress that it works locally - the original problem is solved and blockchain is running locally as expected.
now, by “access it using other IPs” you mean accessing rest endpoint from other computers on your local network or? as in - from another machine on the local network you call something like
curl http://192.168.1.50:1317/cosmos/base/tendermint/v1beta1/node_info
where 192.168.1.50 should be replaced with local ip of the blockchain machine and it fails?
if it does - what is the error?
is this still part of api config? it should be 0.0.0.0 there to allow connections from other ips
[api]
address = “tcp://0.0.0.0:1317”
do you have a firewall running on the blockchain machine maybe?
as the next step you can look into nginx setup to properly expose ports and make endpoints accessible from the outside
Sorry, the comment limit was reached yesterday.Bro, I think I’m confused. I changed the IP back to 0.0.0.0:9090, and it worked for me too.The only difference was that I had restarted the server yesterday.
hm, maybe the server had some networking issues that restart fixed (given what we found during diagnostics with ipv4 and ipv6), or blockchain was not fully redeployed somehow, but if it works now - great, that was the goal right ![]()
Yes, the result was good. Thank you for your support despite your busy schedule.