geth account new could not decrypt key with given passphrase - blockchain

I want to synchronize with the network test network. I create a new user with the following command:
sudo geth --datadir/data/ethereum/test --keystore /data/ethereum/test/keystore account new
Next, I run:
sudo geth --testnet --syncmode "fast" --datadir /data/ethereum/test --keystore /data/ethereum/test/keystore --maxpeers 20 --cache=1024 --rpc --rpcapi "db,eth,net,web3,personal" --rpcport=8545 --rpcaddr "0.0.0.0" --rpccorsdomain "*" console
An error occurs:
WARN [12-06 | 11: 29: 30.933] Failed account unlock attempt address = 0x06C55Ac0d9C14348D5b63FC693e134889340ecBa err = "cannot decrypt key with given passphrase".
I enter the password 100% correct.
Ports are open
tcp: 80, 8080, 443, 30000 - 30999, 8545.
udp: 30000 - 30999.
I connect to the server using PuTTY. Server: ubuntu-bionic-18.04-amd64. If you delete all accounts and create anew, this error will still occur. If the network is synchronized and I create a new account, it is still an error.

Related

Remix provider connectivity issue with custom RPC

I have setup Ethereum private site chain using geth with the following nodes and each node is running on a separate machine on aws.
abc.122.41.xyz admin(node1)
abc.73.38.xyz peer(node2)
abc.125.123.xyz RPC(node3)
This setup is working fine with these parameters in geth.
--http.vhosts '*'--http.corsdomain '*'
But, I want to restrict access to specific sites to use this RPC like REMIX and etc. Now, I run the below command in this way to restrict access and I read it from REMIX official site to pass parameters in this way. But, Remix is not going to connect to the RPC and throw this error.
Error while connecting to the provider, provider not connected
geth --datadir node01 --networkid 4444 --nat extip:xyz.31.2.xyz --port 30303 --mine --miner.gasprice 1000000 --miner.etherbase=0x35ef1cb0552cEfDEDc9cF1DA19199071274094Ab --keystore key01 --ethstats node01:s3cr3t#stats-localhost.batterychain.info:3000
geth --datadir node02 --networkid 4444 --port 30303 --mine --miner.gasprice 1000000 --keystore key02/ --ethstats Geth/v1.10.20-stable-8f2416a8/linux-amd64/go1.18.1:s3cr3t#stats-localhost.batterychain.info:3000
geth --datadir node03 --networkid 4444 --port 30303 --mine --miner.gasprice 1000000 --http --http.corsdomain 'https://remix.ethereum.org' --http.addr 0.0.0.0 --http.api personal,eth,net,web3 --keystore key03/ --ethstats Geth/v1.10.20-stable-8f2416a8/linux-amd64/go1.18.1:s3cr3t#stats-localhost.batterychain.info:3000
I try to explore this issue on the internet and found some solutions like changing the order of parameters, and also passing REMIX with HTTP instead of HTTPS like
http://remix.ethereum.org
But, each time I face the above same error.

Run TomoChain node get error "etherbase must be explicitly specified"

We sending this command
tomo --rpc --port 30304 --rpcport 8547 --rpccorsdomain "*" --rpcaddr "127.0.0.1" --rpcapi admin,db,eth,debug,net,shh,txpool,personal,web3
Load all like ethereum and then:
Fatal: Can't verify masternode permission: etherbase must be explicitly specified
You will have to create a tomo account, what its telling you now is that no account is available for it to start mining, try :
tomo account new

How to set up a Private network and connect peers in geth?

