I have a Neo4j database that I initially created using the Neo4j Ruby gem, which uses the embedded server.
In order to deploy my database and accompanying app on Heroku, I need to use Neo4j standalone server's Rest API.
I have tried to switch on my development machine by installing Neo4j server through Homebrew. I edited the libexec/conf/neo4j-server.properties file to point it to the embedded database.
I can start Neo4j server fine, but, when I use the web interface to browse the database, none of my nodes are visible-- only the root node
I know that the server is looking at the correct directory because I can see the correct path in the configuration section of the web interface.
I know the data is still in the database because I can access it from my original Ruby app using the embedded server.
What could be the problem?
I suspect the problem is an issue with relative/absolute paths, meaning you might think it points to the right directory but actually it created an empty database somewhere else. If that's the case, just change your directory settings. As a temporary fix, you can always keep the default settings and just copy your embedded db into the data/graph.db folder. That always works for me.
Checking your path, the thing you need to look for is a leading slash. A leading slash indicates an absolute path, whereas the lack of one indicates a path relative to the main server directory which is the directory that contains conf, bin, data, ... Also, if you typed in the line yourself, check for typos. The correct syntax is:
org.neo4j.server.database.location=/this/is/an/absolute/path
or else this :
org.neo4j.server.database.location=this/is/a/relative/path
Related
I was given a database backup (with filestore), the filestore folder and another folder with the installed modules on that database.
I am expected to restore that backup in Odoo 8 with no more data. So what I did is create the PostgreSQL role who owns the database tables and give it enough permissions (login, createdb, replication). Then I created an Odoo config file. Inside this, I set this new PostgreSQL role in db_user and its password in db_password. I added the path where I stored the filestore in data_dir, and the path of the folder with all the modules in addons_path.
As I was given no launcher file, I copied the OCB folder of other Odoo instance I have and used its odoo.py file to start Odoo.
The new instance seems to run well, but now I have just restored the database, and I get this error:
QWebException: "'HttpRequest' object has no attribute 'endpoint_arguments'" while evaluating
'website.get_alternate_languages(request.httprequest)'
I was googling a lot but I was not able to find anything about it, except for a non-answered question in other forum.
Does anyone know what is this about?
Changes related to this issue were introduced in Odoo on 29 February, 2016 (I mean the following changes: [FIX] website: alternate languages translated URL and [FIX] website: backport of as you can check for now these changes are available in the official Odoo 8.0 code base as well).
So most probably you have used outdated Odoo 8.0 server that do not contain above mentioned fixes. Please update to the latest official Odoo 8.0 and check if the issue still persists. Normally your issue should disappear after the update.
When you move backup databases and you want to restore them later on, make sure you mark the branch and commit point of the server files that you took the backup from. I have taken a look at my local v8 odoo and I can see that the endpoint_arguments variable is initialised upon the creation of a web request (openerp/http.py class WebRequest around line 192.)
You mention though that you are restoring the database on the v8 OCB Odoo. If you navigate their distribution and on commit:
https://github.com/OCA/OCB/commit/3913667396e17075528108ac1031939e6f479ced#diff-5e2f434047c379642786a87195c806f9
you will see that this variable was missing and they have added it. So make sure that you git pull the server file to get that commit.
The root of the issue is that you took a backup from a server that had different codebase than the one you are trying to restore the database to. (The qweb file was searching for a variable that is not there)
I am confused about how Laravel protects keys using environment variables. It seems to me that a hacker could just look through the environment variables or at the hidden file. How is this better than storing it in the default array. Does Laravel do something with the environment variable to make this more secure? Or is it just a way to separate keys for different configurations.
I tried searching for an answer but I only found a non-Laravel question of the same nature that didn't seem to have a good answer either.
The configuration file is not meant to be stored in source control. This means the sensitive data is never stored anywhere it does not need to be. If a hacker were to gain access to your repository, they wouldn't be able to access for example; your database password.
This configuration file will placed upon deployment or once manually (eg ssh) into the project for the application to access.
Web server rewrites (apache .htaccess) or NGINX config will ensure that this configuration file can never be directly accessed.
If a hacker gets access to your server via an exploit or another method, they will still be able to access the configuration file.
Security is about having multiple layers, and removing this sensitive data from source control is one of many.
At the bottom of the configuration section in the laravel docs it mentions this very briefly:
Be sure to add the .env.local.php file to your .gitignore file. This
will allow other developers on your team to create their own local
environment configuration, as well as hide your sensitive
configuration items from source control.
Now, on your production server, create a .env.php file in your project
root that contains the corresponding values for your production
environment. Like the .env.local.php file, the production .env.php
file should never be included in source control.
I am adding some things in an existing Android app, which connects to a Apache Tomcat server to get information from a database, but some of the changes required that I also make minor changes on the webapp (changing some database fields).
I had never used tomcat, but managed to do the simple changes here and there.
But when I deployed it, I noticed some errors(see the photo).
How can I fix them ?
The app works regardless of them, but the server takes a few more seconds to start up.
P.S.I read somewhere that this means that the server already has these libs, and doesnt need to use the ones from the lib folder of the app ?
I know how to create a partition in local ApacheDS instance from this article. Current problem is I don't know how to create a partition in remote ApacheDS.
I am accessing remote ApacheDS server(in CentOS) from Apache Directory Studio(in Windows).
Any help would be appreciated.
ApacheDS
Version: 2.0.0-M14
Apache Directory Studio
Version: 2.0.0.v20130517
I don't know if your problem is that you can't access the remote instance or another.
But if you want to create a partition follow this "guide".
ApacheDS seems to have a very bad tutorial.
Contrary the other answers, here I explain the real problem. The sad truth is the following:
You can't manipulate the partitions of a non-local Apache Directory Server with Apache Directory Studio.
You can't even do this with a locally running one. The only what you can do, are the Apache Directory Server partitions running inside your Apache Directory Studio.
However, there is a workaround for the problem. It is particularly useful, if you are using linux, or at least you have a cygwin by the hand.
The Apache Directory Server has a complex directory structure, full with small files, partially binary and partially text data.
This data structure doesn't contain any filesystem references, so you can freely clone it.
Create an LDAP server inside your Apache Directory Studio. Open its properties. You get a popup form. Inside this form, you will see some like this:
Location /your/home/directory/.ApacheDirectoryStudio/.metadata/.plugins/org.apache.directory.studio.ldapservers/servers/e56640c7-70ed-4eed-921c-75c475117a11
This is what you want!
This is the directory structure, where your local ApacheDS is running!
And you can now easily synchronize this data structure, ideally with a simple rsync command, into your server or back!
So,
You create the new Apache Directory Server instance inside the Apache Directory Studio
Your check its properties
You stop it, and synchronize your server-side server directory into your this one! For example, rsync -va --delete you#your.server.com:/srv/apacheds/instance/ /your/home/directory/.ApacheDirectoryStudio/.metadata/.plugins/org.apache.directory.studio.ldapservers/servers/e56640c7-70ed-4eed-921c-75c475117a11
You play with the partitions as you wish
You synchronize it back.
Of course if you are playing with the Apache Directory Server file structure on such a low, file-system level, the server needs to be stopped!
I have a few resources (log files, database files, separate configuration files, etc.) that I would like to be able to access from my OSGi bundles. Up until now, I've been using a relative file path to access them. However, now my same bundles are running in different environments (plain old Felix and Glassfish).
Of course, the working directories are different and I would like to be able to use a method where the directory is known and deterministic. From what I can tell, the working directory for Glassfish shouldn't be assumed and isn't spec'ed (glassfish3/glassfish/domains/domain1/config currently).
I could try to embed these files in the bundle themselves, but then they would not be easily accessible. For instance, I want it to be easy to find the log files and not have to explode a cached bundle to access it. Also, I don't know that I can give my H2 JDBC driver a URL to something inside a bundle.
A good method is to store persistent files in a subdirectory of the current working directory (System.getProperty("user.dir") or of the users home directory (System.getProperty("user.home"))
Temporary and bundle specific files should be stored in the bundle's data area (BundleContext.getData()). Uninstalling the bundle will then automatically clean up. If different bundles need access to the same files, use a service to pass this information.
Last option is really long lived critically important files like major databases should be stored in /var or Window's equivalent. In those cases I would point out the location with Config Admin.
In general it is a good idea to deliver the files in a bundle and expand them to their proper place. This makes managing the system easier.
You have some options here. The first is to use the Configuration Admin service to specify a configuration directory, so you can access files if you have to.
For log files I recommend Ops4J Pax Logging. It allows you to simply use a logging API like slf4j and Pax Logging does the log management. It can be configured using a log4j config.
I think you should install the DB as a bundle too. For example I use Derby a lot in smaller projects. Derby can simply be started as a bundle and then manages the database files itself. I'm not sure about h2 but I guess it could work similarly.