Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run as a windows service, start is success, but stop outputs error message #2785

Closed
bonybeat opened this issue Sep 10, 2014 · 1 comment
Closed
Assignees
Labels

Comments

@bonybeat
Copy link

I wanto to run orientDB as windows service (in windows7 64bit).

I succeeded to start as windows service.

commons-daemon.2014-09-10.log as follows,

[2014-09-10 14:53:38] [info]  [ 6500] Commons Daemon procrun (1.0.14.0 64-bit) started
[2014-09-10 14:53:38] [info]  [ 6500] Service OrientDB name OrientDB
[2014-09-10 14:53:38] [info]  [ 6500] Service 'OrientDB' installed
[2014-09-10 14:53:38] [info]  [ 6500] Commons Daemon procrun finished
[2014-09-10 14:53:49] [info]  [ 5772] Commons Daemon procrun (1.0.14.0 64-bit) started
[2014-09-10 14:53:49] [info]  [ 5772] Running 'OrientDB' Service...
[2014-09-10 14:53:49] [info]  [ 4288] Starting service...
[2014-09-10 14:53:50] [info]  [ 4288] Service started in 1244 ms.

But at stopping as windows service, following error message outputed.

[2014-09-10 14:59:10] [info]  [ 5676] Stopping service...
[2014-09-10 14:59:10] [error] [ 7332] Failed to set service status
[2014-09-10 14:59:10] [error] [ 7332] the handle is invalid error

My installService.bat is follows.

:: OrientDB Windows Service Installation
rem @echo off
rem Remove surrounding quotes from the first parameter
set str=%~1
rem Check JVM DLL location parameter
if "%str%" == "" goto missingJVM
set JVM_DLL=%str%
rem Remove surrounding quotes from the second parameter
set str=%~2
rem Check OrientDB Home location parameter
if "%str%" == "" goto missingOrientDBHome
set ORIENTDB_HOME=%str%

pause

rem Install service
OrientDB.exe //IS//OrientDB ^
--DisplayName="OrientDB" ^
--Description="OrientDB ver1.7.8" ^
--StartClass="com.orientechnologies.orient.server.OServerMain" ^
--StopClass="com.orientechnologies.orient.server.OServerShutdownMain" ^
--Classpath=%ORIENTDB_HOME%\lib\* ^
--JvmOptions "-XX:+UseParallelGC;-XX:+AggressiveOpts;-XX:CompileThreshold=200;-Djava.util.logging.config.file="%ORIENTDB_HOME%\config\orientdb-server-log.properties";-Dorientdb.config.file="%ORIENTDB_HOME%\config\orientdb-server-config.xml";-Dorientdb.www.path="%ORIENTDB_HOME%\www";-Dlog.console.level=info;-Dlog.file.level=fine;-Dorientdb.build.number=@BUILD@;-DORIENTDB_HOME=%ORIENTDB_HOME%" ^
--StartMode=jvm ^
--StartPath="%ORIENTDB_HOME%\bin" ^
--StopMode=jvm ^
--StopPath="%ORIENTDB_HOME%\bin" ^
--Jvm="%JVM_DLL%" ^
--LogPath="%ORIENTDB_HOME%\log" ^
--Startup=auto


EXIT /B

:missingJVM
echo Insert the JVM DLL location
goto printUsage

:missingOrientDBHome
echo Insert the OrientDB Home
goto printUsage

:printUsage
echo usage:
echo installService JVM_DLL_location OrientDB_Home
EXIT /B

I use orientDB 1.7.8.

Can't it shutdown correctly?

@laa laa added the bug label Sep 26, 2014
@laa laa added this to the 2.0-M2 milestone Sep 26, 2014
@laa laa self-assigned this Sep 26, 2014
@lvca lvca modified the milestones: 2.0-M2, 2.0 Final Sep 28, 2014
@laa laa assigned tglman and unassigned laa Oct 10, 2014
@lvca lvca assigned laa and unassigned tglman Nov 26, 2014
@laa laa added the In Progress label Dec 1, 2014
@laa
Copy link
Member

laa commented Dec 2, 2014

Hi,
I used following installation script, it is a bit different than yours https://gist.github.com/laa/d7ae9fa191b0459c5f8f.
Also please grant write access to LOCAL_SERVICE and SYSTEM users to the server directory. It will solve your issues.

@laa laa closed this as completed Dec 2, 2014
@laa laa removed bug labels Dec 2, 2014
@lvca lvca added the wontfix label Dec 15, 2014
@lvca lvca modified the milestone: 2.0-RC1 (Release Candidate) Aug 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

4 participants