1. Home
  2. Docs
  3. Chainlink Node Setup
  4. Troubleshooting

Troubleshooting

Troubleshooting Common Issues

Identifying Error Messages

When the node fails to start successfully, you will see a few messages displayed in the output, the first will be rather short, and is informational, and the second is usually a fatal message, which is very long.

The first message typically looks like this:

{"level":"info","ts":1520107660.567211,"caller":"logger/logger.go:71","msg":
"Starting Chainlink Node 0.2.0 at commit 2625bd46153d40631bb4140e5fada800064b273d"}

The second message is what contains the error that caused the failure. Look for the value of "msg" to see what went wrong. This is what we’ll be using to identify issues in this guide.

{"level":"fatal","ts":1520107489.8099728,"caller":"logger/logger.go:119","msg":
"dial tcp [::1]:8546: getsockopt: connection refused","stacktrace":"github.com/
smartcontractkit/chainlink/logger.Fatal...

From the above, we see the error was "dial tcp [::1]:8546: getsockopt: connection refused".

dial tcp [::1]:8546: getsockopt: connection refused

Problem

Seeing the “connection refused” in this error let’s us know that the node is trying to establish a connection to another entity. Since the port is 8546, we can tell that it’s trying to make a websocket connection to an Ethereum client, and ::1 just tells us it’s listening on IPv6.

Solution

We need to ensure that an Ethereum client is accessible and is running with the websocket functionality enabled. For Geth, that can be referenced here, and for Parity, here. Typically, you want to make note of the address and port that the websocket-enabled client is listening on, and use those values for setting the ETH_URL environment variable. For example, export ETH_URL=ws://127.0.0.1:8546 could be used if the Ethereum client is running on the same machine as the ChainLink node.

Error in new head subscription

Problem

The ChainLink node lost the connection to the Ethereum client.

Solution

Bring the Ethereum client back online and the node should reconnect automatically.

open /home/user/.chainlink/db.bolt: permission denied

Problem

The Chainlink node tried to create or use a file (in this case, db.bolt) that it does not have permission to.

Solution

Ensure that the user running the Chainlink node has access to the location set by the ROOT environment variable (default /.chainlink).

use of internal package not allowed

Problem

If you forked the ChainLink project to your own repository, cloned, then ran dep ensure, you’ll see this message when running tests via go test ./....

Solution

In order for tests to correctly run for your local development, you’ll need to clone our repository and set up your forked repository as a remote.

Makefile:27: recipe for target 'godep' failed

Problem

Running make install produced errors similar to the example below:

dep ensure -vendor-only
make: dep: Command not found
Makefile:27: recipe for target 'godep' failed
make: *** [godep] Error 127

Solution

You will need to make sure that the dependency management program, dep, is properly installed. If you run which dep and the result is “dep not found”, then the dep binary is not in your path. Running go get -u github.com/golang/dep/cmd/dep will add dep to your $GOPATH/bin directory, but you may still need to set up your paths for Go binaries.

Makefile:30: recipe for target 'yarndep' failed

Problem

Running make install produces errors similar to the example below:

dep ensure -vendor-only
yarn install
make: yarn: Command not found
Makefile:30: recipe for target 'yarndep' failed
make: *** [yarndep] Error 127

Solution

Either NodeJS isn’t loaded with the Yarn binary, or Yarn isn’t installed. Note that you will need NodeJS in order for Yarn to work.

Was this article helpful to you? Yes No

How can we help?

Leave a Reply

Your email address will not be published. Required fields are marked *