How to install neo4j on Nitrous.IO? - neo4j

Here's what I've attempted via the Nitrous.IO Console:
wget http://dist.neo4j.org/neo4j-community-1.9.4-unix.tar.gz
tar xvfz neo4j-community-1.9.4-unix.tar.gz
mv neo4j-community-1.9.4 neo4j
neo4j/bin/neo4j start
Here is what it says:
WARNING: Max 512 open files allowed, minimum of 40 000 recommended. See the Neo4j manual.
neo4j/bin/neo4j: line 143: lsof: command not found
Using additional JVM arguments: -server -XX:+DisableExplicitGC -Dorg.neo4j.server.properties=conf/neo4j-server.properties -Djava.util.logging.config.file=conf/log
ging.properties -Dlog4j.configuration=file:conf/log4j.properties -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled
Starting Neo4j Server...WARNING: not changing user
process [1470]... waiting for server to be ready.neo4j/bin/neo4j: line 143: lsof: command not found
.neo4j/bin/neo4j: line 143: lsof: command not found
.neo4j/bin/neo4j: line 143: lsof: command not found
Do I need to install lsof on my box? Are we able to do so ourselves on Nitrous.IO?

The Nitrous box does not include lsof by default, and since you don;t have root access you will want to download and install lsof into your home directory.
Once installed, you will want to add it to your PATH. You can download lsof here http://freshmeat.net/projects/lsof/ .

Related

Build HDFView 3.1 on ubuntu-20.04

I have downloaded the deb file from the https://support.hdfgroup.org/ftp/HDF5/releases/HDF-JAVA/hdfview-3.1.2/bin/ link and install it via
sudo dpkg -i hdfview_3.1.2-1_amd64.deb
I didn't see any error during installation.
But hdfview didn't open.
I am using java-1.11.0-openjdk and hdf5-1.10.
How to solve this problem?
I found a way to solve this. The program gets installed in /opt/hdfview. However, starting it causes the error
$ ./bin/HDFView
Error: dl failure on line 534
Error: failed /opt/hdfview/lib/runtime/lib/server/libjvm.so, because /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /opt/hdfview/lib/runtime/lib/server/libjvm.so)
Failed to launch JVM
We can fix this by patching the libjvm.so file:
Install java-15 if it is not present already:
sudo apt install openjdk-15-jre
Find the libjvm.so file:
cd /usr/lib
find . -name libjvm.so
In my case, the correct version is located in /usr/lib/jvm/java-15-openjdk-amd64/lib/server/libjvm.so
Replace the libjvm.so in hdfview with a symlink to this libjvm.so
cd /opt/hdfview/lib/runtime/lib/server
sudo mv libjvm.so libjvm.so.bak
sudo ln -s /usr/lib/jvm/java-15-openjdk-amd64/lib/server/libjvm.so libjvm.so
(optional) link the hdfview binary, so that it is found in the terminal
sudo ln -s /opt/hdfview/bin/HDFView /usr/local/bin/hdfview
Afterwards, you should be able to start hdfview both from the terminal and the icon.

NetSuite 64bit ODBC Driver installation on Ubuntu 18.04 Cluster giving error:- Can't open lib '/opt/netsuite/odbcclient/lib64/ivoa27.so

