AIO was not located on this platform, it will fall back to using pure Java NIO - activemq-artemis

I am running ActiveMQ Artemis (2.18.0) on CentOS
OS: CentOS Linux release 7.9.2009 (Core)
Kernel: Linux 3.10.0-1160.31.1.el7.x86_64
Since I am running a kernel version newer than 2.6 on an x86_64 architecture then based on the documentation I only need to ensure that libaio is installed:
yum install libaio
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.1000mbps.com
* centos-sclo-rh: mirror.seedvps.com
* centos-sclo-sclo: mirror.seedvps.com
* extras: mirror.seedvps.com
* updates: mirror.seedvps.com
Package libaio-0.3.109-13.el7.x86_64 already installed and latest version
In the broker.xml I set the journal type to AIO:
<journal-type>ASYNCIO</journal-type>
I start the broker programmatically:
broker = new EmbeddedActiveMQ();
broker.setConfigResourcePath(fileConfig);
broker.start();
However, I get the following warning:
org.apache.activemq.artemis.core.server : AMQ222018: AIO was not located on this platform, it will fall back to using pure Java NIO. If your platform is Linux, install LibAIO to enable the AIO journal
What could be the case?

By starting the broker yourself programmatically you miss an important configuration detail performed by the artemis run command which sets the java.library.path system property to include the proper JNI library for AIO integration. Therefore you'll need to do this manually when you start your own Java application which starts the embedded instance of ActiveMQ Artemis. The library you need is in $ARTEMIS_HOME/bin/lib/linux-x86_64.
The documentation you cited references this fact saying:
These are the native libraries distributed by Apache ActiveMQ Artemis:
libartemis-native-64.so - x86 64 bits
We distributed a 32-bit version until early 2017. While it's not available on the distribution any longer it should still be possible to compile to a 32-bit environment if needed.
When using libaio, Apache ActiveMQ Artemis will always try loading these files as long as they are on the library path
If you then follow the library path link you'll see this:
If you're using the Asynchronous IO Journal on Linux, you need to specify java.library.path as a property on your Java options. This is done automatically in the scripts.
If you don't specify java.library.path at your Java options then the JVM will use the environment variable LD_LIBRARY_PATH.

