Node cannot start due to `exitOnParametersMismatch` - corda

I have registered a node with an existing Corda network. When I then try to start the node, I get the following exception:
E 15:32:20+0530 [Network Map Updater Thread-1]
network.NetworkMapUpdater.exitOnParametersMismatch - Node is using
parameters with hash:
6C174011FD30DB2921E2595C927C49035C1287C313F557C69653A2019B04B803 but
network map is advertising:
12693BBBBF3BB89543FA7B08B31F0DC619DA4798DAF571659E2FBD2731415D61. Node
will shutdown now. Please update node to use correct network
parameters file. {}
How can I fix this error?

In my case, the node had an old network-parameters file lying around in its directory from another network.
I simply deleted the existing network-parameters file and restarted the node. It then downloaded the network parameters of the new network automatically and started normally.

Related

Corda Network-Map is up and running, but Notary is not in whitelist

I have a Corda Infrastructure with some nodes and a (not validating) notary. They're all using a Network Map for the compatibility zone, and all the corda nodes, including the notary, download the same network-parameters file.
When executing a flow, Corda gives me an Exception because the Notary is not on the network parameters whitelist. I cannot find anything anything about that on R3 Documentation.
java.lang.IllegalStateException: Notary [O=Notary, L=Cosenza, C=IT (owningKey = DLAdtNkbnrjn6FGwzE4sCaiDS3tRgMw3KhZfA7bD3icYK1)] specified by the transaction is not on the network parameter whitelist: []
at net.corda.core.internal.TransactionUtilsKt.checkNotaryWhitelisted(TransactionUtils.kt:257) ~[corda-core-4.8.jar:?]
Note that I'm using a fixed Notary X500 Name in the Flow code instead of "preferredNotary" because it won't be found. I think it is because of the same problem.
Do I have to do something explicit to add Notary in network parameters whitelist?
Do I have to do something explicit to add Notary in network parameters whitelist?
Yeah you do. Since you are using a network-map-service your node will get its network-parameters from there.
What you'll have to do then is
delete your current network-parameters for every Node.
whitelist your Notary Node into your network-map-service
restart all your Nodes so they can retrieve the new network-parameters from the network-map-service where the new Notary is assigned as such
I don't know which network-map-service exactly you use but i assume its nms by cordite. You can read up on how to whitelist a Notary here: https://gitlab.com/cordite/network-map-service/-/blob/master/FAQ.md#14-start-the-notary-node

terraform GCP VPC connector creation issue

