Common problems with N|Solid 3.x

Console is not using my license

Starting an instance of N|Solid Console, by default you would use the License Key provided on the First Use pages of the Console or setting the NSOLID_CONSOLE_LICENSE_KEY environment variable to activate the new instance of N|Solid. If the environment where the Console is running has no access to internet and cannot contact the NodeSource web services, the Console would not be activated and impossible to start using it.

Cause

There's a main reason for this problem:

  • You are trying to reach NodeSource web services to activate your product from an environment without internet access.

Solution

You must provide your license in the form of a signed token. This can be obtained from a running licensed N|Solid Console by running nsolid-cli license-token or by querying http://console:6753/api/v3/license-token directly. If you do not have a N|Solid Console available, you can contact NodeSource Support and they can provide you with one. The token will be valid for the duration of your license period and must be refreshed when your expiration date is extended.

Your valid license token can be specified as the NSOLID_LICENSE_TOKEN environment variable or included in the nsolid section of package.json as "licenseToken".

If your system is not able to contact the NodeSource web services, you may use the license token as described previously by pasting it into the License Key entry field in your N|Solid Console. Make sure you are not passing your xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx license key as the token value. This is your license key and cannot be used in offline licensing

Common problems with N|Solid 2.x

Processes are not showing in N|Solid console

When running applications with N|Solid, by default this will connect to local storage and will display in the N|Solid console connected to this local storage. However, most production cases will need to connect to an external storage and this problem could arise.

Cause

There are two different causes for this problem:

  • The NSOLID_COMMAND environment variable is not properly set before running the process.

  • All required ports are not accessible for the machines running processes.

Solution

  • Check the NSOLID_COMMAND environment variable and detect if is not properly set before running the process, have in mind that this should point to the remote host running the storage and also make sure to specify the same value already placed in the commandBindAddr configuration option of the storage, it should include the port configured there (if no port is specificied, 9001 is used). For more information please check this documentation for process configuration and also storage configuration.

  • Check if the configured ports for all different networking options are accessible from the host where the process is trying to connect. Check what ports are configured in storage (by default 400, 9001, 9002 and 9003) and test those using Telnet from the the source host. If Telnet is not able to connect, there might be a firewall preventing access to those ports. In a basic setup where the storage machine is using just iptables to control the networking access, this could be solved with this command:

iptables -I INPUT 1 -i eth0 -p tcp --match multiport --dports 4000,9001,9002,9003 -s 10.0.0.2 -j ACCEPT

eth0 being the interface used for the networking, 4000,9001,9002 and 9003 the required ports and 10.0.0.2 the IP address for the machine connecting to the storage.

Common problems with N|Solid 1.x

N|Solid reconnection failed.

N|Solid has a reconnection mechanism that allow its components and your application keep communicating whith the hub after network disruptions.

In some network circumstances, this mechanism can fail to automatically reconnect.

Cause

When an N|Solid process runs, it gets registered to the hub with the actual network IP. If you switch to another network while the app is still running and the network IP changes, the app will not be reachable from the hub and it will disappear from the Console.

This will also happen if you set the NSOLID_SOCKET to a fixed IP and the network IP is changed.

For example:

On development machines we tend to switch between networks. If I ran an N|Solid process, the agent registered to the Hub with an IP from my actual network, when I switch to another network the agent is still registered with an IP from previous network. This means that the Proxy can't reach that agent process and isn't shown in the Console.

NSOLID_APPNAME=my-app NSOLID_HUB=2379 NSOLID_SOCKET=192.168.1.100 npm start

With these settings, if your network configuration changes it's possible that my-app disappears from the Console and won't show up.

Solution

For a quick and easy solution you can set the NSOLID_SOCKET to localhost:

NSOLID_APPNAME=my-app NSOLID_HUB=2379 NSOLID_SOCKET=localhost npm start

Every time the local network changes, your N|Solid agent process will still be running on the same IP.