The warning occurs because in order to integrate properly with AIO three conditions must be met:
Run on Linux.
LibAIO must be installed.
The java.library.path Java system property must be set to the directory with the proper shared object (e.g. libartemis-native-64.so).
In this case the third condition isn't met. Normally java.library.path is set on startup by the bin/artemis script, but this isn't done when embedding ActiveMQ Artemis into a Java application.
If using EmbeddedActiveMQ you can add AIO support in one of the following ways:
Manually
Download the Artemis version (i.e. the same version as your ActiveMQ Artemis Maven dependency).
Unzip the downloaded version (e.g. apache-artemis-2.18.0-bin.zip).
Copy the library proper library for your platform architecture (e.g. from apache-artemis-2.18.0/bin/lib/linux-x86_64).
Put the library on every Linux server where the broker is running.
Start your application with the following command:
-Djava.library.path="/path/to/linux-x86_64/"
Docker Container
Add the library to the container and startup java with the -Djava.library.path parameter.
Programmatically
If you feel comfortably (this works for me) you can load the library in runtime:
File aioFile = new File("./linux-x86_64/libartemis-native-64.so");
if(OSUtil.getOS().equals(OSUtil.OS.LINUX)){
if(!aioFile.exists()) {
//Create an empty file
FileUtils.touch(aioFile);
//Copy file from resources into empty file
ClassLoader classloader = Thread.currentThread().getContextClassLoader();
InputStream is = classloader.getResourceAsStream("libartemis-native-64.so");
Files.copy(is, aioFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
is.close();
logger.info("AIO Directory is set to " + aioFile.getParent());
}
addDir(aioFile.getParent());
}
public static void addDir(String s) throws IOException {
try {
// This enables the java.library.path to be modified at runtime
// From a Sun engineer at http://forums.sun.com/thread.jspa?threadID=707176
//
Field field = ClassLoader.class.getDeclaredField("usr_paths");
field.setAccessible(true);
String[] paths = (String[])field.get(null);
for (int i = 0; i < paths.length; i++) {
if (s.equals(paths[i])) {
return;
}
}
String[] tmp = new String[paths.length+1];
System.arraycopy(paths,0,tmp,0,paths.length);
tmp[paths.length] = s;
field.set(null,tmp);
System.setProperty("java.library.path", System.getProperty("java.library.path") + File.pathSeparator + s);
} catch (IllegalAccessException e) {
throw new IOException("Failed to get permissions to set library path");
} catch (NoSuchFieldException e) {
throw new IOException("Failed to get field handle to set library path");
}
}
For more info on loading java.library.path at runtime see this SO article.

Related

Apache Ignite crash on startup

I'm using Apache Ignite entity framework Nuget as a second level cache in an ApsNetCore 2.0 web application under IIS(as reverse proxy).
On my development machine (VS2017 Windows 8.1) everything works well. Wen i deploy to WindowsServer 2012 the Ignite crash at startup with :
An error occurred while starting the application.
IgniteException: Failed to load jvm.dll (Please specify IgniteConfiguration.JvmDllPath or JAVA_HOME.)
Apache.Ignite.Core.Impl.Unmanaged.Jni.JvmDll.Load(string configJvmDllPath, ILogger log)
TargetInvocationException: Exception has been thrown by the target of an invocation.
System.RuntimeTypeHandle.CreateInstance(RuntimeType type, bool publicOnly, bool noCheck, ref bool canBeCached, ref RuntimeMethodHandleInternal ctor, ref bool bNeedSecurityCheck)
IgniteException: Failed to load jvm.dll (Please specify IgniteConfiguration.JvmDllPath or JAVA_HOME.)
Apache.Ignite.Core.Impl.Unmanaged.Jni.JvmDll.Load(string configJvmDllPath, ILogger log)
Apache.Ignite.Core.Ignition.Start(IgniteConfiguration cfg)
Apache.Ignite.EntityFramework.IgniteDbConfiguration.GetOrStartIgnite(IgniteConfiguration cfg)
Apache.Ignite.EntityFramework.IgniteDbConfiguration..ctor()
I checked and re-chewed, installed the JDK , correct system variables....everything. The error don't goes away. What is interesting is the application run ok as console. When it runs under IIS(reverse proxy) it crashes at startup with the above error.
Any suggestions ?
Thank you
I managed to start the website. How ? Only with JDK 11 and explicit path to jvm.dll on app.config file:
If is not explicit in config then crashes.
The JAVA_HOME from system variable is correct set. Also the Path variable is
%JAVA_HOME%;%JAVA_HOME%\bin;%JAVA_HOME%\bin\server;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0;C:\Program Files\Microsoft\Web Platform Installer;C:\Program Files\dotnet;C:\Program Files (x86)\dotnet;C:\ProgramData\chocolatey\bin;C:\Program Files\Memurai;C:\Program Files\Java\jdk-15.0.1\bin\
Maybe is a conflict with C:\Program Files\Java\jdk-15.0.1\bin\ ? It carsh with jvm 15. But it works with jvm 11
Looks like the IIS worker process is running in 32-bit mode, so Ignite looks for a 32-bit JDK, which is not present.
And the console app runs in 64-bit mode, using 64-bit JDK, so it works.
Please check the app pool settings in IIS Manager -> Application Pools -> select the app pool you want and -> Advanced Settings.
Additionally, you can enable detailed logging to a file (since you can't see console logs in IIS) - Ignite logs all attempts to resolve the JDK path. For example, with Apache.Ignite.NLog package:
var nlogConfig = new LoggingConfiguration();
var fileTarget = new FileTarget
{
FileName = "/home/pavel/w/ignite_nlog.log"
};
nlogConfig.AddTarget("logfile", fileTarget);
nlogConfig.LoggingRules.Add(new LoggingRule("*", LogLevel.Trace, fileTarget));
LogManager.Configuration = nlogConfig;
var igniteConfig = new IgniteConfiguration
{
Logger = new IgniteNLogLogger()
};
Ignition.Start(igniteConfig);
I've checked the suggested points by Pavel Tupitsyn:
App pool aplication is 64bits (emable 32bits=false)
I've installed apache.Ignite.NLog
I'tested it on my machine and it logs well all java resolves.
I've deployed to windows server 2012 and under IIS i'm getting 'Process Failure'.
The log file looks like:
2020-12-07 19:39:38.3304|DEBUG||Starting Ignite.NET 2.9.0.50002
2020-12-07 19:39:38.3834|WARN||GC server mode is not enabled, this could lead to less than optimal performance on multi-core machines (to enable see http://msdn.microsoft.com/en-us/library/ms229357(v=vs.110).aspx).
2020-12-07 19:39:46.2534|DEBUG||Starting Ignite.NET 2.9.0.50002
so...just a warning (present on my machine too).
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info:
Apache.Ignite.Core.Common.IgniteException
at Apache.Ignite.Core.Impl.Unmanaged.Jni.JvmDll.Load(System.String, Apache.Ignite.Core.Log.ILogger)
at Apache.Ignite.Core.Ignition.Start(Apache.Ignite.Core.IgniteConfiguration)
at Nop.Web.Program.Main(System.String[])
well...adding apache.ingite.nlog throws PROCESS FAILURE
Hosting is virtual machine with Windows Server 2012 64bits
Any other ideas please....

Unable to create queues in ActiveMQ broker

In one of the ActiveMQ instance (v5.13.3), when tried to create a queue manually using Web console, getting error as shown below
Within the ActiveMQ logs, there is no errors but an warn as below. This instance is working fine for the existing queues & topics. Only facing problem while trying a new queue. Even the restart doesn't the help. With the similar setup it works fine in another instances.
2018-07-05 14:42:49,700 | WARN | /admin/createDestination.action | org.eclipse.jetty.servlet.ServletHandler | qtp2076549461-5084797
java.io.EOFException
at java.io.RandomAccessFile.readFully(RandomAccessFile.java:438)[:1.8.0_112]
at java.io.RandomAccessFile.readFully(RandomAccessFile.java:416)[:1.8.0_112]
at org.apache.activemq.util.RecoverableRandomAccessFile.readFully(RecoverableRandomAccessFile.java:75)[activemq-kahadb-store-5.13.3.jar:5.13.3]
at org.apache.activemq.store.kahadb.disk.page.PageFile.readPage(PageFile.java:878)[activemq-kahadb-store-5.13.3.jar:5.13.3]
at org.apache.activemq.store.kahadb.disk.page.Transaction$2.readPage(Transaction.java:456)[activemq-kahadb-store-5.13.3.jar:5.13.3]
at org.apache.activemq.store.kahadb.disk.page.Transaction$2.<init>(Transaction.java:447)[activemq-kahadb-store-5.13.3.jar:5.13.3]
at org.apache.activemq.store.kahadb.disk.page.Transaction.openInputStream(Transaction.java:444)[activemq-kahadb-store-5.13.3.jar:5.13.3]
at org.apache.activemq.store.kahadb.disk.page.Transaction.load(Transaction.java:420)[activemq-kahadb-store-5.13.3.jar:5.13.3]
at org.apache.activemq.store.kahadb.disk.page.Transaction.load(Transaction.java:377)[activemq-kahadb-store-5.13.3.jar:5.13.3]
at org.apache.activemq.store.kahadb.disk.index.BTreeIndex.loadNode(BTreeIndex.java:266)[activemq-kahadb-store-5.13.3.jar:5.13.3]
at org.apache.activemq.store.kahadb.disk.index.BTreeNode.getChild(BTreeNode.java:233)[activemq-kahadb-store-5.13.3.jar:5.13.3]
at org.apache.activemq.store.kahadb.disk.index.BTreeNode.getLast(BTreeNode.java:624)[activemq-kahadb-store-5.13.3.jar:5.13.3]
at org.apache.activemq.store.kahadb.disk.index.BTreeIndex.getLast(BTreeIndex.java:248)[activemq-kahadb-store-5.13.3.jar:5.13.3]
at org.apache.activemq.store.kahadb.MessageDatabase$MessageOrderIndex.addLast(MessageDatabase.java:3298)[activemq-kahadb-store-5.13.3.jar:5.13.3]
at org.apache.activemq.store.kahadb.MessageDatabase$MessageOrderIndex.configureLast(MessageDatabase.java:3289)[activemq-kahadb-store-5.13.3.jar:5.13.3]
at org.apache.activemq.store.kahadb.MessageDatabase.loadStoredDestination(MessageDatabase.java:2346)[activemq-kahadb-store-5.13.3.jar:5.13.3]
at org.apache.activemq.store.kahadb.MessageDatabase.getStoredDestination(MessageDatabase.java:2298)[activemq-kahadb-store-5.13.3.jar:5.13.3]
at org.apache.activemq.store.kahadb.KahaDBStore$KahaDBMessageStore$7.execute(KahaDBStore.java:722)[activemq-kahadb-store-5.13.3.jar:5.13.3]
at org.apache.activemq.store.kahadb.KahaDBStore$KahaDBMessageStore$7.execute(KahaDBStore.java:716)[activemq-kahadb-store-5.13.3.jar:5.13.3]
at org.apache.activemq.store.kahadb.disk.page.Transaction.execute(Transaction.java:802)[activemq-kahadb-store-5.13.3.jar:5.13.3]
at org.apache.activemq.store.kahadb.KahaDBStore$KahaDBMessageStore.recoverMessageStoreStatistics(KahaDBStore.java:716)[activemq-kahadb-store-5.13.3.jar:5.13.3]
at org.apache.activemq.store.AbstractMessageStore.start(AbstractMessageStore.java:45)[activemq-broker-5.13.3.jar:5.13.3]
at org.apache.activemq.store.kahadb.KahaDBStore$KahaDBMessageStore.start(KahaDBStore.java:671)[activemq-kahadb-store-5.13.3.jar:5.13.3]
at org.apache.activemq.store.ProxyMessageStore.start(ProxyMessageStore.java:75)[activemq-broker-5.13.3.jar:5.13.3]
at org.apache.activemq.broker.region.Queue.initialize(Queue.java:385)[activemq-broker-5.13.3.jar:5.13.3]
at org.apache.activemq.broker.region.DestinationFactoryImpl.createDestination(DestinationFactoryImpl.java:87)[activemq-broker-5.13.3.jar:5.13.3]
at org.apache.activemq.broker.region.AbstractRegion.createDestination(AbstractRegion.java:629)[activemq-broker-5.13.3.jar:5.13.3]
at org.apache.activemq.broker.jmx.ManagedQueueRegion.createDestination(ManagedQueueRegion.java:56)[activemq-broker-5.13.3.jar:5.13.3]
at org.apache.activemq.broker.region.AbstractRegion.addDestination(AbstractRegion.java:155)[activemq-broker-5.13.3.jar:5.13.3]
at org.apache.activemq.broker.region.RegionBroker.addDestination(RegionBroker.java:348)[activemq-broker-5.13.3.jar:5.13.3]
at org.apache.activemq.broker.BrokerFilter.addDestination(BrokerFilter.java:173)[activemq-broker-5.13.3.jar:5.13.3]
at org.apache.activemq.advisory.AdvisoryBroker.addDestination(AdvisoryBroker.java:239)[activemq-broker-5.13.3.jar:5.13.3]
at org.apache.activemq.broker.BrokerFilter.addDestination(BrokerFilter.java:173)[activemq-broker-5.13.3.jar:5.13.3]
at org.apache.activemq.broker.BrokerFilter.addDestination(BrokerFilter.java:173)[activemq-broker-5.13.3.jar:5.13.3]
at org.apache.activemq.broker.MutableBrokerFilter.addDestination(MutableBrokerFilter.java:178)[activemq-broker-5.13.3.jar:5.13.3]
at org.apache.activemq.broker.jmx.BrokerView.addQueue(BrokerView.java:405)[activemq-broker-5.13.3.jar:5.13.3]
at org.apache.activemq.web.DestinationFacade.addDestination(DestinationFacade.java:56)[activemq-web-5.13.3.jar:5.13.3]
at org.apache.activemq.web.controller.CreateDestination.handleRequest(CreateDestination.java:38)[file:/C:/Talend/6.2.1/esb/activemq/webapps/admin/WEB-INF/classes/:]
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:50)[spring-webmvc-4.1.9.RELEASE.jar:4.1.9.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)[spring-webmvc-4.1.9.RELEASE.jar:4.1.9.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)[spring-webmvc-4.1.9.RELEASE.jar:4.1.9.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:965)[spring-webmvc-4.1.9.RELEASE.jar:4.1.9.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:867)[spring-webmvc-4.1.9.RELEASE.jar:4.1.9.RELEASE]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)[tomcat-servlet-api-8.0.24.jar:]
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:841)[spring-webmvc-4.1.9.RELEASE.jar:4.1.9.RELEASE]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)[tomcat-servlet-api-8.0.24.jar:]
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.apache.activemq.web.AuditFilter.doFilter(AuditFilter.java:59)[activemq-web-5.13.3.jar:5.13.3]
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)[spring-web-4.1.9.RELEASE.jar:4.1.9.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)[spring-web-4.1.9.RELEASE.jar:4.1.9.RELEASE]
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.apache.activemq.web.filter.ApplicationContextFilter.doFilter(ApplicationContextFilter.java:102)[file:/C:/Talend/6.2.1/esb/activemq/webapps/admin/WEB-INF/classes/:]
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:542)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:542)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.server.Server.handle(Server.java:499)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_112]
[1]: https://i.stack.imgur.com/gNbCT.png
This is mostly because of incompatible Jetty version with JDK 1.8. You can resolve this
either by downgrading the JDK version to 1.7 and the set the JAVA_HOME or by upgrading the Jetty compatible with JDK 1.8.
I have got the similar issue with activemq version 5.10.0. Web console was working fine with JDK 1.7 but throwing an exception for JDK 1.8.
The root cause of the problem is due to corrupted kahadb database files of the Active MQ. Copied the kahadb folder from another runtime instance (similar setup) and restarted the Active MQ service. This issue is now fixed.

