Closed jtremback closed 8 years ago
Just to be sure; you have a node running, correct?
Yes, started geth with geth console
Is the node using the default data directory? I got this error when I was running one with a non default data directory and I forgot to specify it on the geth attach command line too. Paul
On Friday, October 16, 2015, Jehan notifications@github.com wrote:
Yes, started geth with geth console
— Reply to this email directly or view it on GitHub https://github.com/ethereum/go-ethereum/issues/1908#issuecomment-148842840 .
Paul Morriss http://paulmorriss.com
@jtremback if you supplied a --datadir /tmp/something
make sure that you attach
using geth attach ipc://tmp/something
I figure this is solved. We should probably clean up the CLI args further, but that's on our long term todo list already.
In case anyone had a similar issue, I was starting with --datadir /tmp/something
and had to use geth attach ipc://tmp/something/geth.ipc
(including geth.ipc
)
Had a similar issue when starting in developer mode with geth --dev console
. This is what worked:
$ geth attach ipc://tmp/ethereum_dev_mode/geth.ipc
I have a similar problem. I initialize my private local network as:
geth --identity="Node01" --datadir="./Node01" -verbosity 6 --ipcdisable --port 30301 --rpcport 8101 --networkid="12345" init ./CustomGenesis.json 2>> ./Node01.log
And then running the console as:
geth --identity="Node01" --datadir="./Node01" -verbosity 6 --ipcdisable --port 30301 --rpcport 8101 --networkid="12345" console 2>> ./Node01.log
Normally the console here work fine, but when I open another terminal window and try to attach, I am having this error message:
onders-macbook-pro:local_private_network ogurcan$ geth attach
Fatal: Unable to attach to remote geth: dial unix /Users/ogurcan/Library/Ethereum/geth.ipc: connect: no such file or directory
I also realized that geth is not creating a geth.ipc
under the custom data directory I am giving, i.e. /Users/ogurcan/ethereum_test_networks/local_private_network/Node01/
. As a result, I am unable to say geth attach ipc//something
, like you guys above did.
Any ideas?
geth attach http://127.0.0.1:8545
@ogurcan You are using the --ipcdisable
option, which disables creation of geth.ipc.
didn't need use --datadir
, just geth attach ipc://somePath/geth.ipc
Just curious why this is closed? While ipc://.. worked, it is not in the help menu and so far (as of latest release today), this issue is the only place I have found evidence of how to do this (I might have missed something).
Why doesn't datadir have it default to geth.ipc like other subcommands? Is there a tracker for these type issues, I be happy to jump in.
I started geth
with --testnet
option:
geth --testnet --cache 2048 --rpc
To attach I used following command (on Linux):
geth attach ipc:/home/den/.ethereum/testnet/geth.ipc
On MacOS (for testnet):
geth attach ipc:/Users/ed/Library/Ethereum/testnet/geth.ipc
I'm running geth under a system user and the ipc socket only has permissions 600, owner can rw. I get the following error when try geth attach
Fatal: Unable to attach to remote geth: dial unix /home/antonios/.ethereum/geth.ipc: connect: permission denied
I can connect fine if using sudo geth attach
Is it possible to change permissions on ipc socket to 660?
@AntoniosHadji
Is it possible to change permissions on ipc socket to 660?
Run sudo chmod 660 /home/antonios/.ethereum/geth.ipc
.
Yes, that is a manual way that works. I want to know if there is a way to make the change permanent.
Antonios
On Nov 23, 2017 12:48 PM, "Lewis Marshall" notifications@github.com wrote:
@AntoniosHadji https://github.com/antonioshadji
Is it possible to change permissions on ipc socket to 660?
Run sudo chmod 660 /home/antonios/.ethereum/geth.ipc.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ethereum/go-ethereum/issues/1908#issuecomment-346674278, or mute the thread https://github.com/notifications/unsubscribe-auth/AB19GHzKXm8a2kfTU7NNDfSBfR3A9Bqhks5s5a_mgaJpZM4GQgCC .
you can use crontab -e
. then add this to to set permission.
* * * * * chmod 660 /path/to/geth.ipc
It's important to specify the ABSOLUTE path in the ipc:/ address. For example:
geth --datadir ~/eth-priv attach ipc:/home/myuser/eth-priv/geth.ipc
One way to find out the exact path to the IPC endpoint is to stop the geth node instance by pressing CTRL+C.
At the end of the console output, you should see something like
INFO [01-23|02:45:01] IPC endpoint closed: /home/path/to/myfolder/geth.ipc
Just copy-paste this path prepended with ipc:// to get the path to the ipc file. Just make sure that there are only two backslashes (/) in the ipc://home path beginning. so you'd basically be doing
geth attach ipc://home/path/to/myfolder/geth.ipc
HTH.
I had issues with this due to using a symbolic link on macOS, I had to specify the real location of the ipc file.
e.g:
geth attach ipc:/Volumes/storage/Ethereum/testnet/geth.ipc
geth attach http://127.0.0.1:8545
that one works for me ok
found a solution. First: geth --unlock 0x2Dc6f1E4c8D2fDD46A6b6b11b2037F577bB1f4Cd --datadir=/Users/robert/Library/Ethereum —mine
Then in another Terminal run zeus:~ robert$ geth attach Welcome to the Geth JavaScript console!
instance: Geth/v1.8.11-stable/darwin-amd64/go1.10.3 coinbase: 0xc9b74488b8e699b54803464a33d57cfff7eb052c at block: 0 (Thu, 01 Jan 1970 01:00:00 BST) datadir: /Users/robert/Library/Ethereum modules: admin:1.0 debug:1.0 eth:1.0 miner:1.0 net:1.0 personal:1.0 rpc:1.0 txpool:1.0 web3:1.0
For windows following worked for me!!
After opening geth instance, something like following will be on console
IPC endpoint opened. . . . . . url=\\\\.\\pipe\\geth.ipc
For attach, copy above url, replace '\\' with '/' and type following on other console
geth attach "//./pipe/geth.ipc"
I run in this command but i got error please help me out geth --datadir /speqto/Go-Xport attach ipc:/home/oem/speqto/Go-Xport /geth.ipc Fatal: Unable to attach to remote geth: dial unix /home/oem/speqto/Go-Xport: connect: connection refused
Hi, I installed GETH into a non-default folder (instead of "/root/.ethereum/" I installed it into "/root/.ethereum/bsc") I added all paths, so it can find all the stuff it needs, which works fine:
DataDir = "/root/.ethereum/bsc"
IPCPath = "/root/.ethereum/bsc/geth.ipc"
But here comes the white people problem...I'm used to use "geth attach". But since now I have BSC and ETH in paralell to server as a backup server, I had to differenciate, so now it should be "gethbsc attach", but when I try it, it says:
Fatal: Unable to attach to remote geth: dial unix /root/.ethereum/geth.ipc: connect: no such file or directory
Which seems, it tries to access ipc file in the default path.
gethbsc attach /root/.ethereum/bsc/geth.ipc
works fine, but how can I edit the "default" path somehow? So it would work simply by giving the command
gethbsc attach
Does anyone have any suggestion/idea?
Appreciated in advance!
geth attach http://127.0.0.1:8545 出现Fatal: Failed to start the JavaScript console: Post "http://127.0.0.1:8545": dial tcp 127.0.0.1:8545: connect: connection refused 这个错误应该怎么解决
@wwwuyijia please file a new ticket, and provide more information.
From the looks of it, nothing is listening on 127.0.0.1:8545
Fails with this error: