-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Troubleshooting
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"
.
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.
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.
The ChainLink node lost the connection to the Ethereum client.
Bring the Ethereum client back online and the node should reconnect automatically.
The Chainlink node tried to create or use a file (in this case, db.bolt) that it does not have permission to.
Ensure that the user running the Chainlink node has access to the location set by the ROOT
environment variable (default /.chainlink
).
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 ./...
.
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.
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
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.
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
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.