Neo4j APOC configuration not working on the CentOS 7 - reactjs

I have deployed a ReactJS application with neo4j database on CentOS 7 server. Neo4j version is 4.4.2. The application also uses apoc library. So i added apoc-4.4.0.1-all.jar file to the /var/lib/neo4j/plugins directory on the server. Then i did following-
chown neo4j:neo4j apoc-4.4.0.1-all.jar
chmod 755 apoc-4.4.0.1-all.jar
Modify /etc/neo4j/neo4j.conf file to
dbms.security.procedures.whitelist=apoc.coll.*,apoc.load.*,apoc.*
dbms.security.procedures.unrestricted=apoc.*
uncomment dbms.directories.plugins=/var/lib/neo4j/plugins
systemctl restart neo4j
After deploying the project, when i open the application on the browser and insert some values in a form, it shows following error-
Unknown function 'apoc.map.submap' (line 3, column 14 (offset: 56)) " WHERE apoc.map.submap(properties(n), keys(obj), [], false) = obj" ^
Did i miss anything in apoc configuration ?

Try changing the plugin directory from: /var/lib/neo4j/plugins to /var/lib/neo4j/graph.db/plugins directory then restart the neo4j server. You need to create the folder if not found.
If you install neo4j using an installer rather than download/untar/unzip a zipped/tar file; then neo4j server is looking at the apoc under default.graphdb folder
related: APOC is only partially installing its extension in neo4j (one procedure)

The ownership of /var/lib/neo4j/data folder has to be neo4j, not root

Related

Connect MS SQL with PHP 5.6 on Centos7

Im trying to connect a project to an MS SQL but I can't. I read a lot but no one answer helps me.
Now I´m trying with ADOdb with mssql driver but the connection answer is:
Missing extension for mssql
So I suppose I have to install it but I can't find how can do it for PHP 5.6 on Centos. Anyone?
Or maybe other way to reach the DB?
I already tried yum install php56-php-mssql, php56w-mssql but all of them are miss. And yum install php-mssql answer that package
is already installed
UPDATE
1) tsql test works
2) php-mssql connection in php also works WHEN RUN FROM THE SHELL
3) running PHP through apache does NOT work.
I found the mssql.so and added the path to my php.ini file, then restarted apache but when I load a page with phpinfo(), mssql.so doesn't show.
What is missing?
PROBLEM SOLVED
1) Download PHP5.6 source files.
2) go to php/ext/mssql
3) do phpize but with php used by Plesk located on /opt/plesk/php/5.6/bin/phpize
4) configure, make
5) copy generated *.so to extensions folder on /opt/plesk/php/5.6/lib64/php/modules
6) create /opt/plesk/php/5.6/etc/php.d/mssql.ini file with tho following text:
; Enable mssql extension module
extension=mssql.so
7) restart apache

Unable to connect to SQLServer Kafka Connect

