Endeca baseline failed as 'permission denied' in renaming the Dgraph log file [duplicate] - endeca

During baseline update, I am getting error as backup_log_dir_for_component_Dgraph2 failed.
1. Below is the error from baseline_update.out file
Setting flag 'baseline_data_ready' in the EAC.
1 file(s) moved.
[06.28.16 05:26:02] INFO: Checking definition from AppConfig.xml against existing EAC provisioning.
[06.28.16 05:26:02] INFO: Definition has not changed.
[06.28.16 05:26:02] INFO: Starting baseline update script.
[06.28.16 05:26:02] INFO: Acquired lock 'update_lock'.
.
.
.
more logs in between
.
.
.
[06.28.16 05:26:17] INFO: [ITLHost] Starting component 'Forge'.
[06.28.16 05:45:14] INFO: [ITLHost] Starting backup utility 'backup_log_dir_for_component_Dgidx'.
[06.28.16 05:45:15] INFO: [ITLHost] Starting component 'Dgidx'.
[06.28.16 06:00:59] INFO: [MDEXHost] Starting shell utility 'cleanDir_local-dgraph-input'.
[06.28.16 06:01:01] INFO: [MDEXHost] Starting shell utility 'rmdir_dgraph-input-old'.
[06.28.16 06:01:03] INFO: [MDEXHost] Starting copy utility 'copy_index_to_host_MDEXHost'.
[06.28.16 06:01:26] INFO: Applying index to dgraphs in restart group 'A'.
[06.28.16 06:01:26] INFO: [MDEXHost] Starting shell utility 'mkpath_dgraph-input-new'.
[06.28.16 06:01:27] INFO: [MDEXHost] Starting copy utility 'copy_index_to_temp_new_dgraph_input_dir_for_Dgraph1'.
[06.28.16 06:01:59] INFO: [MDEXHost] Starting shell utility 'move_dgraph-input_to_dgraph-input-old'.
[06.28.16 06:02:01] INFO: [MDEXHost] Starting shell utility 'move_dgraph-input-new_to_dgraph-input'.
[06.28.16 06:02:02] INFO: [MDEXHost] Starting backup utility 'backup_log_dir_for_component_Dgraph1'.
[06.28.16 06:02:03] INFO: [MDEXHost] Starting component 'Dgraph1'.
[06.28.16 06:02:10] INFO: [MDEXHost] Starting shell utility 'rmdir_dgraph-input-old'.
[06.28.16 06:02:12] INFO: Applying index to dgraphs in restart group 'B'.
[06.28.16 06:02:12] INFO: [MDEXHost] Starting shell utility 'mkpath_dgraph-input-new'.
[06.28.16 06:02:13] INFO: [MDEXHost] Starting copy utility 'copy_index_to_temp_new_dgraph_input_dir_for_Dgraph2'.
[06.28.16 06:02:38] INFO: Stopping component 'Dgraph2'.
[06.28.16 06:02:39] INFO: [MDEXHost] Starting shell utility 'move_dgraph-input_to_dgraph-input-old'.
[06.28.16 06:02:40] INFO: [MDEXHost] Starting shell utility 'move_dgraph-input-new_to_dgraph-input'.
[06.28.16 06:02:42]
INFO: [MDEXHost] Starting backup utility 'backup_log_dir_for_component_Dgraph2'.
[06.28.16 06:02:43] SEVERE: Utility 'backup_log_dir_for_component_Dgraph2' failed. Refer to utility logs in [ENDECA_CONF]/logs/archive on host MDEXHost.
Occurred while executing line 5 of valid BeanShell script:
[[
2|
3| DgraphCluster.cleanDirs();
4| DgraphCluster.copyIndexToDgraphServers();
5| DgraphCluster.applyIndex();
6|
7|
]]
[06.28.16 06:02:43] SEVERE: Error executing valid BeanShell script.
Occurred while executing line 35 of valid BeanShell script:
[[
32| Dgidx.run();
33|
34| // distributed index, update Dgraphs
35| DistributeIndexAndApply.run();
36|
37| // if Web Studio is integrated, update Web Studio with latest
38| // dimension values
]]
[06.28.16 06:02:43] SEVERE: Caught an exception while invoking method 'run' on object 'BaselineUpdate'. Releasing locks.
2. Below is the error from backup_log_dir_for_component_Dgraph2.log file (Filepath PlatformServices\workspace\logs\archive)
Renaming G:\Endeca\MyEndecaApp\config\script\..\..\.\logs\dgraphs\Dgraph2 to G:\Endeca\MyEndecaApp\config\script\..\..\.\logs\dgraphs\Dgraph2.2016_06_28.06_02_42
Unable to rename G:\Endeca\MyEndecaApp\config\script\..\..\.\logs\dgraphs\Dgraph2 to G:\Endeca\MyEndecaApp\config\script\..\..\.\logs\dgraphs\Dgraph2.2016_06_28.06_02_42: Permission denied
I tried running the baseline update again and again, sometimes Dgraph1 fails and sometime Dgraph2. After failure the dgraph also stopped.
Edit 1: I have observed that when I stops both the dgraphs from workbench and then run baseline update, it always ran successfully. I tried this 4-5 times.
We know baseline_update stops dgraph before doing backup of log folder. So I am assuming dgraph is not stopped properly before baseline_update do backup of log folder and so it generates error.
Please help me in resolving the issue. I am novice in Endeca Administration
Thank you

