Command CALL dbms.procedures() shows the standard 25 dbms procedures, cannot see APOC procedures. Any call to these procedures outputs an error saying that it cannot find it and to check spelling, etc.
Neo4j Community 3.2.5
Added apoc-3.2.3.5-all.jar fils in /plugins folder as listed in start prompt below:
Active database: cnaf_v1_20171218.db
Directories in use:
home: /data/neo4j/neo4j-community-3.2.5
config: /data/neo4j/neo4j-community-3.2.5/conf
logs: /data/neo4j/neo4j-community-3.2.5/logs
plugins: /data/neo4j/neo4j-community-3.2.5/plugins
import: /data/neo4j/neo4j-community-3.2.5/import
data: /data/neo4j/neo4j-community-3.2.5/data
certificates: /data/neo4j/neo4j-community-3.2.5/certificates
run: /data/neo4j/neo4j-community-3.2.5/run
Starting Neo4j.
Started neo4j (pid 44178). It is available at ... There may be a short delay until the server is ready.
See /data/neo4j/neo4j-community-3.2.5/logs/neo4j.log for current status.
Relevant conf/neo4j.conf file settings:
# The name of the database to mount
dbms.active_database=cnaf_v1_20171218.db
# Paths of directories in the installation.
dbms.directories.plugins=plugins
# added these based on other stack overflow APOC-based posts
dbms.security.procedures.unrestricted=apoc.*
apoc.export.file.enabled=true
Other:
$ ls -al plugins/
total 7104
drwxr-xr-x 2 neo4j neo4j 34 Jan 17 14:04 .
drwxr-xr-x 11 neo4j neo4j 4096 Jan 17 15:22 ..
-rwxrwxrwx 1 neo4j neo4j 7270364 Jan 17 14:06 apoc-3.2.3.5-all.jar
Related
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
I'm brand new, fresh and clean with Neo4J. Just downladed and installed the Neo4J Desktop application, working offline. Noticed that the plugins don't get the install button enabled.
Creating a graph DB and trying to install manually the apoc plugin with latest jar file (compatible one), it fails to get loaded apparently.
Using NEO4J Desktop 1.1.17 offline + server 3.5.2 + APOC 3.5.0.2 jar in plugins folder
I've followed the online doc and updated neo4j conf auhtorizing things in there.
dbms.security.procedures.unrestricted=apoc.*
dbms.security.procedures.whitelist=apoc.*
Restarted things but still with no success. What Am I doing wrong in here ?
Seems quite a basic issue but as there is no stupid question...
Thanks for your feedbacks
Best regards
Any hint.
I have neo4j server (not desktop) version 3.5.4.
I downloaded apoc 3.5.0.3 which if memory serves was a zip archive. After unzipping, I copied the one jar into my plugins directory.
I modified the config file as you indicated. I used commas to separate the entries.
I did not update the whitelist parameter which remains commented out in my config file.
Next I restarted neo4j and the apoc procedures seem to work.
Have a look at my transcript below for the details of my setup:
gmc#linux-ihon:/usr/local/neo4j-community-3.5.4> ls -l plugins
total 14808
-rw-r--r-- 1 gmc users 13695353 Apr 18 09:51 apoc-3.5.0.3-all.jar
-rw-r--r-- 1 gmc users 1459334 Apr 11 00:34 graph-algorithms-algo-3.5.4.0.jar
-rw-r--r-- 1 gmc users 2217 Apr 3 18:09 README.txt
gmc#linux-ihon:/usr/local/neo4j-community-3.5.4> grep whitelist conf/neo4j.conf
#dbms.security.procedures.whitelist=apoc.coll.*,apoc.load.*
gmc#linux-ihon:/usr/local/neo4j-community-3.5.4> grep unrestricted conf/neo4j.conf
#dbms.security.procedures.unrestricted=my.extensions.example,my.procedures.*
dbms.security.procedures.unrestricted=apoc.*,algo.*
gmc#linux-ihon:~> cypher-shell --username neo4j
password: ****
Connected to Neo4j 3.5.4 at bolt://localhost:7687 as user neo4j.
Type :help for a list of available commands or :exit to exit the shell.
Note that Cypher queries must end with a semicolon.
neo4j> call apoc.help("apoc.help");
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| type | name | text | signature | roles | writes |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| "procedure" | "apoc.help" | "Provides descriptions of available procedures. To narrow the results, supply a search string. To also search in the description text, append + to the end of the search string." | "apoc.help(proc :: STRING?) :: (type :: STRING?, name :: STRING?, text :: STRING?, signature :: STRING?, roles :: LIST? OF STRING?, writes :: BOOLEAN?)" | NULL | NULL |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row available after 31 ms, consumed after another 1 ms
neo4j>
FWIW, the graph algorithms procedures also work.
It is possible that you have two installations and modified the non-running one???
I have the following in ./bash_profile
export SRCROOT=/users/benjamin.beasley/work/svn/ccdev
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk_dev/Contents/Home
export PATH=$PATH$:~/tools/tools-versions/gradle-2.2.1/bin
export PATH=$PATH$:~/tools/activator
In ~/tools/tools-versions/gradle-1.12/bin, I do
drwxr-xr-x# 4 xxx.xxx WORKDAYINTERNAL\Domain Users 136 Nov 12 11:47 .
drwxr-xr-x# 13 xxx.xxx WORKDAYINTERNAL\Domain Users 442 Apr 29 2014 ..
-rwxr-xr-x# 1 xxx.xxx WORKDAYINTERNAL\Domain Users 5071 Apr 29 2014 gradle
-rwxr-xr-x# 1 xxx.xxx WORKDAYINTERNAL\Domain Users 2395 Apr 29 2014 gradle.bat
echo $PATH$:
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin$:/Users/xxx.xxx/tools/tools-versions/gradle-2.2.1/bin$:/Users/xxx.xxx/tools/activator90566
so I get the gradle executable which is executable. I can execute it from this directory. But if I start a new shell, and type "gradle" it says command not found. But I "echo $PATH$" and I see that the full canonical path to the ~/tools/tools-versions/gradle-2.2.1/bin folder is there.
However I can execute activator which is an executable in the ~/tools/activator directory. I have no clue why bash knows about activator and not gradle.
In summary:
gradle is executable by this user
gradle can be run from the command line.
gradle is in the $PATH$ environment variable
other programs such as activator, which are also in $Path$ are executable anywhere in terminal regardless of directory which is what I want to be true of gradle.
Unix environment variables are $PATH not $PATH$ (they aren't like Windows env vars).
This is causing your problem.
This path is busted: /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin$:/Users/xxx.xxx/tools/tools-versions/gradle-2.2.1/bin$:/Users/xxx.xxx/tools/activator90566
Notice the 90566 at the end? That's from $$ having been expanded to the current process id when you set the variable.
None of these are paths that actually exist or work:
/opt/X11/bin$
/Users/xxx.xxx/tools/tools-versions/gradle-2.2.1/bin$
/Users/xxx.xxx/tools/activator90566
Specifically, this is what I typed into terminal and what came back:
$ mkdir myapp
$ cd myapp
$ rvm use ruby-2.1.0#myapp --ruby-version --create
ruby-2.1.0 - #gemset created /usr/local/rvm/gems/ruby-2.1.0#myapp
ruby-2.1.0 - #generating myapp wrappers.
Using /usr/local/rvm/gems/ruby-2.1.0 with gemset myapp
.ruby-version is not empty, moving aside to preserve.
.ruby-gemset is not empty, moving aside to preserve.
$ ls -la .ruby*
-rw-rw-r-- 1 danisyellis staff 6 Jan 24 14:26 .ruby-gemset
-rw-rw-r-- 1 danisyellis staff 6 Jan 24 14:26 .ruby-gemset.01.24.2014-14:26:06
-rw-rw-r-- 1 danisyellis staff 11 Jan 24 14:26 .ruby-version
-rw-rw-r-- 1 danisyellis staff 11 Jan 24 14:26 .ruby-version.01.24.2014-14:26:06
$ cat .ruby*
myapp
myapp
ruby-2.1.0
ruby-2.1.0
I've searched the internet for that error message and haven't found anything that explains it so I don't know what it means.
It almost looks like my computer ran the command twice and tried to create a duplicate?
Questions:
Is that what happened or was it something else?
If yes, why did it do that?
What does "moving aside to preserve" mean?
Is there anything I can change/clean up so that everything works properly and cleanly
Thanks so much for any help you can give! I'm pretty new to all this so answers with a decent amount of detail/hand-holding would be appreciated.
this looks like a bug, please report it here: https://github.com/wayneeseguin/rvm/issues
in the mean time ignore this bug, you can remove the duplicate files quite easily:
rm -f .ruby-*\.*
I want to use the Neo4j shell. With the V1.9 release, it was in the bin folder of the installation, but since I upgraded to v2.0.0-M06, I can no longer find it. The bin folder only contains the following files ...
Directory of C:\Program Files\Neo4j Community\bin
16/10/2013 15:38 <DIR> .
16/10/2013 15:38 <DIR> ..
16/10/2013 15:38 37 neo4j-community-user-vmoptions.loc
14/10/2013 09:38 491,016 neo4j-community.exe
16/10/2013 15:38 242 neo4j-community.vmoptions
14/10/2013 09:37 39,564,808 neo4j-desktop-2.0.0-M06.jar
4 File(s) 40,056,103 bytes
2 Dir(s) 16,272,773,120 bytes free
I know I can use the shell in the web UI, but I want to pipe input and output, and I can't figure how to do that except with the stand-alone shell. Any ideas?
I have found the answer - in another question - How to install Neo4j 2.0+ as a windows service .
By downloading the zip file rather than the windows installer, I get all the .bat files, including Neo4jshell.bat. Problem solved!
Try this:
cd C:\Program Files\Neo4j Community
jre\bin\java -cp bin\neo4j-desktop-1.9.4.jar org.neo4j.shell.StartClient [--file /your/file/of/stuff.cyp]