Error in starting the neo4j Server (Neography, Ruby) - ruby

The server suddenly stopped to work and on restarting it gave the following error. Couldn't find anything related to this online. Any idea what is wrong and how to resolve this?
org.neo4j.server.logging.Logger log SEVERE:
org.neo4j.server.ServerStartupException: Starting Neo4j Server failed:
Active marked as 1 but no data/graph.db/nioneo_logical.log.1 exist at
org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:218)
at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:87) at
org.neo4j.server.Bootstrapper.main(Bootstrapper.java:50) Caused by:
java.lang.IllegalStateException: Active marked as 1 but no
data/graph.db/nioneo_logical.log.1 exist at
org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLogFiles.determineState(XaLogicalLogFiles.java:138)
at
org.neo4j.kernel.impl.recovery.StoreRecoverer.recoveryNeededAt(StoreRecoverer.java:65)
at
org.neo4j.server.preflight.PerformRecoveryIfNecessary.run(PerformRecoveryIfNecessary.java:56)
at
org.neo4j.server.preflight.PreFlightTasks.run(PreFlightTasks.java:70)
at
org.neo4j.server.AbstractNeoServer.runPreflightTasks(AbstractNeoServer.java:333)
at
org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:152)
... 2 more
Apr 25, 2014 9:13:07 PM org.neo4j.server.logging.Logger log SEVERE:
Failed to start Neo Server on port [7474]

It looks like you've messed up your datastore e.g. by a unclean shutdown. To recover try the following procedure:
IMPORTANT: before doing any manual changes to your graph.db folder, make sure that you have a valid backup copy e.g. by tar -zcf <path>/graph.db.tar.gz data/graph.db.
Check that the backup from 1. is fine.
rm data/graph.db/nioneo_logical.log.active. NB: this operation might be harmful.
try to restart the server
if it comes up, check if the latest changes you did before the DB reached its current state.

Related

Docker "hello-world" is giving "process cannot access the file because it is being used by another process"

We have just uninstalled Docker Community Edition and installed Enterprise Edition on a Windows Server 2016 System as per these steps.
On reaching the last step which is to test a hello-world container we are receiving the following error:
C:\Program Files\Docker\docker.exe: failed to register layer: re-exec
error: exit status 1: output: ProcessUtilityVMImage
\?\C:\ProgramData\Docker\windowsfilter\e345ad40cc8f7d073f62501b7445d42d677889c04b2c6fe0963ea6e092b52f95\UtilityVM:
The process cannot access the file because it is being used by another
process.
We are seeing lots of examples on SO related to other types of applications giving this error but not Docker.
How might we fix this?
This turned out to be an issue related to Symantec Endpoint Protection(SEP) clashing with Docker.
SEP needs to be upgraded to version 14 RU1 and several files need execution privileges.
Symantec posted a fix here: https://support.symantec.com/en_US/article.TECH246815.html which we have tried and worked.

Apache Usergrid, tomcat7 403 error on database setup