There are a couple of scenarios that will cause the permission problem.
According to the Endeca Installation Documentation you should install Endeca as a specific user on the Windows Server. Lets assume that user is called 'endeca'. Did you make sure that the 'endeca' user is the current owner of the G:\Endeca\MyEndecaApp folder and subfolders? After specifying the 'owner' you also need to set the permissions on this folder as Full to the 'endeca' user. Are you running your Endeca Services as the 'endeca' user?
Assuming you've done the above and you still have an issue it can also happen based on how you start your index. If you kick off a baseline index from the CMD prompt, are you doing this as yourself, the 'endeca' user or 'Administrator'? Depending on who you ran the last index as will determine if you have permission to all the subsequent runs. I tend to do CMD line executions as 'Administrator' and have had very few permission problems.
Are you perhaps inspecting the log files in 'Notepad.exe'? It locks the file aggressively so you won't be able to rename the file, or the folder, if you have it open in 'Notepad'. Either make sure you don't have it open in 'Notepad' or rather use 'Notepad++' which doesn't lock the file.
Lastly I've also had issues where CMD prompt was open in the log folder that needs to be renamed. So make sure your CMD prompt is either closed or doesn't open your log folders.
Been running Endeca on Windows Server 2012 R2 for the last 3 years and those are the only issues I've had. If all else fails you can always try the sysinternals tools, in particular 'procmon.exe', but it will output a lot of information during the time you are building an index so be prepared for information overload.

Changing the Dgraph property 'numIdleSecondsAfterStop' to 90 seconds from IAP workbench solved the problem.
It shows that the failure was due to the Dgraph was not properly stopped before rename and log folder was locked by Dgraph.
Setting 'numIdleSecondsAfterStop' causes the baseline to wait for 90 seconds to process next steps after Dgraph stops.

The problem is very clear in logs, such a folder doesn't exists and so baseline process is unable to rename the folder Dgraph2. This usually occurs when the process fails in-between when the baseline update is running. Say for example you ran the process and the script clears a folder after taking back up of that contents and it fails. Again you might run the process from the first so when it tries to clear the same again, you usually get the error of missing folder. Simple solution is that create the missing folder Dgraph2 or when the update fails due to workbench down or anything. Then comment the app config script till it had successfully ran and run again from that particular instance. Hope this helps!

Related

GraphDB Workbench would not start

After a VM shutdown, GraphDB Workbench would not start.
I have installed GraphDB on a cloud-hosted VM. Incidentally, the machine was shut down without stopping GraphDB. When trying to start it again, the Workbench would not start and the following message is displayed in the error log.
[ERROR] 2019-06-19 12:12:00,299 [Thread-10 | c.o.t.s.i.PluginManager]
Problem shutting down literals-index java.lang.RuntimeException:
com.ontotext.trree.transactions.TransactionException: Failed to
created journal file: /home/peio/graphdb-se-8.10.1/data/repositor
ies/bgnews/storage/literals-index/numerics.index.precommit
As Damyan suggested, delete literals-index in the storage folder and it will be rebuilt on start-up.

