When I run the geth command to list all accounts, it works fine:
geth account list
INFO [04-09|15:47:35.967] Maximum peer count ETH=50 LES=0 total=50
INFO [04-09|15:47:35.967] Smartcard socket not found, disabling err="stat /run/pcscd/pcscd.comm: no such file or directory"
INFO [04-09|15:47:35.968] Set global gas cap cap=25000000
Account #0: {<my_public_address>} keystore: <path_to_keystore>
But when I start it's console, I get undefined and an empty array while requesting balances/accounts:
> eth.getAccounts()
undefined
> eth.accounts
[]
However, if I specify my address in order to check the balance, it works fine:
> eth.getBalance("<my account address>")
3000000000000000000
I am running a local self-hosted Ethereum node on rinkeby network:
geth --rinkeby --rpc --rpcapi "eth,net,web3" --cache 2048