I have setup usergrid following this guide.
Steps I have done include:
1. Setup Cassandra (nodetool statusshows me one healty node and I can log in with cqlsh).
2. Setup ElasticSearch (curl localhost:9200 gives me a nice .json back, everything ok.)
3. Built the usergrid app with mvn clean install and moved the built ROOT.warto CATALINA_BASE
4. Created usergrid-deployment.propertiesto CATALINA_HOME at /usr/share/tomcat7
When I start tomcat7 service everything goes ok, no errors in catalina logs. Last line is "Server Startup".
In catalina.out log I have the line:
INFO: Starting Servlet Engine: Apache Tomcat/7.0.52 (Ubuntu)
Mar 08, 2016 9:33:25 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /var/lib/tomcat7/webapps/ROOT.war
Mar 08, 2016 10:02:50 AM org.apache.catalina.util.SessionIdGenerator createSecureRandom
INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [5$
Mar 08, 2016 10:02:50 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Mar 08, 2016 10:02:50 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 5561 ms
So the usergrid app should be running.
I can browse to localhost:8080 and see the Tomcat7"It works" - page.
However, when I try to setup the usergrid database like this:
curl -X PUT http://localhost:8080/system/database/setup -u [user]:[password]
I get a 403 error:
Access to the specified resource has been forbidden.
I am sure that my credentials match those that I have defined in usergrid-deployment.properties in CATALINA_HOME as usergrid sysadmin.login credentials.
In tomcat7 localhost_access_log I have the following output:
0:0:0:0:0:0:0:1 - - [08/Mar/2016:12:27:43 +0200] "PUT /system/database/setup HTTP/1.1" 403 979
However (number2), when I try curl -v localhost:8080/status to see the status of the usergrid app, I get
404 - requested resource is not available
So, any help as to what I might do to:
a) be sure that the usergrid app is deployed correctly with tomcat (as there are no errors in logs
b) to solve the 403 issue?
Thank you for any help!
EDIT:
I noticed that my CATALINA_BASE(/var/lib/tomcat/) didn't have the WEB_INFdirectory inside webapps at all. In the guide I made reference to, we are only instructed to copy the ROOT.war file to webapps directory. Is this correct? Should I also copy the WEB-INF files from the usergrid stack?
Here is what the guide says:
The next step is to deploy the Usergrid Stack software to Tomcat. There are a variey of ways of doing this and the simplest is probably to place the Usergrid Stack ROOT.war file into the Tomcat webapps directory, then restart Tomcat.
I tried copying the WEB-INF files to CATALINA_BASE but that resulted in multiple errors and tomcat7 was unable to start:
This:
21:25:49,923 WARN Slf4jConnectionPoolMonitorImpl:31 - BadRequestException: [host=localhost(127.0.0.1):9160, latency=16(38), attempts=1]InvalidRequestException(why:You have not logged in)
And:
INFO transport:93 - [node-1] bound_address {inet[0.0.0.0/0.0.0.0:9301]}, publish_address {inet[/XX.XXX.XXX.XXX:9301]}
21:25:51,892 INFO discovery:85 - [node-1] elasticsearch/RIaKYgv1R-yTKJ_aknZOuw
21:25:51,905 WARN netty:620 - [node-1] exception caught on transport layer [[id: 0xc1bc7fca]], closing connection
java.net.UnknownHostException: localhost:9200
EDIT 2: I was adviced that only Elasticsearch v 1.4.4 works (I tried with 2.2.0) and for Cassandra 1.2.x and 2.1.x versions (I tried with 3.0.3). I havent yet tried with these versions, I'll update this question if I get it to work.
I don't have an answer for you but I do have a couple of observations:
If you see the Tomcat "it works" page that means that you have not deployed the Usergrid ROOT.war file.
If you see a 404 on /status, that also means Usergrid did not deploy properly.
The Usergrid ROOT.war file that comes with the official release, includes the WEB-INF directory and you do not need to deploy that separately. The only files you need to add to Tomcat are ROOT.war, usergrid-deployment.properties and (optionally) log4j.properties.
The problem is probably that Usergrid is unable to connect to Cassandra or ElasticSearch and ROOT.war file fails to deploy to Tomcat.
If you share you Usergrid properties file (remove any passwords first), it might be easier to diagnose the problem that is preventing the Usergrid WAR file from being deployed.

BEA-141297 - Could not get the server file lock

Following error is encountered when trying to start Oracle Weblogic Server:
<Info> <Management> <BEA-141297> <Could not get the server file lock. Ensure that another server is not running in the same directory. Retrying for another 60 seconds.>
How do I overcome this error and start the server?
The error means that there is a file lock that could not be released, as the server was previously not shut down correctly.
In this case you must follow the next steps:
Navigate to tmp folder in your $DOMAIN_HOME directory. (for example: C:\Oracle\Middleware\Oracle_Home\user_projects\domains\mydomain\servers\AdminServer\tmp)
Delete the lock file for the server instance, AdminServer.lok
Check if there are any java.exe processes are running, which should not be there. If there are any, they would have to be killed.
Restart your server

OpenEMM Installation

Guys, I have installed OpenEMM 2013 on Windows 2012 Server. Everything works fine as per installation guide but when I am trying to start the OpenEMM using start.bat, I am facing some problem.
It says's -
Starting up .. home is C:\OpenEMM .. found codebase .. warning: no MySQL found using reg.key SOFTWARE\MySQL AB, continue anyway found database.
Running, press return for termination:
Also I have found the log file in the /var/log/openemm_stderr.log
SEVERE: Could not contact localhost:8005. Tomcat may not be running.
I have opened the port - 8005,8009,8443,8080 in my Firewall. But still I can not start openemm service.

Tomcat deployment failure

