Common problems and resolutions

From Nxt Wiki
Jump to: navigation, search
Other languages:česky 94% • ‎English 100% • ‎español 100% • ‎français 100% • ‎Nederlands 100% • ‎português do Brasil 25% • ‎русский 100% • ‎Türkçe 25% • ‎中文(简体)‎ 100%

General software problems

When I try to start the software, I get a Java error.

Nxt relies on Java v1.7 and the latest version of the Java Developer's Kit.  Make sure you download and install latest version installed from Oracle! You can check to see which version of Java is running on your computer by running the following command in a terminal window:

java -version

I get "java.lang.NullPointerException" when trying to open http://localhost:7874/ or http://127.0.0.1:7874

This generally means your blockchain has been corrupted. Sometimes stopping and restarting your server is all it takes to resolve this condition. Try that, and if it doesn't work, follow the steps in "my blockchain won't load".

When I access my server, I get a black screen and the words "The matrix has you". What is happening?

If you are running Nxt on your local computer AND are accessing it by browsing to https://127.0.0.1:7875/ (or https://localhost:7875/), you should not get this error. But it will likely appear if you have installed Nxt on a public server, VPS and are trying to access it remotely. For security reasons, the software is distributed under the assumption that the only way you access Nxt is from your local computer. This is the most secure way to use Nxt. If you want to be able to access and log in to your client from elsewhere, and have not edited the configration files to allow this, you will get the "matrix" message. To remove this, you need to edit a configuration file. Under your nxt folder, you will find a web.xml file in webapps/root/WEB-INF. Open this file in a text editor and look for a parameter called "allowedUserHosts". Add any IP addresses to the list that you want. If you are not concerned about security, delete all the existing addresses and enter *. Be warned that this means that your server will accept logins from anyone... including hackers and attackers.

I cannot load the client in a web browser

Nxt uses a couple of different ports, but each port uses a different protocol.  To access your client with an unencrypted connection, use this address:

http://localhost:7874/

To access your client with an encrypted connection, use this address:

https://localhost:7875/

For port 7874, you MUST use http.  For port 7875, you MUST use https. If neither of these addresses work, you can also try these addresses:

http://127.0.0.1:7874/
https://127.0.0.1:7875/

My blockchain won't load!

Your data files may have been corrupted.  Try the following steps:

  • Stop your Java software.
  • Navigate to your "nxt" folder and delete all the files ending in ".nxt" (NOT ".nxt.bak"!)  
  • Restart your Nxt software, wait a few minutes, and then check the Nxt client to see if the blockchain has begun to load.  If not:
    • Stop your Java software again.
    • Download new blockchain files manually from this location .  Unzip the files and use them to replace the ones in your "nxt" folder.
    • Restart your Nxt software, wait a few minutes, and then check the Nxt client to see if the blockchain has begun to load.  If not:
      • Stop your Java software
      • Delete your "nxt" folder
      • Re-download and re-install the Nxt software

My blockchain files keep getting corrupted

Often, the blockchain files get corrupted as a result of the Nxt software being forcefully terminated (by using Ctrl-C in Windows, by forcibly closing the terminal window, or by using "kill -9" in UNIX).  To create a more graceful means of stopping the software, alter your "java" command for starting Nxt to something like the following:

java -jar start.jar STOP.PORT=<port> STOP.KEY=<password>

where:

  • <port> is any available TCP port.  Almost any number between 10000 and 65535 should be fine.
  • <password> is any simple password 

When your Nxt software is started in this way, you will be able to exit it gracefully by running the following command:

java -jar start.jar STOP.PORT=<port> STOP.KEY=<password> --stop

where <port> and <password> are the same values you used when starting the server.

When running the software, I either don't get any blocks, or start to see negative blocks

Sometimes your client stops getting new blocks or it gets negative blocks, even if you have a well-configured web.xml with lots of good nodes / peers. If you're facing this problem, try hitting "reload" in your browser and unlock your account again. The issue may simply be a display error in your client. If this does not work, follow these steps:

  1. Close your browser
  2. Close your server-window (the Java application).
  3. Go into your NXT-folder
  4. Delete the files blocks.nxt and transactions.nxt
  5. Remove the .bak (including the period) from the backup files blocks.nxt.bak and transactions.nxt.bak
  6. Restart your server
  7. Open https://127.0.0.1:7875 and log in to your account again
  8. Wait a few minutes to see if the blockchain gets updated

