public static long getNode() {
	 try {
			final Enumeration<NetworkInterface> interfaces = NetworkInterface.getNetworkInterfaces();
			if (interfaces != null && interfaces.hasMoreElements()) {
				for (NetworkInterface iface = interfaces.nextElement(); interfaces.hasMoreElements(); iface = interfaces.nextElement()) {
					try {
						// Try to find a real interface to use the MAC address from
						if (!iface.isLoopback() && !iface.isVirtual()) {
							final byte[] address = iface.getHardwareAddress();
							if(address != null) {
							long result = 0;
							for (final byte x : address) {
								result = result << 8 | x & 0xFF;
							}
							return  result;
							}
						}
					} catch (final SocketException ex) {
						// Ignore any socket exception and continue
					}
				}
			}
		} catch (final SocketException e) {
			// Ignore any socket exception and try the next method
		}

		// If we can not find anything, just use a random number
		return new Random(System.nanoTime()).nextLong() & 0xFFFFFFFFFFFFL;
	}