Have been running around this issue since 2-3 days now with no luck. Hope someone guides me and help resolve this issue here.
I am running a Python application from /home/admin/app/example.py directory in a 3 node Ubuntu 18.04 clustered environment which is supposed to connect to NetSuite via ODBC and read list of tables. The code and directory setup is same across all 3 nodes. There's a load balancer routing request to all these 3 nodes.
Here's example how the connection is made via PyODBC module:
import pyodbc
cnxn = pyodbc.connect('DSN=NetSuite;UID=user;PWD=pass'.format(dsn, uid, pwd), autocommit=True)
cursor=cnxn.cursor()
tables_list = []
for row in cursor.tables():
tables_list.append(row.table_name)
print (tables_list)
However, while running the python application on cluster, I am always getting error as:- Can't open lib '/opt/netsuite/odbcclient/lib64/ivoa27.so; even though the driver file, all its dependencies (via ldd command) and all the path variables i.e. $LD_LIBRARY_PATH, $ODBCINI and $OASDK_ODBC_HOME exists and is set to be available system-wide (added under /etc/environment file) as below on all the 3 nodes:
PYTHON_APP_HOME=/home/admin/app/
LD_LIBRARY_PATH="/opt/netsuite/odbcclient/lib64"
ODBCINI="/opt/netsuite/odbcclient/odbc64.ini"
OASDK_ODBC_HOME="/opt/netsuite/odbcclient/lib64"
Here's the output from "ldd" command for driver dependencies:
-rwxr-xr-x 1 root root 3277375 Jul 25 16:03 ivoa27.so
/opt/netsuite/odbcclient/lib64$ ldd /opt/netsuite/odbcclient/lib64/ivoa27.so
linux-vdso.so.1 (0x00007fff401a2000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fee1d589000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fee1d385000)
libicuuc.so.42 => /opt/netsuite/odbcclient/lib64/libicuuc.so.42 (0x00007fee1d12b000)
libicudata.so.42 => /opt/netsuite/odbcclient/lib64/libicudata.so.42 (0x00007fee1c0e6000)
libpam.so.0 => /lib/x86_64-linux-gnu/libpam.so.0 (0x00007fee1bed8000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fee1bcb9000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fee1b930000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fee1b592000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fee1b37a000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fee1af89000)
/lib64/ld-linux-x86-64.so.2 (0x00007fee1db3c000)
libaudit.so.1 => /lib/x86_64-linux-gnu/libaudit.so.1 (0x00007fee1ad60000)
libcap-ng.so.0 => /lib/x86_64-linux-gnu/libcap-ng.so.0 (0x00007fee1ab5b000)
Below is how the steps were performed as per Netsuite driver README.txt instructions and the ODBC driver is setup similarly across all the 3 nodes on Ubuntu 18.04 OS.
The Netsuite 64bit Linux driver files/folders are unpacked and copied at location:
$cd /opt/netsuite/odbcclient/*. This entire dir,sub-dir & files within have both r+x permissions.
Installed libraries $sudo apt install unixodbc && apt-get install unixodbc-dev
Executed script/command provided by Netsuite from dir /opt/netsuite/odbcclient:- $source oaodbc64.sh (since it's a bash shell). This sets up the same variables as shown above.
From the same directory/folder ran below command for registering it as system-wide Driver:
$sudo odbcinst -i -d -f /opt/netsuite/odbcclient/odbcinst.ini
which returned message as:
odbcinst: Driver installed. Usage count increased to 1.
Target directory is /etc
odbcinst: Driver installed. Usage count increased to 1.
Target directory is /etc
Then ran below command also for installing it as system DSN:-
$sudo odbcinst -i -s -l -f /opt/netsuite/odbcclient/odbc64.ini
After this, checked /etc directory where both odbc.ini and odbcinst.ini files where created/registered. Both *.ini files were also given execute permissions to all.
-rwxr-xr-x 1 root root 500 Jul 24 10:31 odbc.ini
-rwxr-xr-x 1 root root 199 Jul 24 10:31 odbcinst.ini
$odbcinst -j
unixODBC 2.3.4
DRIVERS............: /etc/odbcinst.ini
SYSTEM DATA SOURCES: /etc/odbc.ini
FILE DATA SOURCES..: /etc/ODBCDataSources
USER DATA SOURCES..: /opt/netsuite/odbcclient/odbc64.ini
SQLULEN Size.......: 8
SQLLEN Size........: 8
SQLSETPOSIROW Size.: 8
$odbcinst -q -d
[ODBC Drivers]
[NetSuite ODBC Drivers 8.1]
$odbcinst -q -s
[NetSuite]
[ODBC]
I am also able to connect from each individual nodes via isql and also by running the example.py via python shell locally.
$isql -v 'NetSuite' 'user' 'pass'
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL>
But when running the same on cluster, it gives same error always. Please help. I am sure am missing something.
Here's the output of odbc.ini and odbcinst.ini files from /etc directory:
/etc$ more odbcinst.ini
[ODBC Drivers]
NetSuite ODBC Drivers 8.1=Installed
UsageCount=1
[NetSuite ODBC Drivers 8.1]
APILevel=1
ConnectFunctions=YYN
Driver=ivoa27.so
DriverODBCVer=03.52
FileUsage=0
SQLLevel=1
UsageCount=1
/etc$ more odbc.ini
[ODBC Data Sources]
NetSuite=NetSuite ODBC Drivers 8.1
[NetSuite]
Driver=/opt/netsuite/odbcclient/lib64/ivoa27.so
Description=Connect to your NetSuite account
Host=XXXXX.connect.api.netsuite.com
Port=1708
ServerDataSource=NetSuite.com
Encrypted=1
Truststore=/opt/netsuite/odbcclient/cert/ca3.cer
CustomProperties=AccountID=XXXXX;RoleID=XXXX
[ODBC]
Trace=0
IANAAppCodePage=4
TraceFile=odbctrace.out
TraceDll=/opt/netsuite/odbcclient/lib64/ddtrc27.so
InstallDir=/opt/netsuite/odbcclient
Tried below other things that didn't work:
Added ODBC variable paths within .profile,.bashrc ,/etc/profile,/etc/bash.bashrc other than /etc/environment.
Changed the owner of /lib64/ folder and all files within it and *.ini files under /etc from root to admin.
By creating symbolic links:
sudo ln -s /etc/odbcinst.ini /usr/local/etc/odbcinst.ini
sudo ln -s /etc/odbc.ini /usr/local/etc/odbc.ini
Thanks !!
UPDATE - SOLVED !! One important step that was missing from our end was the reboot/restart of all the nodes for those 3 variables to take into system-wide effect after it had been added into /etc/environment file(s).
In order to investigate, we printed below additional things into our code to ensure that it indeed is a 64 bit platform/architecture, drivers and datasources are registered and listed. However, the variables were still showing blanks/none. That verified that although the variable path was set/effective locally when running from individual nodes. However, when running from outside/via remote session, the variable values didn't get apply.
import os
import pyodbc
import platform
print(platform.architecture())
print (pyodbc.drivers())
print(pyodbc.dataSources())
print(os.environ["LD_LIBRARY_PATH"])
print(os.environ["ODBCINI"])
print(os.environ["OASDK_ODBC_HOME"])
Before reboot:
[2020-07-27 18:46:51,948] {logging_mixin.py:112} INFO - ('64bit', 'ELF')
[2020-07-27 18:46:51,949] {logging_mixin.py:112} INFO - ['ODBC Drivers', 'NetSuite ODBC Drivers 8.1']
[2020-07-27 18:46:51,950] {logging_mixin.py:112} INFO - {'NetSuite': '/opt/netsuite/odbcclient/lib64/ivoa27.so', 'ODBC': ''}
[2020-07-27 18:46:51,950] {logging_mixin.py:112} INFO - Error: 'LD_LIBRARY_PATH'
After reboot:
[2020-07-28 06:11:59,961] {logging_mixin.py:112} INFO - ('64bit', 'ELF')
[2020-07-28 06:11:59,963] {logging_mixin.py:112} INFO - ['ODBC Drivers', 'NetSuite ODBC Drivers 8.1']
[2020-07-28 06:11:59,965] {logging_mixin.py:112} INFO - {'NetSuite': '/opt/netsuite/odbcclient/lib64/ivoa27.so', 'ODBC': ''}
[2020-07-28 06:11:59,965] {logging_mixin.py:112} INFO - /opt/netsuite/odbcclient/lib64
[2020-07-28 06:11:59,965] {logging_mixin.py:112} INFO - /opt/netsuite/odbcclient/odbc64.ini
[2020-07-28 06:11:59,965] {logging_mixin.py:112} INFO - /opt/netsuite/odbcclient/lib64

TinyOS not compiling/uploading to TelosB mote

I'm running into a problem attempting to upload the "blink" app onto the motes. I can't seem to run the command make telosb reinstall bsl,/dev/ttUSB0 or make telosb reinstall while in the apps/Blink directory, which is preventing me from moving on with my project. I've tried as a user, superuser, and as root. I've outlined below the responses from variable commands. [Running Ubuntu 16.04, TinyOS 2.1.2, ncc version 1.4.2, nescc version 1.3.6]
(A)With root and the make telosb command I get back:
mkdir -p build/telosb
compiling BlinkAppC to a telosb binary
ncc -o build/telosb/main.exe -Os -fnesc-separator=__ -Wall -Wshadow -Wnesc-all -target=telosb -fnesc-cfile=build/telosb/app.c -board= -DDEFINED_TOS_AM_GROUP=0x22 -DIDENT_APPNAME=\"BlinkAppC\" -DIDENT_USERNAME=\"root\" -DIDENT_HOSTNAME=\"liam-Latitude-E\" -DIDENT_USERHASH=0x9236fe46L -DIDENT_TIMESTAMP=0x59384a62L -DIDENT_UIDHASH=0xdc08609fL BlinkAppC.nc -lm
compiled BlinkAppC to build/telosb/main.exe
2538 bytes in ROM
56 bytes in RAM
msp430-objcopy --output-target=ihex build/telosb/main.exe build/telosb/main.ihex
writing TOS image
(B)With regular user and the make telosb command I get back:
mkdir -p build/telosb
/bin/sh: 1: cannot create build/telosb/ident_flags.txt: Permission denied
/home/liam/tinyos-main/support/make/ident_flags.extra:13: recipe for target 'ident_cache' failed
make: *** [ident_cache] Error 2
(C)With a super user and the sudo make telosb command I get back:
make: *** No rule to make target 'telosb'. Stop.
(D)With root and the make telosb reinstall command I get back:
cp build/telosb/main.ihex build/telosb/main.ihex.out
found mote on /dev/ttyUSB0 (using bsl,auto)
installing telosb binary using bsl
tos-bsl --telosb -c /dev/ttyUSB0 -r -e -I -p build/telosb/main.ihex.out
MSP430 Bootstrap Loader Version: 1.39-goodfet-8
Mass Erase...
Transmit default password ...
Invoking BSL...
Transmit default password ...
Current bootstrap loader version: 1.61 (Device ID: f16c)
Changing baudrate to 38400 ...
MSP430 Bootstrap Loader Version: 1.39-goodfet-8
Mass Erase...
Transmit default password ...
Invoking BSL...
Transmit default password ...
Current bootstrap loader version: 1.61 (Device ID: f16c)
Changing baudrate to 38400 ...
Traceback (most recent call last):
File "/usr/bin/tos-bsl", line 1918, in <module>
main(0);
File "/usr/bin/tos-bsl", line 1843, in main
speed=speed,
File "/usr/bin/tos-bsl", line 1218, in actionStartBSL
self.actionChangeBaudrate(speed) #change baudrate
File "/usr/bin/tos-bsl", line 1345, in actionChangeBaudrate
self.serialport.setBaudrate(baudrate)
AttributeError: 'Serial' object has no attribute 'setBaudrate'
/home/liam/tinyos-main/support/make/msp/bsl.extra:45: recipe for target 'program' failed
make: *** [program] Error 1
(E)Whereas with a regular user and make telosb reinstall I get back:
cp build/telosb/main.ihex build/telosb/main.ihex.out
cp: cannot create regular file 'build/telosb/main.ihex.out': Permission denied
/home/liam/tinyos-main/support/make/msp/msp.rules:92: recipe for target 'setid' failed
make: *** [setid] Error 1
I have been all over the internet and online forums and haven't found a fix yet. I researched around (D) and found that perhaps python 2 might have changed the name of 'setBaudRate' variable. I'm not sure how to change that either.
Thank you for your time and help!
edit: added ncc and nescc versions.
This stack overflow answer is applicable to TinyOS.
So it turns out that pyserial 3.0.1 is not compatible with the TinyOS app, Blink. I'm fairly certain that pyserial 3.0.1 came with the package for TinyOS. To fix this, use the command sudo pip install "pySerial>=2.0,<=2.99999". For me, it kicked back:
The directory '/home/liam/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/liam/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting pySerial<=2.99999,>=2.0
Installing collected packages: pySerial
Found existing installation: pyserial 3.0.1
DEPRECATION: Uninstalling a distutils installed project (pySerial) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
Uninstalling pyserial-3.0.1:
Successfully uninstalled pyserial-3.0.1
Successfully installed pySerial-2.7
But the blink app still uploaded and worked fine.

How to install Apple iOS on qemu (it is possible now?)

I try to use https://github.com/nvsio/qemu-ios I follow README.txt
It compiles fine:
./configure --target-list=arm-softmmu --enable-sdl --enable-skinning
4 make
But when I run it:
./arm-softmmu/qemu-system-arm -M ipad1g -option-rom iBoot.k48ap.RELEASE.unencrypted -global s5l8930_h2fmi0.file="0,ce0.bin;2,ce2.bin" -global s5l8930_h2fmi1.file="0,ce1.bin;2,ce3.bin" -pflash ipadnor.bin -gdb tcp::6666 -nographic -S -serial file:serial.txt -monitor stdio -smp 2
Now getting this error :
qemu-system-arm: -pflash ipadnor: could not open disk image ipadnor: No such file or directory
I can't find ipadnor.bin anywhere, what am I doing wrong?

Neo4j lsof: command not found at db server startup

I am getting an endless stream of errors (as follows) when attempting to start the database server - until I am stopping it with CTRL + C in the terminal. Does anyone have idea what is wrong?
$ rake neo4j:start
Starting Neo4j development...
db/neo4j/development/bin/neo4j: line 147: lsof: command not found
db/neo4j/development/bin/neo4j: line 147: lsof: command not found
db/neo4j/development/bin/neo4j: line 147: lsof: command not found
db/neo4j/development/bin/neo4j: line 147: lsof: command not found
^Crake aborted!
Interrupt:
For me the below worked:
yum install lsof
I solved this after I added /usr/sbin to the PATH.
Here it is:
levi$ echo $PATH
/Users/levi/.rbenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin/:/Applications/Sublime Text.app/Contents/SharedSupport/bin
Instead lsof ,,,,,, Try to use
/usr/sbin/lsof $FILE
Where $FILE is path of a file
According to colucix, the lsof command is available only to root.
if you want to run it as a non root user, you can specify its full path.
$ /usr/sbin/lsof /path/to/some/file
Also Philip Reynolds has pointed out that you can specify an sudo alias for lsof if it suites you.
In ubuntu 16.04 it worked after installing lsof
sudo apt-get install lsof

Resources