I've just downloaded RC2. I was running 1.9 without issues in the past. Running on Windows 7.
Here's what is happening when I install. All attempts to start the service fail with the 87 error message.
C:\Neo4j\Neo4JTest\neo4j-community-2.0.0-RC1\bin>Neo4jInstaller.bat install
"WARNING: this installer is deprecated and may not be the optimal way to install Neo4j on your system."
"Please see the Neo4j Manual for up to date information on installing Neo4j."
Press any key to continue
[SC] CreateService SUCCESS
[SC] StartService FAILED 87:
The parameter is incorrect.
Regarding the warning message: The installer doesn't seem to have an option for installing as a service, and I haven't seen any other instructions in the manual for installing as a service.
http://docs.neo4j.org/chunked/2.0.0-RC1/server-installation.html#windows-install
Neo4j 2.0.0-RC1
neo4j-community-2.0.0-RC1-windows
Windows 7
neo4j>bin\Neo4jInstaller.bat install
[SC] CreateService SUCCESS
[SC] StartService FAILED 87:
The parameter is incorrect.
This problem is the result of a combination of bugs in the new Neo4j installation bat files that result in a corrupt binPath= parameter in the sc create service command in the Neo4jInstaller.bat file itself.
Specifically, the sc create command requires the binPath= parameter in this instance to be quoted, as there are embedded spaces within the Neo4j %binPath% variable. However, the sc create command created within Neo4jInstaller.bat contains unescaped quotes and an erroneous space embedded in the %javaPath% variable within the %binPath% variable definition.
To fix this, two files need to be edited:
bin\functions.bat
bin\Neo4jInstaller.bat
The invalid space embedded in the %javaPath% variable is caused by a space after the "=" sign in the set javaPath="%JAVA_HOME%" command in functions.bat.
The unescaped quotes in %binPath% require three changes in Neo4jInstaller.bat:
The quotes in the %javaPath% variable must be removed before is is embedded in the %binPath% variable.
The entire %javaPath%\bin\java.exe path must be enclosed in
quotes.
The %binPath% variable value must be enclosed in quotes, and the
quotes embedded within the %binPath% variable must be escaped.
Additionally, the call to functions.bat within Neo4jInstaller.bat must be modified, because functions.bat resides in the \bin subdirectory, and Neo4jInstaller.bat must be run from the root neo4j directory.
functions.bat
=============
:findJavaHome
if not "%JAVA_HOME%" == "" (
if exist "%JAVA_HOME%\bin\javac.exe" (
rem set javaPath= "%JAVA_HOME%\jre"
set javaPath="%JAVA_HOME%\jre"
goto:eof
)
rem set javaPath= "%JAVA_HOME%"
set javaPath="%JAVA_HOME%"
goto:eof
)
Neo4jInstaller.bat
==================
rem call functions.bat :findJavaHome
rem set javaPath=%javaPath:"="""%
rem set binPath="%javaPath%\bin\java.exe %loggingProperties% -DworkingDir="%~dps0.." -DconfigFile=%configFile% %classpath% %mainclass% -Dorg.neo4j.cluster.logdirectory="%~dps0..\data\log" -jar %~dps0%wrapperJarFilename% %serviceName%"
call %~dps0functions.bat :findJavaHome
set javaPath=%javaPath:"=%
set binPath="%javaPath%\bin\java.exe" %loggingProperties% -DworkingDir="%~dps0.." -DconfigFile=%configFile% %classpath% %mainclass% -Dorg.neo4j.cluster.logdirectory="%~dps0..\data\log" -jar %~dps0%wrapperJarFilename% %serviceName%
set binPath="%binPath:"=\"%"
There is a "Closed" Neo4j ticket on GitHub at https://github.com/neo4j/neo4j/pull/1535 that only partially fixes these issues for RC2. However, in the meantime, you will have to fix this yourself.
So here's what I discovered.
There's a registry key here:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services_whatever_you_named_the_service
The Image Path has quotes like so:
"C:\Program Files\Java\jdk1.7.0_21\jre"\bin\java.exe ....
I removed the quotes
C:\Program Files\Java\jdk1.7.0_21\jre\bin\java.exe ....
It now works.
Looking at the bat file it's finding javaPath from my JAVA_HOME env variable and setting %javaPath% with quotes around it in functions.bat.
Then there's a part that's adding three extra quotes in place of any existing quotes in the javaPath on line 55 of Neo4jInstaller.bat
set javaPath=%javaPath:"="""%
Found this on the GitHub, not sure if it is going to fix this issue considering someone elses comment regarding the issue:
https://github.com/neo4j/neo4j/pull/1535
As this is the first results which pops up in google when searching for: "[SC] StartService FAILED 87: The parameter is incorrect."
Check the path again. In most cases the error is in the quoted path.
I run into this problem when creating a windows service with .NET Core 2.0.
Path example:
sc create YourServiceName binPath= "C:\Users\john\source\published\YourServiceName\YourServiceName.exe"
My mistake was a space:
sc create YourServiceName binPath= " C:\Users\john\source\published\YourServiceName\YourServiceName.exe"
Related
I am trying to add to the PATH via the Environment Variable settings windows for python.exe.
I have read the instructions using SetX from the March 3, 2012 discussion about this issue and am worried I will make a mess of my machine, so want to stick with the GUI process.
The directory path is C:\Users\Paul\AppData\Local\Programs\Python\Python37\python.exe.
That is a copy from the addition I made in the System Variables section of the Environment Variables window.
I have labelled the Variable Name as "Python", no quotation marks.
I have checked the path, and it looks good to me, and have rebooted the computer. But I still get the
'python.exe' is not recognized as an internal or external command, operable program or batch file.' error in every directory expect if I am specifically in the Python37 directory.
Any idea what I am doing wrong?
The path environment variable contains one or more paths, separated by semicolons. When you try to execute a command in cmd.exe it checks each path listed in the path variable in order of first to last until it finds the executable or runs out of paths to check.
You can experiment without making permanent changes to your system first. Run cmd.exe and type
set path=%path%;C:\Users\Paul\AppData\Local\Programs\Python\Python37
Running python.exe should now work in any directory in this cmd.exe window.
Unlike other environment variables, path is special and is a merged value from the system and user variables. Since you installed python just for yourself you might as well just use a user variable.
In the system properties where you edit environment variables, if there is no path user variable, create one and set it to C:\Users\Paul\AppData\Local\Programs\Python\Python37 or if it already exists, append ;C:\Users\Paul\AppData\Local\Programs\Python\Python37.
In newer versions of Windows 10 the UI is different and you don't have to add the semicolon because it lets you edit them as separate entries.
I am trying to install Weblogic adminserver as windows service but getting "Input too long" error while executing the install script.
I have struggled a lot in this issue and finally got the way to register AdminServer and Nodemanager as windows service for Weblogic. Below are the steps and issues faced with the progress:
To register weblogic AdminServer as windows server first need to create a script which will contain values like oracle home, java home etc. Below is the script I have used to install the service:
`
echo off
SETLOCAL
set MW_HOME=C:\Oracle\Middleware\Oracle_Home
set DOMAIN_NAME=osb_domain
set USERDOMAIN_HOME=C:\Oracle\Middleware\Oracle_Home\user_projects\domains\osb_domain
set SERVER_NAME=AdminServer
set WL_HOME=C:\Oracle\Middleware\Oracle_Home\wlserver
set PRODUCTION_MODE=true
set JAVA_OPTIONS=-Dweblogic.Stdout="%USERDOMAIN_HOME%\stdout.txt" -Dweblogic.Stderr="%USERDOMAIN_HOME%\stderr.txt"
set WLS_USER=weblogic
set WLS_PW=Password123
set MEM_ARGS=-Xms1024m -Xmx1024m
call "C:\Oracle\Middleware\Oracle_Home\user_projects\domains\osb_domain\bin\setDomainEnv.cmd"
call "C:\Oracle\Middleware\Oracle_Home\wlserver\server\bin\installSvc.cmd"
ENDLOCAL
`
By running this script I was not even able to install the windows service as it was throwing " Input is too long" error and the reason is windows char limitations. You might get confused by classpath and will try to resolve classpath but
the issue is with JAVA_OPTIONS values which is set by SetDomainEnv.txt is creating this issue.
I have modified the script like below and shorten the JAVA_OPTIONS values by calling SetDomainEnv.txt command just before setting JAVA_OPTIONS in the script.
This has overridden the lengthy value of JAVA_OPTIONS. Now I have succesfully installed the AdminServer as windows service.
`
echo off
SETLOCAL
set MW_HOME=C:\Oracle\Middleware\Oracle_Home
set DOMAIN_NAME=osb_domain
set USERDOMAIN_HOME=C:\Oracle\Middleware\Oracle_Home\user_projects\domains\osb_domain
set SERVER_NAME=AdminServer
set WL_HOME=C:\Oracle\Middleware\Oracle_Home\wlserver
set PRODUCTION_MODE=true
call "C:\Oracle\Middleware\Oracle_Home\user_projects\domains\osb_domain\bin\setDomainEnv.cmd"
set JAVA_OPTIONS=-Dweblogic.Stdout="%USERDOMAIN_HOME%\stdout.txt" -Dweblogic.Stderr="%USERDOMAIN_HOME%\stderr.txt"
set WLS_USER=weblogic
set WLS_PW=Password123
set MEM_ARGS=-Xms1024m -Xmx1024m
call "C:\Oracle\Middleware\Oracle_Home\wlserver\server\bin\installSvc.cmd"
ENDLOCAL `
Even the service is successfully installed, when I was starting it the service is stopped immediately and wasn't printing any logs as it was not connecting to AdminServer.
After a bit analysis I found that JAVA_OPTIONS values which I have overridden in my script is very much needed to invoke AdminServer.
I have run SetDomainEnv.txt in cmd prompt and copied thre JAVA_OPTIONS values.
As the service is already installed, I just copied the correct JAVA_OPTIONS values CMDLINE param in the windows service registry manually.
Server subsystem failed. Reason: A MultiException has 6 exceptions.
Server installed as Windows NT service with incorrect password for user weblogic. The password may have been changed since the server was installed as a Windows NT Service. Contact the Windows NT system administrator.
Note: No extra spaces or character is inserted in CMDLINE param.
Now everything is in place which is actually required to start the admin server. But when I start the service it is throwing some authentication error along with others in the adminserver.log file.
after a lot of analysis I found that is is not authentoication issue, the problem was with boot.properties file. boot. properties file was not read properly.
This answer is continuation of below one:
after a lot of analysis I found that is is not authentoication issue, the problem was with boot.properties file. boot. properties file was not read properly.
Now I would give some background- If the fusion middleware is installed as development mode the boot.properties files is created automatically inside Oracle_HOME\user_projects\domains\domainname\servers\AdminServer\security and if you look at this prop file you will find the password and username in encrypted mode.
If the fusion Middleware is installed as production Mode then everytime it will ask for password and username. to avoid this perform below steps:
manually create file under Oracle_HOME\user_projects\domains\domainname\servers\AdminServer\security\boot.properties like mention below:
username=weblogic
password=Password
Note: No spaces should be added and take care of file extension.
Now start weblogic from domain\bin\startWeblogic.cmd. This will encrypt you boot.properties file. check boot.proprties file if encrypted you are good to go.
Finally start the windows service whic is installed following above process. It should work fine.
=======================
About Node manager use installNodeMgrSvc from domain\bin. Again if you get input is too long error, you must shorten JAVA_OPTIONS and then carefully edit CMDLINE param in the windows registry.
I tried various ant versions and also tried running the command directly from ant_home/bin directory, but no luck only below error:
ant error "The syntax of the command is incorrect." on running ant.bat
kindly help on this, I am not finding anything helpful anywhere on the web.
Thanks
Luckily I got the problem root cause and solved it :)
The reason was my java_home was ending with a " character in environment variable, after removing the " from java_home path, ant started working as expected.
to investigate the aforesaid I just opened the ant.bat in notepad and in the first line I changed echo "off" to echo "on", by doing that, when I hit ant.bat in the command prompt it logged the exact line of ant.build file where the aforesaid error was being thrown.
I have JAVA_HOME set with proper path but it was pointing to JDK 1.8. I need to change it to point to JDK 1.6 in order to resolve the issue.
The ANT_HOME and JAVA_HOME environment variables are configured in some user machines with "" surrounding the paths, to overcome the spaces in the folder paths.
Having the folder paths with "" around them could be the reason for the message. Either the quotes are to removed or the multiple paths are to separated by ";"
Ref : https://www.mail-archive.com/dev#ant.apache.org/msg37855.html
My build failed when I had a hyphen in a variable name but succeeded when I changed it to an underscore.
The error was this but I could see in the online Workspace browser that it was valid and as mentioned above it succeeded with an underscore!
15:55:25 + MY-DISTRO=/home/jenkins/workspace/build-prod/my-distro
15:55:25 /tmp/hudson6751264218812911564.sh: line 3: MY-DISTRO=/home/jenkins/workspace/build-prod/my-distro: No such file or directory
What are valid characters for Jenkins variables names and where is this documented?
Judging by the .sh extension of the temporary script in the log you pasted, I assume you used the Execute shell build step in Jenkins - so in this case "valid" variable names mean variables in a linux shell script (the exact shell type might vary based on local configuration) - see for example this thread about allowed names on linux.
In case you have a windows slave, and use the Execute Windows batch command build step, you would of course have to check rules for windows variable names.
Also note that variables used in other places as these and similar build steps could potentially follow completely different rules (though sometimes they overlap). For example: if a plugin uses the Token Macro Plugin for evaluating expressions, you would have to refer to environmental variables with ${ENV,var="VARIABLENAME"}.
Jenkins is java based. Most probably it accepts java variable convention. I suggest avoid using $ in variable names since unix based operating systems treat it differently.
What Atilla said, but avoid dots (.) as well.
I'm setting up my first Ruby project on Team City, which is hosted on a Windows Server, but I'm having a problem. Now, because the server may not have the required gems installed, I've added a command line build step:
bundle install
Now I thought this would be enough, but apparently bundle is not recognized as an internal or external command. Except, if I RDP into the server, if I run bundle install from anywhere, it is fine, and just notifies me that no gemfile was found.
Any ideas on if I've missed a step, or I'm going about this the wrong way?
Most likely this is a problem with TeamCity not finding the path to ruby executables.
You can address this by overriding the value to the PATH environment variable in your build configuration in the Build Parameters section.
env.PATH=/path/to/ruby;%env.PATH%
See this answer for the proper links to documentation, etc.
EDIT #1
I noticed when updating one of my configurations that TeamCity is supposed to take care of appending values so you DO NOT need to set path equal to itself. The post mentioned above is a workaround for a bug where TeamCity was overwriting the values, but that has been corrected. See the help at the mouse-over for more information:
EDIT #2
I tested edit #1 and found that is not the case. You do need to
create an environment variable env.Path
and set it's value to itself plus your new path; in my example, C:\Program Files\MySQL\MySQL Server 5.6\bin\;%env.Path%
you do NOT need to say env.Path=... as listed above; that is what the configuration file will look like.
I tested this out by doing the following:
Created a new project with no repository
Added a command line build step to `echo %env.Path%
Added a command step to call MySql mysql --help This will fail if it cannot find MySql
I then ran it for each of the following settings for the env.Path variable:
Not added / changed; TeamCity reports out the environment variable for the build agent as is.
Added as just C:\Program Files\MySQL\MySQL Server 5.6\bin\. TeamCity reports out only that entry.
Added as C:\Program Files\MySQL\MySQL Server 5.6\bin\;%env.Path%. TeamCity prepends C:\Program Files\MySQL\MySQL Server 5.6\bin\ to the build agent's values shown in #1. The result is what we want, #1 + #2