activemq/apache-activemq-5.9.0/conf/activemq.xml (No such file or directory)?

i have just installed activemq, but when i try to run the following command:
./activemq start xbean:file:workspace/activemq/apache-activemq-5.9.0/conf/activemq.xml
I get the following:
emq/apache-activemq-5.9.0/conf/activemq.xml
INFO: Loading '/etc/default/activemq'
INFO: Using java '/usr/bin/java'
INFO: Starting - inspect logfiles specified in logging.properties and log4j.properties to get details
INFO: pidfile created : '/home/pi/workspace/activemq/apache-activemq-5.9.0/data/activemq-pi.pid' (pid '2576')
activemq/apache-activemq-5.9.0/bin/activemq status returns the following:
INFO: Loading '/etc/default/activemq'
INFO: Using java '/usr/bin/java'
ActiveMQ not running
The activemq.log says the following:
Caused by: java.io.FileNotFoundException: workspace/activemq/apache-activemq-5.9.0/conf/activemq.xml./activemq (No such file or directory)
But the activemq.xml file is there?. I am very new to activemq and dont know where to go from here, thank you.

SonarQube 5.2 Upgrade failed

I tried upgrading SonarQube from 5.1.2 to 5.2, but the Upgrade failed. I have the following message in the Sonar.log:
2015.11.23 07:44:36 ERROR web[o.s.s.d.m.PlatformDatabaseMigration] DB Migration or container restart failed. Process ended with an exception
org.jruby.exceptions.RaiseException: (StandardError) An error has occurred, this and all later migrations canceled:
ActiveRecord::JDBCError: Cannot find the object "project_links" because it does not exist or you do not have permissions.: ALTER TABLE project_links ADD [component_uuid] NVARCHAR(50)
2015.11.23 08:03:50 INFO app[o.s.p.m.TerminatorThread] Process[web] is stopping
2015.11.23 08:03:51 INFO web[o.s.p.StopWatcher] Stopping process
2015.11.23 08:03:51 INFO web[o.a.c.h.Http11NioProtocol] Pausing ProtocolHandler ["http-nio-0.0.0.0-9000"]
2015.11.23 08:03:52 INFO web[o.a.c.h.Http11NioProtocol] Stopping ProtocolHandler ["http-nio-0.0.0.0-9000"]
2015.11.23 08:03:53 INFO web[o.a.c.h.Http11NioProtocol] Destroying ProtocolHandler ["http-nio-0.0.0.0-9000"]
2015.11.23 08:03:53 INFO web[o.s.s.a.TomcatAccessLog] Web server is stopped
When I execute the failed ALTER TABLE command in SQL Server Management Studio, it does work. I was able to connect to the sonar database with Visual Studio with the user/password that SonarQube uses. I gave the sonar user schema owner and read and write permissions. I tried changeing from the encrypted password to the clear text password. What could be wrong?
The DB user has permissions to read multiple SonarQube schemas. It must be restricted to a single schema.

FIP Deployment Error

We are deploying on one of our server and we have below error.
ERROR: tooltwist.fip.FipException Unknown response from server: 500: Internal Server Error
Exception: tooltwist.fip.FipException: tooltwist.fip.FipException: Unknown response from server: 500: Internal Server Error
Looking at the FIP log, it shows:
Error installing batch: tooltwist.fip.FipException: Pre-commit command failed: protected/pre_commit.sh
tooltwist.fip.FipException: Pre-commit command failed: protected/pre_commit.sh
at tooltwist.fip.FipServer_updateExecuter.commitTransaction(FipServer_updateExecuter.java:309)
at tooltwist.fip.FipServer_updateExecuter.prepareUpdates_1_3(FipServer_updateExecuter.java:250)
at tooltwist.fip.FipServer_updateExecuter.executeUpdates(FipServer_updateExecuter.java:142)
at tooltwist.fip.FipServer.destination_installBatchOfFiles(FipServer.java:199)
at tooltwist.fip.jetty.InstallBatchServlet.doPost(InstallBatchServlet.java:134)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:530)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:426)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:931)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:361)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:867)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:113)
at org.eclipse.jetty.server.Server.handle(Server.java:337)
at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:581)
at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:1020)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:775)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:228)
at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:417)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:474)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:437)
at java.lang.Thread.run(Thread.java:662)
Any idea about the error?
Couple of suggestions:
1. Does the pre_commit.sh shell script exist on the server.
2. Does it have +x permissions?
If FIP was installed using the normal way, it should not cause an issue.
The fipserver initially saves files it receives on the destination server, but into temporary locations. Once all of the files have been received and saved it runs a three step process to complete the installation:
1. Run a script named protected/pre-commit.sh. The normal operation of this script is to shut down the web server.
2. For each new file:
a) move any existing file to .fip-rollback-xxxxxx/filename.
b) move the new file from it's temporary location to the correct location.
3. Run a script named protected/post-commit.sh. This most commonly restarts the server.
The pre and post commit scripts are user provided. They should should normally exit with a status of zero, as any other status indicates that an error has occurred.
As suggested in the previous answer, check that these scripts exist, and that they are executable. If this fails to solve your problem, insert debug into the scripts to determine where and why they are failing.

