Question about connecting to a node from a different computer

Hi! Whenever I try to connect to my node (it is running on a ubuntu machine) it gives me the error highlighted in the screenshot. Why is that? I changed the config.json so that connections are accepted from 0.0.0.0:8080 in node config.json file.

  1. Did you stop and start the node after changing the config.json file?
  2. Can you show the output of (on the server):
    sudo netstat -tulpn | grep algod
    
    (you may need to install netstat: sudo apt install net-tools)
  3. Can you check you don’t have any firewall rules blocking it on the server: sudo ufw status?

Hi Fabrice!
1 - yes, I restarted it
2 -

nick@nick-ThinkPad-T530:~/node$ sudo netstat -tulpn | grep algod
tcp        0      0 127.0.0.1:8080          0.0.0.0:*               LISTEN      2929/algod  

3 -

nick@nick-ThinkPad-T530:~/node$ sudo ufw status
Status: inactive

I guess you need to set it in the config to listen on 0.0.0.0 instead of 127.0.0.1

This is what I get now when I try to run the command Fabrice mentioned:

nick@nick-ThinkPad-T530:~/node$ sudo netstat -tulpn | grep algod
[sudo] password for nick: 
tcp6       0      0 :::8080                 :::*                    LISTEN      13220/algod         

The program still gives me the same error as before, so it refuses to connect

Try to access it using ipv6 or disable ipv6 ?

@Allennick ,

I’m going to sound pretty stupid, but I’m going to say it anyway -
try to change the X.X.X.X in the above code with 127.0.0.1; same goes for the token that can be grabbed from algod.token in your data directory.

Also, I’m not sure if the http:// prefix in the algod_address is needed.

Can you copy-paste your config.json here?

In your first netstat, you’re only listening on localhost as @scholtz pointed out. So that could not work.
And in the second netstat, you only have ipv6 which is very strange.

Yes already done! I was writing X.X.X.X because I thought it was something private. It doesn’t work. Now I’m going to let you see what Fabrice suggested me

This is what I have inside the config.json

{
    "Version": 16,
    "AccountUpdatesStatsInterval": 5000000000,
    "AccountsRebuildSynchronousMode": 1,
    "AnnounceParticipationKey": true,
    "Archival": false,
    "BaseLoggerDebugLevel": 4,
    "BlockServiceCustomFallbackEndpoints": "",
    "BroadcastConnectionsLimit": -1,
    "CadaverSizeTarget": 1073741824,
    "CatchpointFileHistoryLength": 365,
    "CatchpointInterval": 10000,
    "CatchpointTracking": 0,
    "CatchupBlockDownloadRetryAttempts": 1000,
    "CatchupBlockValidateMode": 0,
    "CatchupFailurePeerRefreshRate": 10,
    "CatchupGossipBlockFetchTimeoutSec": 4,
    "CatchupHTTPBlockFetchTimeoutSec": 4,
    "CatchupLedgerDownloadRetryAttempts": 50,
    "CatchupParallelBlocks": 16,
    "ConnectionsRateLimitingCount": 60,
    "ConnectionsRateLimitingWindowSeconds": 1,
    "DNSBootstrapID": "<network>.algorand.network",
    "DNSSecurityFlags": 1,
    "DeadlockDetection": 0,
    "DisableLocalhostConnectionRateLimit": true,
    "DisableNetworking": false,
    "DisableOutgoingConnectionThrottling": false,
    "EnableAccountUpdatesStats": false,
    "EnableAgreementReporting": false,
    "EnableAgreementTimeMetrics": false,
    "EnableAssembleStats": false,
    "EnableBlockService": false,
    "EnableBlockServiceFallbackToArchiver": true,
    "EnableCatchupFromArchiveServers": false,
    "EnableDeveloperAPI": false,
    "EnableGossipBlockService": true,
    "EnableIncomingMessageFilter": false,
    "EnableLedgerService": false,
    "EnableMetricReporting": false,
    "EnableOutgoingNetworkMessageFiltering": true,
    "EnablePingHandler": true,
    "EnableProcessBlockStats": false,
    "EnableProfiler": false,
    "EnableRequestLogger": false,
    "EnableTopAccountsReporting": false,
    "EndpointAddress": "0.0.0.0:8080",
    "FallbackDNSResolverAddress": "",
    "ForceRelayMessages": false,
    "GossipFanout": 4,
    "IncomingConnectionsLimit": 10000,
    "IncomingMessageFilterBucketCount": 5,
    "IncomingMessageFilterBucketSize": 512,
    "IsIndexerActive": false,
    "LedgerSynchronousMode": 2,
    "LogArchiveMaxAge": "",
    "LogArchiveName": "node.archive.log",
    "LogSizeLimit": 1073741824,
    "MaxCatchpointDownloadDuration": 7200000000000,
    "MaxConnectionsPerIP": 30,
    "MinCatchpointFileDownloadBytesPerSecond": 20480,
    "NetAddress": "",
    "NetworkMessageTraceServer": "",
    "NetworkProtocolVersion": "",
    "NodeExporterListenAddress": ":9100",
    "NodeExporterPath": "./node_exporter",
    "OptimizeAccountsDatabaseOnStartup": false,
    "OutgoingMessageFilterBucketCount": 3,
    "OutgoingMessageFilterBucketSize": 128,
    "ParticipationKeysRefreshInterval": 60000000000,
    "PeerConnectionsUpdateInterval": 3600,
    "PeerPingPeriodSeconds": 0,
    "PriorityPeers": {},
    "PublicAddress": "",
    "ReconnectTime": 60000000000,
    "ReservedFDs": 256,
    "RestReadTimeoutSeconds": 15,
    "RestWriteTimeoutSeconds": 120,
    "RunHosted": false,
    "SuggestedFeeBlockHistory": 3,
    "SuggestedFeeSlidingWindowSize": 50,
    "TLSCertFile": "",
    "TLSKeyFile": "",
    "TelemetryToLog": true,
    "TxPoolExponentialIncreaseFactor": 2,
    "TxPoolSize": 15000,
    "TxSyncIntervalSeconds": 60,
    "TxSyncServeResponseSize": 1000000,
    "TxSyncTimeoutSeconds": 30,
    "UseXForwardedForAddressField": "",
    "VerifiedTranscationsCacheSize": 30000
}

  1. Can you replace your config.json so it only contains the fields that changed, just to be on the safe side.
    Something like:
{
     "EndpointAddress": "0.0.0.0:8080"
}
  1. Can you check on the algod machine if everything works properly? E.g.:
curl -s -H "X-Algo-API-Token: thetoken" http://127.0.0.1/v2/status
  1. Do the same as above except using the address of the algod machine instead of 127.0.0.1. Does it still work?

  2. If the above works and the same command does not work from another machine, the issue is most likely that there is a firewall somewhere on your network.