Skip to content
neo3587 edited this page Jun 18, 2019 · 25 revisions

dupmn FAQs

Welcome to the dupmn FAQs, here you should see most of the technical questions that are not explained in the readme.

Note that the word mycoin will be used as a substitute of your actual used coin like CARDbuyers, savenode, cryptoflow, etc, N will be a reference for any number (per example mycoin-cli-N) and prof_name is a reference to the name that you gave to the profile with dupmn profadd prof_file.dmn prof_name.

Index

Basics

What does the readme mean with "main node" or "main instance" ?

The dupmn script won't create the first masternode for you, that means that first you have to install your mycoin masternode and then you can create more masternodes of mycoin in the same VPS, which are considered as "duplicated instances" or just "dupes".

Does the script modify my main node ?

The only way that the script modifies the main node is by forcing it (per example applying the dupmn bootstrap command to the main node) or by having the FORCE_LISTEN=1 parameter in the profile (just will create a bind parameter in the .conf file if doesn't exists when installing a dupe). Some commands may use it for some commands (like generate a new private key) or stop it for a moment and then reenable it (you don't need to activate it again from the wallet when this happens).

What's the RPC port and why is different than the port that I must put in the masternode.conf file ?

The RPC (Remote Procedure Calls) port is the port used to send commands to your mycoin masternode, it's not the port used to communicate with the network, in a technical way, you send commands to the wallet via localhost:RPC_PORT while the wallet is connected with the network via IP_ADDRESS:PORT.

How do I know if mycoin requires a different IP for each node ?

You cannot directly know that, yet most of the coins doesn't require a different IP per node, almost every POS+MN coin (PIVX forks) doesn't require a different IP, tiered MN coins (XDNA forks) usually requires a different IP but it can be a IPv6, so you don't need to pay for an extra IPv4, and POW+MN coins (DASH forks) usually requires a different IPv4. When a dupe is fully synced, mycoin-cli getmasternodestatus may show a message like 'masternode must be listening to the network', in this scenario the profile of mycoin will require the parameter FORCE_LISTEN=1 and a different IP for each node. You can set a IP when installing a dupe with the -ip=IP optional parameter (dupmn install prof_name -ip=IP).

mycoin just got a mandatory update, how do I update the dupes ?

The dupes shares the binaries (mycoind and mycoin-cli) with the main node, so just stop them before the update process with dupmn systemctlall prof_name stop, run the update process and start them again with dupmn systemctlall prof_name start.

What's a systemd service ?

Linux have a folder named /etc/systemd/system that allocates a special text files with a ini format, these files are used for the systemctl commands in order to run a binary file in background, start them on reboot or even restart it if gets closed (per example using mycoin-cli stop will just restart the MN, but using systemctl stop mycoin.service will actually stop the MN). The dupmn script always creates a systemd service for every dupe created and will show some basic systemctl commands when installing/reinstalling a dupe with the service file associated to that dupe.

Some commands says that main MN service couldn't be found in the profile

That either means that you didn't set the COIN_SERVICE optional parameter in the profile or that the main MN just doesn't have a service, check What's a systemd service ? for more info.

File generation

The dupmn script will generate the following folders and files (modifying them can generate unexpected errors):

  • /root/.dupmn/ : Contains the dupmn conf file and a copy of the profiles will be stored.
  • /root/.dupmn/dupmn.conf : Contains the nº of nodes created with dupmn for each profile.
  • /root/.mycoinN/ : Contains the data of the dupe N.
  • /usr/bin/mycoind-N : A reference to the daemon of the dupe N.
  • /usr/bin/mycoin-cli-N : A reference to the client of the dupe N.
  • /usr/bin/mycoind-0 : A reference to the daemon of the main node.
  • /usr/bin/mycoin-cli-0 : A reference to the client of the main node.
  • /usr/bin/mycoind-all : A reference to all the daemons of mycoin.
  • /usr/bin/mycoin-cli-all : A reference to all the clients of mycoin.
  • /etc/systemd/system/mycoin-N.service : The systemctl service for the dupe N.
  • /etc/init.d/dupmn_ipmanage : A script to avoid the deletion of the ips added with dupmn ipadd after rebooting the VPS.
  • /mnt/dupmn_swapfile : The swapfile generated if you used dupmn swapfile.

Troubleshooting

Why some of my dupes are not syncing ?

That's a pretty common issue with every existing masternode, you just need to add nodes, you just need to type mycoin-cli-N addnode IP onetry, the IPs are usually obtained from the coin explorer or just asking for addnodes in the coin discord, it's recommended to add a few nodes, another option is to use the extra parameter -bootstrap on install.

Why some of my dupes shows the same output when using mycoin-cli-all masternode status ?

That means that somehow you ended with 2 or more dupes using the same RPC port, so you're using the masternode status command to the same dupe, you can fix it by looking which nodes have the same RPC port with dupmn list prof_name and then using dupmn rpcchange prof_name N where N is a dupe that has the same rpc port than another dupe, repeat it until every dupe has a different RPC port.

Tips and Tricks

Every dupe makes a copy af the main node and then modifies some specific parameters, so if the main node .conf file has some addnodes, then they'll be copied to every new installed dupe.