How can I enable CORS for a quorum node from the geth console? - go-ethereum

I have a remote quorum node that I am trying to connect my metamask wallet to but it needs to have CORS enabled but I created my network with quorum-wizard and I can only connect to a node using attach.sh that was generated when I created it. When I run ./attach.sh 1 to connect to node 1 it connects but when I run
--rpccorsdomain "*"
from the geth console I get
(anonymous): Line 1:17 Unexpected string

Try using a localhost address:
--rpccorsdomain "http://localhost:8080"
Or without the backticks:
--rpccorsdomain=*

Related

MC can't Add a Cloud Storage Device

I am trying to create a MinIO Server and Client so I can run some tests and I am getting the error bellow when I try to run mc:
C:\mc.exe alias set myminio http://169.254.44.236:9000 admin password
mc.exe: <ERROR> Unable to initialize new alias from the provided credentials. Get
"http://169.254.44.236:9000/probe-bucket-sign-6oubmdhiezos/?location=": dial tcp
169.254.44.236:9000: connectex: A socket operation was attempted on an unreachable network.
I just copied the command given to me when I started the MinIO Server. I am using a Windows10 PC remotely.

Cassandra: target machine actively refused it

I am trying to run Cassandra (CQL Shell) and I am receiving the following error, I have tried all the google responses to existing questions, nothing has fixed it so far.
Connection error: ('Unable to connect to any servers', {'127.0.0.1': error(10061, "Tried connecting to [('127.0.0.1', 9042)]. Last error: No connection could be made because the target machine actively refused it")})
Before installing Apache Cassandra, JDK must be installed.
Can you make sure the IP address is set correctly on your rpc_address setting in your cassandra.yaml file, on your cassandra server.
Also, you need to make sure port 9042 is open and available for incoming traffic (if your IT department is setting up servers, it is possible this port is blocked, unless otherwise specified...)
Hope it helps.
I also faced the same issue , but may be the below 2 way's can help :
Option 1 :
In my case i haven't started the Cassandra Server and was directly trying to connect to Cassandra.
(a) Firstly start the cassandra server via cmd --> \bin>cassandra.bat -f
and then
(b) Try to connect to it's node --> \bin>cqlsh.bat -u cassandra
Option 2:
Try changing the rpc_address in your cassandra.yaml file to eihter 127.0.0.1 instead of localhost
or to 0.0.0.0 instead of localhost
and then again start the server from new CMD.

No command response from neo4j-shell, despite establishing connection

Created new EC2 instance of neo4j via CloudFormation template found here (ubuntu host).
https://github.com/neo4j-contrib/ec2neo
Got the web interface to work fine, and DB is up and running.
Trying to connect with neo4j-shell from my local dev machine, and I am able to establish a connection to the remote EC2 server.
$ neo4j-shell -host ec2-xx-xx-xx-xx.compute-1.amazonaws.com
Welcome to the Neo4j Shell! Enter 'help' for a list of commands
NOTE: Remote Neo4j graph database service 'shell' at port 1337
neo4j-sh (?)$
netstat confirms that a connection has been ESTABLISHED
tcp6 0 0 xx.xx.xx.xx:1337 my.local.ip.add:13785 ESTABLISHED
At this point, I type help, or any neo4j command, and I get no response back from the server. The console just hangs. As soon as I stop the neo4j service on the server, I get the following exception on the client console.
java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is:
java.io.EOFException
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:229)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:162)
at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:194)
at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:148)
at com.sun.proxy.$Proxy1.interpretLine(Unknown Source)
at org.neo4j.shell.impl.AbstractClient.evaluate(AbstractClient.java:149)
at org.neo4j.shell.impl.AbstractClient.evaluate(AbstractClient.java:133)
at org.neo4j.shell.impl.AbstractClient.grabPrompt(AbstractClient.java:101)
at org.neo4j.shell.StartClient.grabPromptOrJustExecuteCommand(StartClient.java:383)
at org.neo4j.shell.StartClient.startRemote(StartClient.java:330)
at org.neo4j.shell.StartClient.start(StartClient.java:196)
at org.neo4j.shell.StartClient.main(StartClient.java:135)
Caused by: java.io.EOFException
at java.io.DataInputStream.readByte(DataInputStream.java:267)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:215)
... 11 more
I have made the following change to neo4j-wrapper.conf :
wrapper.java.additional=-Djava.rmi.server.hostname=ec2-xx-xx-xx-xx.compute-1.amazonaws.com
All iptables are "disabled", to eliminate variables. I am able to run neo4j-shell on the server itself, to 127.0.0.1
What am I missing in my network config or neo4j server config?
Try to ssh into the instance and run it there. remote connections have been a pain for a long time because of the underlying Java RMI port handling.
You can also try out cycli which supports http and auth.