Failed to start Neo4j service

I am using neo4j enterprise 3.0.3 version for windows. Following the operations manual 3.0, I have installed the neo4j service with bin\neo4j install-service. But I can't start it with bin\neo4j start. It said
Invoke-Neo4j : Failed to start service 'Neo4j Graph Database - neo4j (neo4j)'.
And I can't start the neo4j service in windows serice either. Maybe anyone have encountered this case before?
I had the same problem: I am using neo4j community 3.1.2 for windows and installed the service with the neo4j.bat file without any problems.Then i wanted to start the service with neo4j.bat and got the same error as you
I found a solution that worked for me. My neo4j files were in a folder, where the path to the folder contained spaces (C:\Program Files\Neo4j) Then i moved the folder one level up (C:\Neo4j).
After that i could start the service without problems.
Maybe this solution helps.
I am running neo4j on windows and in my case the crux of the issue was that there was an incompatibility between the installed versions of Java (32-bit) v/s OS version. The biggest clue that led me to this is the following set of lines in neo4j-service.2018-08-03 log file
[2018-08-03 14:55:42] [info] [ 1432] Starting service...
[2018-08-03 14:55:42] [error] [ 1432] %1 is not a valid Win32 application.
[2018-08-03 14:55:42] [error] [ 1432] Failed creating java C:\JavaNew\bin\server\jvm.dll
[2018-08-03 14:55:42] [error] [ 1432] %1 is not a valid Win32 application.
[2018-08-03 14:55:42] [error] [ 1432] ServiceStart returned 1
There are a fair number of potential issues, and I have made an attempt to compile all the issues with this,
Windows services cannot deal with service names in folders that have spaces; especially if there is another folder with the same name as the one with spaces.
For example - C:\Program Files... will have issues if C:\Program\Something...
To work around this, I put Neo4j in root folder c:\Neo4j
Get-Java.ps1 (under ..\bin\Neo4j-Management folder)looks in the path variable for 'JAVA_HOME' (usually found in *nix environments). If it does not find it here, it keeps looking in registry, and finally throws up its hand!
To deal with this, I simply put in a path variable. For a good measure, I uninstalled Java and re-installed Java in the root folder under C:\JavaNew
In retrospect, this step is probably not on part of the problem, and hence can be ignored. But I am leaving it here for completeness sake.
Invoke-Neo4j.ps1 (also under ..\bin\Neo4j-Management folder) has code that determines if the OS is 32-bit (or 64-bit). Based on this it determines if it should run prunsrv-i386.exe (32-bit) or prunsrv-amd64.exe (64-bit).
This has to match the Java version installed.
Upon running java -XshowSettings:all, and inspecting the sun.arch.data.model value (32, in my case), I realized that my OS is 64 bit and the Java version is 32-bit.
To deal with this, I put in code (very klugey!). I am sure there are much better ways to get to the same outcome, but this is what I used.
switch ( (Get-WMIObject -Class Win32_Processor | Select-Object -First 1).Addresswidth ) {
32 { $PrunSrvName = 'prunsrv-i386.exe' } # 4 Bytes = 32bit
#64 { $PrunSrvName = 'prunsrv-amd64.exe' } # 8 Bytes = 64bit COMMENTED as a workaround!!!
64 { $PrunSrvName = 'prunsrv-i386.exe' } # 8 Bytes = 64bit
Now, uninstall the neo4j service, install it, and start the service.
Hope this works for you.
neo4j console
Posting for latest versions > 4.x
I had the same issue using neo4j start, Neo4j console is the right command I was looking for. It is a web-based graph that acts as an interactive tutorial.
i had the same problem , after the neo4j worked for few weeks it stoop working (without any change that i made)
i have set java_home uninstall and install and now it works
neo4j-enterprise-3.3.4
I was also having weired issue as there was no error but neo4J service did not start.
[xx#ss1 bin]$ ./neo4j console
[xx#ss1 bin]$ .
The problem was with the permission on Java directory and I tried
chmod -R 777 jdk_directory
and problem got solved.
#neo4j #neo4jnotstarting

Jetty Web Server unable to start "java.io.IOException: cannot read file:.."

015-04-08 12:56:30 Commons Daemon procrun stderr initialized
java.io.IOException: Cannot read file: C:\Streem\web\modules\annotations.mod
at org.eclipse.jetty.start.Modules.registerModule(Modules.java:549)
at org.eclipse.jetty.start.Modules.registerAll(Modules.java:486)
at org.eclipse.jetty.start.Main.processCommandLine(Main.java:608)
at org.eclipse.jetty.start.Main.main(Main.java:111)
I checked that installed Java version 1.7.0_25 and npn-1.7.0_25.mod do exist under web\modules\protonego-impl\
I am using jetty-9.2.5.v20141112 on windows 2008 R2 server
Does annotations.mod need something special regarding this case?
We found the same problem on Windows Server 2008. It happens when Jetty is trying to read the module configuration files and is due to a fault in the check for readability.
In the jetty source file FS.java line 39 a check is made using java.nio, to see if the file is readable:
public static boolean canReadFile(Path path)
{
return Files.exists(path) && Files.isRegularFile(path) && Files.isReadable(path);
}
The call to isReadable is slow and fails, see also:
http://mail.openjdk.java.net/pipermail/nio-discuss/2012-July/000672.html
The file itself is in fact readable and can be successfully read from Java, but the isReadable incorrectly returns false.
There are two possible workarounds:
Upgrade to Java 8
Remove the check for isReadable from the Jetty source (in any case if the file wasn't readable the reading will fail with an exception).
(See also similar question unable to start jetty service through command in window 7)
This is a fundamental I/O error, something prevented Jetty from reading that file.
Try some basic troubleshooting ...
File permissions?
Windows File Locking issue? (a different process has that file open?)

HornetQ not using AIO on ubuntu

I have installed libaio on ubuntu, and running HornetQ embedded, with programmatic config, I am doing this to use AIO on journal, but I see on startup, it's not getting AIO, always using NIO. Any way to determine why it would be failing?
Configuration configuration = new ConfigurationImpl();
boolean supportsAIO = AIOSequentialFileFactory.isSupported();
if (supportsAIO) {
configuration.setJournalType(JournalType.ASYNCIO);
log.info("** using AIO **");
} else {
configuration.setJournalType(JournalType.NIO);
log.info("** using NIO **");
}
You have to define -Djava.library.path=PathToYourBinaries
and you should have these files at PathToYourBinaries:
libHornetQAIO32.so
libHornetQAIO64.so
if you still can't load it then it will be a matter of recompiling the natives at your system, but most likely you just need to define java.library.path.