I have a docker image as located here
https://github.com/Landoop/fast-data-dev which has all the good stuff that I am using for development. I've tried to add a JDBC connector to push into a Kafka topic however am getting this error. I've made a consumer in Java which is working fine however I would like to use KafkaConnect
Invalid value java.sql.SQLException: No suitable driver found for jdbc:sqlserver://servername for configuration Couldn't open connection to jdbc:sqlserver://servername
name=JdbcSourceConnector
connector.class=io.confluent.connect.jdbc.JdbcSourceConnector
connection.user=user
connection.password=password
tasks.max=1
connection.url=jdbc:sqlserver://servername
topic.prefix=test
table.whitelist=dbo.IB_WEBLOG_DUMMY_small
query=SELECT * FROM IB_WEBLOG_DUMMY_small
value.converter=org.apache.kafka.connect.json.JsonConverter
key.converter=org.apache.kafka.connect.json.JsonConverter
poll.interval.ms=5000
table.poll.interval.ms=120000
mode=bulk
What should I be looking into to fix this problem?
Your JDBC driver’s JAR file is not in Kafka Connect’s classpath. Put it there and you will be good to go:
One option is to install the JDBC driver jar alongside the connector. The packaged connector is installed in the share/java/kafka-connect-jdbc directory, relative to the installation directory. If you have installed from Debian or RPM packages, the connector will be installed in /usr/share/java/kafka-connect-jdbc. If you installed from zip or tar files, the connector will be installed in the path given above under the directory where you unzipped the Confluent Platform archive.
Alternatively, you can set the CLASSPATH variable before running connect-standalone or connect-distributed. For example:
$ CLASSPATH=/usr/local/firebird/* ./bin/connect-distributed ./config/connect-distributed.properties
Alternatively, put all the SQL Server JDBC JAR files in the libs dir under the root folder of Apache Kafka. But that would pollute the classpath and is better to be avoided in production.

How to alter the path for Postgres looking for extensions?

I installed Postgres on a Windows machine, downloaded the binary installer for PostGIS and installed it. I only have one version of Postgres, so there is no messing up possible.
Installing PostGIS using the binary installer is straight forward and you cannot mess up the installation directory either. it has to go into the Postgres directory.
Now, when I want to create the PostGIS extension I am getting the following error:
ERROR: could not open extension control file "C:/APPS/POSTGR~1/pg96/../pg96/share/postgresql/extension/postgis.control": No such file or directory
********** Error **********
ERROR: could not open extension control file "C:/APPS/POSTGR~1/pg96/../pg96/share/postgresql/extension/postgis.control": No such file or directory
SQL state: 58P01
Though when I go into the directory C:\APPS\PostgreSQL\pg96\share\extension then I do have a postgis.control file present.
How do I get the extension to work? I checked the content of the zipped PostGIS binaries and it looks like as if the structure is well preserved and all files are copied into the appropriate directories during the install process via the binary installer.
It seems that the case is still the same with latest versions of postgres (PostgreSQL-9.6.3-1-win64-bigsql.exe) and postgis (postgis-bundle-pg96x64-setup-2.3.2-1.exe). I copied the files around until all the paths could be resolved:
Everything from C:\PostgreSQL\pg96\share\extension to C:\PostgreSQL\pg96\share\postgresql\extension
postgis_topology-2.3.dll, postgis-2.3.dll, rtpostgis-2.3.dll, address_standardizer-2.3.dll and ogr_fdw.dll from C:\PostgreSQL\pg96\lib to C:\PostgreSQL\pg96\lib\postgresql

Mesosphere installation PermissionError:/genconf/config.yaml

I got a Mesosphere-EE, and install on fedora 23 server (kernel 4.4)with:
$bash dcos_generate_config.ee.sh --web –v
then output:
Running mesosphere/dcos-genconf docker with BUILD_DIR set to/home/mesos-ee/genconf
Usage of loopback devices is strongly discouraged for production use.Either use `--storage-opt dm.thinpooldev` or use `--storage-opt
dm.no_warn_on_loop_devices=true` to suppress this warning.
07:53:46:: Logger set to DEBUG
07:53:46:: ====> Starting DCOS installer in web mode
07:53:46:: DCOS Installer v1
07:53:46:: Starting server ('0.0.0.0', 9000)
Then I start firefox though vnc, the vnc is on root. then:
07:53:57:: Root page requested. 07:53:57:: Serving/usr/local/lib/python3.4/site-packages/dcos_installer/templates/index.html
07:53:58:: Request for configuration type made.
07:53:58::Configuration file not found, /genconf/config.yaml. Writing new onewith all defaults.
07:53:58:: Error handling request
PermissionError: [Errno 13] Permission denied: '/genconf/config.yaml'
But I already have a genconf/config.yaml, it look like:
bootstrap_url: http://<bootstrap_public_ip>:<your_port>
cluster_name: '<cluster-name>'
exhibitor_storage_backend: zookeeper
exhibitor_zk_hosts: <host1>:2181,<host2>:2181,<host3>:2181
exhibitor_zk_path: /dcos
master_discovery: static
master_list:
- <master-private-ip-1>
- <master-private-ip-2>
- <master-private-ip-3>
superuser_username: <username>
superuser_password_hash: <hashed-password>
resolvers:
- 8.8.8.8
- 8.8.4.4
I do not know what’s going on. If you have any idear, please let me know, thank you very much!
Disable Selinux!
Configure SELINUX=disabled in the /etc/selinux/config file and then reboot!
Be ensure the selinux is disabled by the command getenforce.
$ getenforce
Disabled
zhe.
Correctly installing the enterprise edition depends on the correct system prerequisites. Anyway I suppose you're still on the bootstrap node so I will give you some path to succed in your current task.
Run the script as root or as a user issuing sudo dcos_generate_config.ee.sh
The script will also generate the config file automatically; if you want to use your own configuration file then create a folder named genconf and put it inside before running the script. You should changes the values inside <> with your specific configuration. If you need more help for your specific case send me an email to infofs2 at gmail.com

How to view postgres on the hsql database manager

Mmm. I put the postgre jar on the lib folder of hsql database manager but then I tried to use the database manager an error occurs "java.lang.ClassNotFoundException:org.postgresql.Driver".
It is not enough to put the jar in the lib folder. You need to include the jar in the command line that you use to execute DatabaseManager. An example for Windows below:
java -cp /path/to/hsqldb.jar;/path/to/postgres/pg.jdbc3.jar org.hsqldb.util.DatabaseManagerSwing

Resources