I am trying to setup a private network and trying to connect peers. Currently I'm trying it on my laptop and desktop (both of them are connected to different internet).
I run the below command in first terminal(in both systems (data dir is different in both systems)):
geth --rpc --rpcaddr "0.0.0.0" --rpcport "8545" --rpccorsdomain "http://localhost:5000, http://localhost:6000" --port "2403" --ipcapi "admin,db,eth,debug,miner,net,shh,txpool,personal,web3" --rpcapi "db,eth,net,web3" --networkid 1001201 --datadir "E:\User\priv\data" init "E:\User\priv\genesis.json"
then I run:
geth --datadir "E:\User\priv\data"
Now, in the second terminal:
geth attach ipc:\\.\pipe\geth.ipc
I get the same enode value on both the systems when i run admin.nodeInfo.enode
then on 1st PC,
admin.addPeer("enode://e0c4960659b6ce4eda71c67b337055636f67660a711d157a81572b5eff1ed1b77931bef4bd079e2660baa661ac16d696b831e9394cb619378071a2593ecdf17a#[192.168.1.2]:30301");
on 2nd PC,
admin.addPeer("enode://e0c4960659b6ce4eda71c67b337055636f67660a711d157a81572b5eff1ed1b77931bef4bd079e2660baa661ac16d696b831e9394cb619378071a2593ecdf17a#[13.75.117.156]:30302");
both of them return true.
But admin.peerCount returns 0.
Can somebody please help me to setup a private geth network?
Step1
geth --identity "YourNodeName" --rpc --rpcport "8092" --datadir "DirectoryPathToStoreData" --port "30330" --nodiscover --rpcapi "db,eth,net,web3" --networkid 2010 init PathOfGenesisFile
The above command is to initialise a Genesis File.
Note: All Peers willing to connect to a network should have a same Genesis File.
Step2
geth --identity "YourNodeName" --rpc --rpcport "8092" --datadir "DirectoryPathToStoreData" --port "30330" --nodiscover --rpcapi "db,eth,net,web3" --networkid 2010 console
The above command opens a Geth JavaScript console.
Do the above 2 steps in other system also.
Step3
In the system where you want to add other system as peer type the following command admin.addPeer("Argument") where Argument is the enode value of other node which is obtained by typing admin.nodeInfo() in other system.
Eg:admin.nodeInfo
{
enode: "enode://965dc2b0f39e199d3a07871293015d8a4ad9349834fc27b7ee5e87bea89547e4fafda3ce7982ae07c14b8770c87a6c14e3fe2f91ef0d0ca717eb6ae56aa3e74b#[::]:30330?discport=0",
//////////
}
where 30330 is the network id of other system.
copy upto 30330.You need to give the ip address of other system in place of
[::]
It returns true if that node is capable of acting as a peer but not mean that it is added to our network, to know that type net.peerCount. It returns 1, if added.
You can follow the step3 for adding more peers.
You can create a private blockchain without creating a Genesis File.If you opt for that, follow this link.
As outlined here, your --port and --rpcport variables should be different. The resulting EnodeURLs should also be different.
Also, when you run geth the second time, I'd include everything you used in the first run before init.

iscsiadm: cannot make connection to ...: Connection refused

I'm struggling to get iscsiadm to connect from the iSCSI Initiator VM (using VirtualBox) to my iSCSI Target VM (also on VirtualBox).
E.g.
iscsiadm --mode discovery --type sendtargets --portal <ip address> --discover
iscsiadm: cannot make connection to <ip address>: Connection refused
There is a Host-only adapter network set up and I can SSH between the two VMs.
I disabled iptables to check if it was a firewall problem but was still getting the same problem.
Fwiw, on the Target machine I have:
# tgtadm --mode target --op show
Target 1: iqn.2014-03.my.target.server:tgt1
System information:
Driver: iscsi
State: ready
I_T nexus information:
LUN information:
LUN: 0
Type: controller
SCSI ID: IET 00010000
SCSI SN: beaf10
Size: 0 MB, Block size: 1
Online: Yes
Removable media: No
Prevent removal: No
Readonly: No
SWP: No
Thin-provisioning: No
Backing store type: null
Backing store path: None
Backing store flags:
LUN: 1
Type: disk
SCSI ID: IET 00010001
SCSI SN: beaf11
Size: 55 MB, Block size: 512
Online: Yes
Removable media: No
Prevent removal: No
Readonly: No
SWP: No
Thin-provisioning: No
Backing store type: rdwr
Backing store path: /dev/vg_iscsi/lv_iscsi_1
Backing store flags:
Account information:
ACL information:
ALL
Any suggestions what else I can try?
Your client machine have another session logged into that target.
First you will have to logged out that target from your client, then discover using your new targetname.
Logout(change parameter accordingly):
iscsiadm --mode node --targetname iqn.2001-05.com.doe:test --portal 192.168.1.1:3260 --logout
If your client still does not discover, use 0.0.0.0 3260 as portal for this particular iqn in your server machine. This should work fine.
server:
o- portals .................................................................... [Portals: 1]
| | o- 0.0.0.0:3260 ..................................................................... [OK]
This is not a firewall issue.
me#here:~$ sudo iscsiadm -m discovery -t st -p 192.168.22.240
iscsiadm: cannot make connection to 192.168.22.240: Connection refused
iscsiadm: cannot make connection to 192.168.22.240: Connection refused
iscsiadm: cannot make connection to 192.168.22.240: Connection refused
^Ciscsiadm: caught SIGINT, exiting...
me#here:~$ sudo iscsiadm -m discoverydb -t st -p 192.168.22.240
# BEGIN RECORD 2.0-873
discovery.startup = manual
discovery.type = sendtargets
discovery.sendtargets.address = 192.168.22.240
discovery.sendtargets.port = 3260
discovery.sendtargets.auth.authmethod = None
discov...

