Can't connect on port 4000

Hello, I got a fuel node running but I can’t connect to the port 4000.

  • The machine has an INPUT policy that let everything come in (accept) :
    Chain INPUT (policy ACCEPT)
    target prot opt source destination

  • the fuel-core is well listening on port 4000 :
    fuel-core 652 user 32u IPv4 16104 0t0 TCP *:4000 (LISTEN)

I do not have a graphical environment on that machine, is there a command I can use to locally query the 4000 port with curl or something like this ?

Anything I could look at to check why the connection would be “refused” by fuel-core ?
I have nothing when looking at systemctl status (I’m starting the fuel-core as a system service), there is no output related to a connection.

Thanks !

fuelup show :
Default host: x86_64-unknown-linux-gnu
fuelup home: /home/steph/.fuelup

installed toolchains

latest-x86_64-unknown-linux-gnu (default)

active toolchain

latest-x86_64-unknown-linux-gnu (default)
forc : 0.49.2
- forc-client
- forc-deploy : 0.49.2
- forc-run : 0.49.2
- forc-crypto : 0.49.2
- forc-doc : 0.49.2
- forc-explore : 0.28.1
- forc-fmt : 0.49.2
- forc-lsp : 0.49.2
- forc-tx : 0.49.2
- forc-wallet : 0.4.3
fuel-core : 0.22.0
fuel-core-keygen : 0.22.0

fuels versions

forc : 0.54.0
forc-wallet : 0.54.0

Yes, you can send your GraphQL query via curl, as demonstrated in the following command, which retrieves information from the latest block:

curl -X POST -H "Content-Type: application/json" --data '{ "query": "query { blocks(last: 1) { nodes { header { time height } transactions { id } } } }" }' http://localhost:4000/graphql

Thanks, it does seem to answer but I found the result weird :
{“data”:{“blocks”:{“nodes”:[{“header”:{“time”:“4611686018427387914”,“height”:“0”},“transactions”:}]}}}

Why height would be 0 ?

The core seems to get blocks, last line of the logs :
fuel-core[86881]: 2024-02-23T13:40:52.519852Z INFO new{name=VxFuel}:initialize_loop{service=“Relayer”}: fuel_core_relayer::service::get_logs: 33: Downloading logs for block range: 5347492…=5347518

And when I try to access the server’s GraphQL from the outside I have an HTTP Error 405… dunno why, everything is open or seems to be…something in the fuel-core config/parameter to change to allow remote access maybe ?

I got the same response after I run the “curl …” command. Do you know whether it is right?
And if i connect my wallet to the local p2p node, there is no eth in the account, but actually there are some eth in my fuel wallet if i connect to public node of fuel