The Issue I'm Having
I've implemented a mild change to my application, and I checked it into the subversion repository. Once that was checked in, I ran a Jenkins build. Jenkins is currently running on a Windows server.
The error I am receiving is the following:
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal
org.codehaus.mojo:tomcat-maven-plugin:1.1:deploy (deploy) on project sd-rest-servlet:
Cannot invoke Tomcat manager: FAIL - Deployed application at context path /sd but
context failed to start
I investigated further into this error message, so I checked out the Tomcat logs on the Jenkins server, and I found an underlying issue:
SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Document base C:\Program Files\Apache Software Foundation\Tomcat 6.0\temp\28-sd does not exist or is not a readable directory
at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:142)
at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4320)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4489)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:675)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:601)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1385)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:306)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1389)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1653)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1662)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1642)
at java.lang.Thread.run(Unknown Source)
Now, as I understand it, the temp folder is only ever used in this way when I set antiJarLocking or antiResourceLocking to true in the context file. However, as you can see, I have not included this in the Context element:
<Context unpackWAR="false">
Other Behaviour
Unable to Undeploy
After some close inspection, I've found that Jenkins isn't able to undeploy the application. In the logs, I see this message.
[INFO] Undeploying application at http://localhost:8082/sd
[INFO] OK - Undeployed application at context path /sd
However, the build fails when it attempts to deploy, with the following error:
Cannot invoke Tomcat manager: FAIL - Application already exists at path /sd
Erratic access to the Temp directory
I've also noticed that it throws the same IllegalArgumentException whenever it attempts to access any file inside the temp directory. This tells me there is something wrong with the temp directory, however I've set the permissions, and earlier on in the application, Jenkins actually puts a file in the temp directory.
No Problems Depoying
Jenkins actually deploys the application without a problem. I've watched the directories change when the files are added to them, including the temp directory. This tells me that Jenkins is randomly deciding it can't read the contents of the directory, despite the fact that it is added a file to it. It appears that it has write permissions, but not read permissions, which really doesn't make much sense!
Attempts to Solve the problem
Ensured the file exists
I first attempted to look inside C:\Program Files\Apache Software Foundation\Tomcat 6.0\temp\28-sd to see if the file existed. Sure enough, it existed.
Altered Permissions
I've set permissions to allow for full access from every user on the server, as a precaution.
Researched the use of the Temp directory
I've attempted to configure my context file to avoid all use of the temp directory, so I don't have a clue why it's still attempting to read from it. I am inexperienced with the ins and outs of this technology, so I may still have some settings that require the temp folder.
Edits
Expanded Tomcat Logs
18-Dec-2013 12:14:19 org.apache.catalina.startup.HostConfig checkResources
INFO: Undeploying context [/sd]
18-Dec-2013 12:16:06 org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor sd.xml
18-Dec-2013 12:16:09 org.apache.catalina.core.StandardContext resourcesStart
<!-- Above stacktrace goes here -->
18-Dec-2013 12:16:09 org.apache.catalina.core.StandardContext start
SEVERE: Error in resourceStart()
18-Dec-2013 12:16:09 org.apache.catalina.core.StandardContext start
SEVERE: Error getConfigured
18-Dec-2013 12:16:09 org.apache.catalina.core.StandardContext start
SEVERE: Context [/sd] startup failed due to previous errors
18-Dec-2013 12:16:09 org.apache.catalina.core.StandardContext stop
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/sd] has not been started
Some more information on the issue
After reading through the logs for the thousandth time, I reread this line:
...Tomcat 6.0\temp\28-sd does not exist or is *not a readable directory*
So when I looked inside the temp directory again, I realized that the files being generated aren't directories. They are these weird file objects with no extension, and they look like this:
For me, this indicates that something has gone wrong with the way Tomcat manipulates files and this is the core of the issue. I hope this extra information helps someone with the answer!
I see that Hoaz suggested moving the deployment out of C:\Program Files\ because of the space character. I wonder if it's rather a permissions issue than the space in the name?
Can you please also try these (without uninstalling the Tomcat from C:\Program Files\):
Configure the location of the temp directory to be outside C:\Program Files\
Reference : SO question How is the Tomcat temp directory location defined?
Change the location of docBase and/or appBase
Reference :Apache documentation http://tomcat.apache.org/tomcat-6.0-doc/config/host.html
Also, forcing the installation outside "C:\Program Files" would work fine unless / until someone insists that "That's where the Program Files should live, you know". :-)

Resources