I am using Hibernate Search in my webapp. I wanted to deploy application to Ubuntu Server with Tomcat. Yet it throws same error independent of index location place set in configuration file.
At beginning I set to directory in home folder like this:
<property name="hibernate.search.default.indexBase">/home/someuser/indexes</property>
Permissions of this folder were like following:
drwxr-xr-x 2 tomcat7 tomcat7 4096 Jun 30 14:44 indexes
Then I tried to relative path and created folder indexes in webapps with same permissions:
<property name="hibernate.search.default.indexBase">indexes</property>
In both case throws the same error:
Caused by: org.hibernate.search.exception.SearchException:
Cannot write into index directory: .
I don't understand why it tries the current folder.
With regards
Hibernate Search will write by default in the current directory: ".".
You are setting the correct property; the only explanation I have is that you are not setting it in the right configuration file.
Hibernate also reads JVM properties and environment variables when it doesn't find a property before resorting to the default.
I wouldn't normally recommend to set such options on the JVM command line, but it might be interesting to try this out in your case.
You can also add additional properties in a hibernate.properties resource file.
Related
I am using flyway script to migrate the database.
In my project setup I have dev env scripts in the default location : /db/migration/
Also a specific location (under root) for pp scripts: /my_app/flyway_pp/
application-preprod.properties
spring.flyway.baseline-on-migrate = true
spring.flyway.locations=filesystem:/my_app/flyway-pp
My application runs as a image in kubernetes cluster. I have checked using classpath: and filesystem: both. But nothing is getting picked up from flyway_pp folder and instead it is picking up from default location always /db/migration/.
My doubt is may be in the kubernetes env it is not able to resolve the path correctly.
But what should I do in this case.
i'm don't find the way to logging in file with spring 2.2.5
I tried in the application.properties
logging.file.name=C:/log/app.log
or
logging.file.path=C:/log
But everytime it created the file, but don't write anything in.
Why ? I don't find any tutorial on web which work
You can set the absolute path with following code
logging.path=D:\logs\logfile.txt
If the folder doesn't exist it gets created. On Windows you have to work with \ as seperator, while on Linux and Mac you need / as seperator. Check create dir and write permission on specified path.
You should either specify logging.file or logging.path, but not both ( when both are specified, logging.path is ignored and only logging.file is considered).
I have written Ignite hello world program in Eclipse and want to connect it to localhost(127.0.0.1). But it is giving me error for example "ignite.xml file path is invalid"
I am starting ignition as follows,
try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {}
But I got error like:
Spring XML configuration path is invalid: examples/config/example-ignite.xml.
How do I fix it?
You have the following options:
Provide the absolute file path.
Set IGNITE_HOME system property or environment variable, put the file in this folder and provide the path relative to the home.
Add the configuration file on classpath under META-INF and provide the path relative to it.
The last option is usually the most convenient for the applications with an embedded Ignite node.
I want to run my NiFi application using ec2-user rather than default nifi user. I changed run.as=ec2-user in bootstrap.conf but it did not worked .It is not allowing me to start Nifi application getting following error while staring nifi service.
./nifi.sh start
nifi.sh: JAVA_HOME not set; results may vary
Java home:
NiFi home: /opt/nifi/current
Bootstrap Config File: /opt/nifi/current/conf/bootstrap.conf
User Runnug Nifi Application : sudo -u ec2-user
Error: Could not find or load main class org.apache.nifi.bootstrap.RunNiFi
Any pointer to this issue?
This is most likely a file permission problem, which is not covered by installing the service with nifi.sh install. A summary of the required permissions includes:
Read access to the entire distribution in the NIFI_HOME directory
Write access to the NIFI_HOME directory itself - NiFi will create a number of directories and files at runtime including logs, work, state, and various repositories.
Write access to the bin directory
Write access to the conf directory
Write access to the lib directory, and to all of the files in the lib directory
It is certainly possible to narrow the permissions by creating the working directories manually, and by adjusting NiFi's settings to rearrange the directory layout. But the permissions above should get you started.
I'm attempting to set the share_jobs setting described HERE to false.
The documentation HERE says to visit http://myserver:port/dump_config to find the location of the HUE config. For me it gives /var/run/cloudera-scm-agent/process/73-hue-HUE_SERVER/.
As you may guess from it being in /var/run/ the directory is recreated every time on boot so changes to the hue.ini are not saved and do not seem to affect the config listed at http://myserver:port/dump_config.
I ran find / -name hue.ini to see if there was another hue.ini to change. It returned:
/var/run/cloudera-scm-agent/process/73-hue-HUE_SERVER/hue.ini
/var/run/cloudera-scm-agent/process/69-hue-BEESWAX_SERVER/hue.ini
/opt/cloudera/parcels/CDH-4.7.0-1.cdh4.7.0.p0.40/share/hue/desktop/conf/hue.ini
/opt/cloudera/parcels/CDH-4.7.0-1.cdh4.7.0.p0.40/etc/hue/hue.ini
I've changed the config in each of these files to no avail. Where exactly is the hue.ini that I need to change?
I've also been looking around the Cloudera Manager for the jobbrowser section in the configuration but I have not been able to find it.
hue.ini file inside the server configuration directory (/var/run/cloudera-scm-agent/process/73-hue-HUE_SERVER/) should be modified that too not directly, should use CM instead. Location of the configuration directory will be changed during restart or applying new configurations.
Usually important service configurations will be listed in the cloudera manager configuration section. Configuration properties which are unimportant or new may not be listed, in that case these properties are supplied in the safety_val sections.
Go to CM Hue service configuration section search for hue_safety_valve_server.ini, then add the following
[jobbrowser]
share_jobs=false
Save and restart. Now if you go and check the /var/run/cloudera-scm-agent/process/XXX-hue-HUE_SERVER/hue.ini file you can see the change. What ever contents you are giving in safety_val will get appended to hue.ini file.