Websphere Node Federating issue

I have created a DMGR profile in my host which is successs. On the same host i have created a managed node. Now when i am trying to federate the node to DMGR i am getting below error :
ADMU006E : Exception creating Deployment Manager Connection: com.ibm.websphere.management.exception.ConnectorException: ADMC0016E: The system cannot create a SOAP connector to connect to host **** at port 8879
Now to verify SOAP connection i have run the below command :
** wsadmin.sh -conntype SOAP -port -host **
Running this script from bin in dmgr profile.. it is connecting fine but failing with the same exception when running from bin directory of managed node profile.
To verify further i done the same setup in a different host by creating a dmgr and a node. It was all fine. DMGR profile created and node got federated in one go.
Not sure what exactly is the issue here.
Have verified that my port and hoat details are all correct. Also that my dmgr is running.
Thanks Michal, ephonk for your inputs.
Found the solution to above issue.
Issue was with the java.security file present in the WAS_HOME/java/jre/lib/security location.
In this file the SSL values were as below :
ssl.SocketFactory.provider=com.ibm.jsse2.SSLSocketFactoryImpl
ssl.ServerSocketFactory.provider=com.ibm.jsse2.SSLServerSocketFactoryImpl
We changed to below values and were successfully able to Federate the node to DMGR.
ssl.SocketFactory.provider=com.ibm.websphere.ssl.protocol.SSLSocketFactory
ssl.ServerSocketFactory.provider=com.ibm.websphere.ssl.protocol.SSLServerSocketFactory
May or may not be relevant, but I've seen this when the SOAP port isn't open in the firewall. Are you sure traffic on that port is allowed?

RSH connection refused while running MPI program

I'm trying to run MPI programs on 8 machines, but I get the error
connect to address 127.0.0.1 port 544: Connection refused
Trying krb4 rsh...
connect to address 127.0.0.1 port 544: Connection refused
trying normal rsh (/usr/bin/rsh)
lagrid02: Connection refused
When I run it with a machinefile option, I get the error lagrid03: No route to host where lagrid03 is the neighbouring node connected to master node.
How should I rectify this ?
Regarding your first error, is rsh running on (all) the machine(s)? You'll need rsh or password-less ssh configured (and ask your mpi job launcher use ssh) before you can start jobs on different machines.
The second error indicates that there is no way to reach the machine lagrid03 with the current network config. I guess you have a /etc/hosts entry with the IP addresses for lagrid03, but you do not have an interface configured in that network. For a more detailed answer you'll need to post details about your network configuration.
The issue is with authentication, if you go into the /etc/pam.d/rsh file and move rlogin and rsh to the top and make it look like this, it would work just fine.
/* For root login to succeed here with pam_securetty, "rsh" must be listed in /etc/securetty.*/
auth required pam_nologin.so
auth required pam_securetty.so
auth required pam_env.so
auth required pam_rhosts_auth.so
account include system-auth
session optional pam_keyinit.so force revoke
session include system-auth

Resources