Overview
I tried creating a VPC network, having a subnet and adding a Serverless VPC connector with terraform in GCP. I was following the official guide ( https://cloud.google.com/vpc/docs/configure-serverless-vpc-access#terraform ) and initially everything was working well. After that I accidently commited my JSON key to github, someone stole it and used it for crypto, the project was disabled but shortly after that reinstated
After that my terraform VPC connector creations started to fail. I tried a lot of different things but nothing seems to work(running destroy, changine service accounts, changing names, deleting all of the terraform subfolders, deleting EVERY resource and restarting the process)
The errors I am getting are:
│ Error: Error waiting to create Connector: Error waiting for Creating Connector: Error code 13, message: An internal error occurred: Failed to create a VPC Access connector. Please delete the connector manually.
│
or
│ Error: Error creating Connector: googleapi: Error 409: Requested entity already exists
Today I tried to create VPC connector from the command line(gcloud) and from the UI tool. The errors persisted
Unknown error. Original error message: Operation failed: Insufficient CPU quota in region.
Max throughput of the connector per day over last seven days.
or
An internal error occurred: Failed to create a VPC Access connector. Please delete the connector manually.
errors while deleting:
│ Error: Error waiting for Deleting Network: The network resource 'projects/static-emblem-327016/global/networks/sun-serverless-network' is already being used by 'projects/static-emblem-327016/global/routes/default-route-5cbc9de02e21bb35'
│
I was lookint at this issue https://issuetracker.google.com/issues/164378672 In it I was problems with us-central1 but I tried a couple of different regions and still I have the same issue
Questions:
I am running out of ideas, I was wondering if this is an infrastructural issue, maybe I should dump the project and create a new one ? Where can I check if there are infra issues ? How can I resolve my issue?
I recently get this error Error: Error creating Connector: googleapi: Error 409: Requested entity already exists. So I can explain the root cause and it's fix.
What I was doing is like trying to create a GCP resource (Create PubSub topic) using terraform (plan and then apply).
But before executing the terraform apply, I created the resource manually long time back with the same name. I expected that the terraform plan or terraform apply will not try to create it again since the resource name is same. But instead of Refreshing state, I found it was trying to Creating the resource. The reason it that, terraform does not know about your resource history. Either you need to import your resource history using terraform import command or else delete the manually created resource and then run the terraform apply command.
The message “An internal error occurred: Failed to create a VPC Access connector. Please delete the connector manually” can indicate that you don't have enough resources in your project to create the connector. Please make sure you have enough Resource Quota available in your GCP project.
The message “googleapi: Error 409: Requested entity already exists” indicates that The resource that a client tried to create already exists.
If you want to know what the root cause is, you can check the logs of the VPC Connector creation in the System Event Audit Logs.
System Event audit logs contain log entries for Google Cloud actions that modify the configuration of resources. System Event audit logs are generated by Google systems; they aren't driven by direct user action. System Event audit logs are always written; you can't configure, exclude, or disable them. The instructions to access them are here.
On the other hand, generating and distributing service account keys poses severe security risks to your organization. They are long-lived credentials that are not automatically rotated. These keys can be leaked accidentally or maliciously allow attackers to gain access to your sensitive GCP resources. If you accidentally compromised your JSON Key, please read the recommendations in this link.
If you want to know more about the risk and alternatives to download Service Account, Key please follow this link. Please note that this is not GCP official documentation, so I cannot vouch for its accuracy.
I was able to resolve my issue. It turns out that I had deleted my default compute engine service account in panic. I was able to recover it and everything worked out from there. For more info go here: https://cloud.google.com/iam/docs/creating-managing-service-accounts#undeleting_a_service_account
you have to identify the default service acc for compute engine and undelete it:
gcloud beta iam service-accounts undelete ACCOUNT_ID

Flow test and Accounts

New to Corda and I am trying to run (debug) flow tests using the Corda Accounts in a Mock Network and get the following error :
java.lang.IllegalArgumentException: Corda service com.r3.corda.lib.accounts.workflows.services.KeyManagementBackedAccountService does not exist
when trying to create a anew account, or anything else for that matter. Is there something I am missing ? Any code would be appreciated.
That service is under com.r3.corda.lib.accounts.workflows.services package, meaning it's part of the accounts-workflows CorDapp; so you must include that CorDapp in your mocked network so it gets installed on your mocked nodes:
// Setup network.
network = new MockNetwork(new MockNetworkParameters().withCordappsForAllNodes(ImmutableList.of(
TestCordapp.findCordapp("com.r3.corda.lib.tokens.contracts"),
TestCordapp.findCordapp("com.r3.corda.lib.tokens.workflows"),
TestCordapp.findCordapp("com.r3.corda.lib.tokens.money"),
TestCordapp.findCordapp("com.r3.corda.lib.tokens.selection"),
TestCordapp.findCordapp("com.r3.corda.lib.accounts.contracts"),
// This CorDapp has the missing service from your error message.
TestCordapp.findCordapp("com.r3.corda.lib.accounts.workflows"),
TestCordapp.findCordapp("com.r3.corda.lib.ci")))
In general, if your node is supposed to run some code, you must install that code on that node; otherwise how it will be able to run it? So if you're using some library (e.g Accounts library, Tokens SDK); then you must install it on your node.

Adding new party to the existing network

I have a corda network (corda as system service) (v3.1) running in devMode, the network structure goes like:
Party A
Party B
Party C
NotaryA (simple notary)
NotaryB (validating notary)
Oracle
The network is running perfectly fine until I try to add one more party to the network (Party D). Steps how I try to add new party:
Generate nodeInfo, certificates etc using network-bootstrapper tool for new party
Place the node folder parallel to the other node folders and add required cordapp to the cordapps folder inside the newly added party
Share the nodeinfo to all other nodes and vice-versa
This didn't work, probably because newly added node has a different network parameter file then other nodes and has no information about the notary nodes.
I tried the other way:
Keep node.conf of all the nodes along with the node.conf of new node and generate nodeInfo, network-parameters etc for all nodes.
Place the folder of the new node parallel to other nodes and replace network-parameter, additional-nodeinfo folder and nodeinfo files of old nodes with the newly created files and folders.
Add required cordapps to node/cordapps folders
But this way also it didn't work.
Can you help me with correct steps for adding new node to the existing network?
The bootstrapper can only generate information for a set of nodes that are on the same machine. If a node needs to be added to a bootstrapped network, all the nodes need to be collected back together on the same machine.
The instructions for adding a node to a bootstrapped network are available here: https://docs.corda.net/head/network-bootstrapper.html#adding-a-new-node-to-the-network.

Hue service can't start

I'm running a cloudera cluster of 16 machines in university. A few days ago some machines failed and I had to move their hosted service to other machines. One of these service was Hue. I tried to move the server but when I try to launch it, I get thoses messages:
Command failed to start: com.cloudera.cmf.service.config.ConfigGenException: Unable to generate config file hue.ini for role with type KT_RENEWER: null
Command failed to start: com.cloudera.cmf.service.config.ConfigGenException: Unable to generate config file hue.ini for role with type BEESWAX_SERVER: null
Command failed to start: com.cloudera.cmf.service.config.ConfigGenException: Unable to generate config file hue.ini for role with type HUE_SERVER: null
from its roles.
I did some researches and see similar case with the same errors and the solution was to check again Hue's configuration and set a role for web HDFS, oozie...
But in my case, all roles are set for Hue so I really don't see where does the problem come from...
Did you try to remove and recreate the roles?

Resources