Docker Private Registry: ping attempt failed

I'm trying to set up my private Docker Registry and I'm following the official documentation.
I have installed Docker and I'm able to run my registry on my server. But I want my registry to be more widely available.
My docker-server with the private registry is installed on an AWS-instance.
I have created my own certificate and key by using keytool:
docker run -d -p 5000:5000 --restart=always --name registry \
-v `pwd`/certs:/certs \
-e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/domain.crt \
-e REGISTRY_HTTP_TLS_KEY=/certs/domain.key \
registry:2
I'm able to ping this instance by:
ping ec2-xx-xx-xx-xx.xx-west/east-1.compute.amazonaws.com
But pushing is not possible:
The push refers to a repository [ec2-xx-xx-xx-xx.compute.amazonaws.com:5000/ubuntu] (len: 1)
unable to ping registry endpoint https://ec2-xx-xx-xx-xx.compute.amazonaws.com:5000/v0/
v2 ping attempt failed with error: Get https://ec2-xx-xx-xx-xx.compute.amazonaws.com:5000/v2/: dial tcp 10.x.x.x:5000: i/o timeout
v1 ping attempt failed with error: Get https://ec2-xx-xx-xx-xx.amazonaws.com:5000/v1/_ping: dial tcp 10.0.x.x:5000: i/o timeout
EDIT1:
After changing my aws-security group. Set port 5000 to TCP, the error changed:
unable to ping registry endpoint https://ec2-xx-xx-xx-xx.compute.amazonaws.com:5000/v0/
v2 ping attempt failed with error: Get https://ec2-xx-xx-xx-xx.compute.amazonaws.com:5000/v2/: dial tcp 10.0.x.x:5000: connection refused
v1 ping attempt failed with error: Get https://ec2-xx-xx-xx-xx.compute.amazonaws.com:5000/v1/_ping: dial tcp 10.0.x.x:5000: connection refused
How do I have to make my registry accessible for other aws-instances?
My docker logs are showing the following. They can't find my certificate.
level=fatal msg="open /certs/domain.crt: no such file or directory"
Do I have to put this certificate in my container itself? (and generate it with keytool by myself or using an existing)
EDIT2:
I've generated my own certificates using this documentation.
After generating the certificates I did restart my docker daemon. I did not perform the copy of domain.crt to ca.crt because the path didn't exist. Maybe I have to create it by myself?
new error:
unable to ping registry endpoint https://ec2-xx-xx-xx-xx.compute.amazonaws.com:5000/v0/
v2 ping attempt failed with error: Get https://ec2-xx-xx-xx-xx.compute.amazonaws.com:5000/v2/: dial tcp 10.0.x.x:5000: no route to host
v1 ping attempt failed with error: Get https://ec2-xx-xx-xx-xx.compute.amazonaws.com:5000/v1/_ping: dial tcp 10.0.x.x:5000: no route to host
But I still get the following in my docker logs:
level=fatal msg="open /certs/domain.crt: no such file or directory"
After trying to perform a push, there is created a new /certs folder into my existing certsfolder
EDIT3:
After finding the right directory for my certificate (/home/centos/certs/certs/*.). I get the following error:
level=fatal msg="open /certs/domain.crt: permission denied
Even if I perform a chmod -R 777 and chown -R root:root
You will need to place the certificate in this directory.
/etc/docker/certs.d/<your-domain-name>:5000/ca.crt