Java 1.5 crash on AIX 5

I have a problem with Java 1.5.0 for AIX. The error happens just when I log on with specific user on AIX (myuser). When I log on with other user java works ok.
The error come up even when I executed just "java -version" or simply "java" (of course, without quoting). I've tried executing it with the full path: /usr/java5/jre/bin/java but still fails.
There was installed the version 1.4 of java on system too. So the $PATH variable for the user contained /usr/java14/jre/bin, but I removed that value, I even uninstalled that version of java (1.4) so that just java 5 exists on the system, but the error continues.
If I execute "java -fullversion" it doesn't crash.
This is part of the error (the full output is very long):
JVMJ9VM011W Unable to load j9dmp23: No such file or directory
JVMJ9VM011W Unable to load j9jit23: No such file or directory
JVMJ9VM011W Unable to load j9gc23: No such file or directory
JVMJ9VM011W Unable to load j9vrb23: No such file or directory
Unhandled exception
Type=Illegal instruction vmState=0x00000000
J9Generic_Signal_Number=00000010 Signal_Number=00000004 Error_Value=00000000
Signal_Code=0000001e
Handler1=F0719CC8 Handler2=F0714F5C
.....
Target=2_30_20091103_45935_bHdSMr (AIX 5.3)
CPU=ppc (4 logical CPUs) (0x7d0000000 RAM)
JavaVMInitArgs.nOptions=14:
-Xjcl:jclscar_23
-Dcom.ibm.oti.vm.bootstrap.library.path=/usr/java5/jre/bin
-Dsun.boot.library.path=/usr/java5/jre/bin
-Djava.library.path=/usr/java5/jre/bin:/usr/java5/jre/bin:/usr/java5/jre/bin/classic:/usr/java5/jre/bin:/sqllib/lib:/home/myuser/comm:/home/myuser/sys:/home/myuser/bin:/db2util/db2adm/sqllib/lib64:/usr/java5/jre/bin/j9vm:/usr/lib
-Djava.home=/usr/java5/jre
-Djava.ext.dirs=/usr/java5/jre/lib/ext
-Duser.dir=/home/myuser
_j2se_j9=70912 (extra info: F070EA2C)
-Xdump
vfprintf (extra info: 300017A4)
-Dinvokedviajava
-Djava.class.path=/db2util/db2adm/sqllib/java/db2java.zip:/db2util/db2adm/sqllib/java/db2jcc.jar:/db2util/db2adm/sqllib/java/sqlj.zip:/db2util/db2adm/sqllib/function:/db2util/db2adm/sqllib/java/db2jcc_license_cu.jar:.
vfprintf
_port_library (extra info: F070EE30)
Note: "Enable full CORE dump" in smit is set to FALSE and as a result there will be limited threading information in core file.
Note: dump may be truncated if "ulimit -c" is set too low
Generated system dump: {default OS core name}
(no Thread object associated with thread)
(no Thread object associated with thread)
Unhandled exception in signal handler
ksh: 2179192 IOT/Abort trap(coredump)
I found the error. The problem is a line on the .profile which sets the environment variable LIBPATH:
export LIBPATH=/home/myuser/sys
I deleted that line in the .profile and java worked.