MacOS-specific software problems

I'm running MacOS 10.6, and it won't support Java 1.7. Do I have to update MacOS?

No! There is a workaround for installing Java JDK 1.7 on MacOS 10.6. You must be comfortable editing plist files in order to use this workaround.

  1. Go to:
    • /System/Library/CoreServices
  2. Edit:
    • SystemVersion.plist
  3. Change: ProductUserVisibleVersion = 10.6.x and ProductVersion = 10.6.x to:
    • ProductUserVisibleVersion = 10.7.8
    • ProductVersion = 10.7.8
  4. Install JDK 7 and change SystemVersion.plist back to normal
  5. Go to and open /Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk
  6. Uncheck both Java 6 VMs. Now Java 7 will load first.

Raspberry Pi software problems

Getting java.lang.NullPointerException when open the client in your browser?

If this is happening, it is likely that he blockchain files are corrupted.

  1. Delete:
    • blockchain.nrs
    • blockchain.nrs.bak
    • blocks.nxt
    • transactions.nxt
    • transactions.nxt.bak
  2. Replace the files with the files in the nxt.zip archive (blockchain.nrs, blocks.nxt, transactions.nxt)

After connecting with your browser and entering your passphrase, the account interface cannot be opened after a long period

In nxt/nxterr.txt there is an error like "DOS ALERT: Request from 192.168.1.20". This means the Nxt software is still running but your remote ip is blocked by Denial-of-Service (DOS) protection. You'll probably see that, in this case, opening the account locally from the Raspberry Pi browser does work. To solve this error:

  1. Edit your web.xml file:
    nano nxt/webapps/root/WEB-INF/web.xml
  2. Add a new init-param:
    <init-param><param-name>ipWhitelist</param-name>
    <param-value>192.168.1.20;</param-value>
    </init-param>
    • (replace 192.168.1.20 with your remote ip

It should look like this example:

<filter>
	<filter-name>DoSFilter</filter-name>
	<filter-class>org.eclipse.jetty.servlets.DoSFilter</filter-class>
	<init-param>
		<param-name>maxRequestsPerSec</param-name>
		<param-value>3000</param-value>
	</init-param>
	<init-param>
		<param-name>delayMs</param-name>
		<param-value>1000</param-value>
	</init-param>
	<init-param>
		<param-name>ipWhitelist</param-name>
		<param-value>192.168.1.20;</param-value>
	</init-param>
	<init-param>
		<param-name>trackSessions</param-name>
		<param-value>false</param-value>
	</init-param>
	<async-supported>true</async-supported>
</filter>

Now you should be able to connect with your remote browser again.

Error: java.lang.IllegalStateException: AsyncContext completed

After a few hours you get many errors like this in nxt/nxtout.txt. The error appears several times per second and the client gets stuck. This may be due to memory leak that is fixed in 0.4.8, which is not yet released.

Account problems

The client says I have 0 NXT in my account but I have not transferred my coins anywhere

This could happen for two reasons:

  • The blockchain has not been completely downloaded in your software yet, and the blocks containing your deposits are yet to be downloaded. Check the time stamp on the latest block in the "Blocks" panel. If it is not very recent (within a minute or two), wait and give the software some time to catch up. If you are impatient, you can download an almost-complete blockchain from this location -- just unzip them into your "nxt" folder.
  • There appears to be a bug in the client software right now that causes balances to be improperly shown. Try stopping and restarting your Java software, and then unlock your account again.

I created an account but I don't see it referenced in the blockchain

In general, you can use the Nxt blockchain explorer to search for your account, examine your balance, transaction history, and more.  Information about your account will not appear in the blockchain until there is at least one confirmed transaction that references your account.  This is because the blockchain is a record of transactions, not account information. If you have created an account but have never sent any Nxt to it, the account will not appear in the blockchain. From here, you may want to learn more about the Nxt client or read our FAQ!

How long should I wait after restarting? For one server I've been waiting for 10 mins and it's still stuck.

It depends on what is going on. Set "communicationLoggingMask" to "3" in web.xml and read the log. If you see a lot of "connection timeout" errors then set "connectTimeout" and "readTimeout" to higher values. Also make sure that "pullThreshold" is "1" or higher.