Skip to content

Commit

Permalink
ONGDB-248 - ONgDB service fails to start on Windows with service 'ong…
Browse files Browse the repository at this point in the history
…db' not found
  • Loading branch information
bradnussbaum committed Mar 24, 2021
1 parent 2a1c8c1 commit 0b53efa
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

Copyright = 'https://graphfoundation.org/ongdb/'

Description = 'Powershell module to manage a ONgDB instance on Windows'
Description = 'Powershell module to manage an ONgDB instance on Windows'

PowerShellVersion = '2.0'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,23 +158,23 @@ function Get-ONgDBPrunsrv
$JvmOptions = [array](Merge-ONgDBJavaSettings -Source $JvmOptions -Add $cmdSettings)

$PrunArgs += @("`"--StartMode=jvm`"",
"`"--StartMethod=start`"",
"`"--StartPath=$($ONgDBServer.Home)`"",
"`"--StartParams=--config-dir=$($ONgDBServer.ConfDir)`"",
"`"++StartParams=--home-dir=$($ONgDBServer.Home)`"",
"`"--StopMode=jvm`"",
"`"--StopMethod=stop`"",
"`"--StopPath=$($ONgDBServer.Home)`"",
"`"--Description=ONgDB Graph Database - $($ONgDBServer.Home)`"",
"`"--DisplayName=ONgDB Graph Database - $Name`"",
"`"--Jvm=$($JvmDLL)`"",
"`"--LogPath=$($ONgDBServer.LogDir)`"",
"`"--StdOutput=$(Join-Path -Path $ONgDBServer.LogDir -ChildPath 'ongdb.log')`"",
"`"--StdError=$(Join-Path -Path $ONgDBServer.LogDir -ChildPath 'service-error.log')`"",
"`"--LogPrefix=ongdb-service`"",
"`"--Classpath=lib/*;plugins/*`"",
"`"--JvmOptions=$($JvmOptions -join ';')`"",
"`"--Startup=auto`""
"`"--StartMethod=start`"",
"`"--StartPath=$($ONgDBServer.Home)`"",
"`"--StartParams=--config-dir=$($ONgDBServer.ConfDir)`"",
"`"++StartParams=--home-dir=$($ONgDBServer.Home)`"",
"`"--StopMode=jvm`"",
"`"--StopMethod=stop`"",
"`"--StopPath=$($ONgDBServer.Home)`"",
"`"--Description=ONgDB Graph Database - $($ONgDBServer.Home)`"",
"`"--DisplayName=ONgDB Graph Database - $Name`"",
"`"--Jvm=$($JvmDLL)`"",
"`"--LogPath=$($ONgDBServer.LogDir)`"",
"`"--StdOutput=$(Join-Path -Path $ONgDBServer.LogDir -ChildPath 'ongdb.log')`"",
"`"--StdError=$(Join-Path -Path $ONgDBServer.LogDir -ChildPath 'service-error.log')`"",
"`"--LogPrefix=ongdb-service`"",
"`"--Classpath=lib/*;plugins/*`"",
"`"--JvmOptions=$($JvmOptions -join ';')`"",
"`"--Startup=auto`""
)

# Check if Java invocation includes Java memory sizing
Expand All @@ -198,7 +198,7 @@ function Get-ONgDBPrunsrv
if ($ONgDBServer.ServerType -eq 'Community') { $serverMainClass = 'org.neo4j.server.CommunityEntryPoint' }
if ($ONgDBServer.DatabaseMode.ToUpper() -eq 'ARBITER') { $serverMainClass = 'org.neo4j.server.enterprise.ArbiterEntryPoint' }
$PrunArgs += @("`"--StopClass=$($serverMainClass)`"",
"`"--StartClass=$($serverMainClass)`"")
"`"--StartClass=$($serverMainClass)`"")
}
"ServerUninstallInvoke" { $PrunArgs += @("`"//DS//$($Name)`"") }
"ServerStartInvoke" { $PrunArgs += @("`"//ES//$($Name)`"") }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,10 @@ function Get-ONgDBServer
# Set process level environment variables
# These should mirror the same paths in ongdb-shared.sh
$dirSettings = @{ 'ONGDB_DATA' = @{ 'config_var' = 'dbms.directories.data'; 'default' = (Join-Path $ONgDBHome 'data') }
'ONGDB_LIB' = @{ 'config_var' = 'dbms.directories.lib'; 'default' = (Join-Path $ONgDBHome 'lib') }
'ONGDB_LOGS' = @{ 'config_var' = 'dbms.directories.logs'; 'default' = (Join-Path $ONgDBHome 'logs') }
'ONGDB_PLUGINS' = @{ 'config_var' = 'dbms.directories.plugins'; 'default' = (Join-Path $ONgDBHome 'plugins') }
'ONGDB_RUN' = @{ 'config_var' = 'dbms.directories.run'; 'default' = (Join-Path $ONgDBHome 'run') }
'ONGDB_LIB' = @{ 'config_var' = 'dbms.directories.lib'; 'default' = (Join-Path $ONgDBHome 'lib') }
'ONGDB_LOGS' = @{ 'config_var' = 'dbms.directories.logs'; 'default' = (Join-Path $ONgDBHome 'logs') }
'ONGDB_PLUGINS' = @{ 'config_var' = 'dbms.directories.plugins'; 'default' = (Join-Path $ONgDBHome 'plugins') }
'ONGDB_RUN' = @{ 'config_var' = 'dbms.directories.run'; 'default' = (Join-Path $ONgDBHome 'run') }
}
foreach ($name in $dirSettings.Keys)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ function Get-ONgDBSetting
[Parameter(Mandatory = $true,ValueFromPipeline = $true)]
[pscustomobject]$ONgDBServer

,[Parameter(Mandatory = $false)]
,[Parameter(Mandatory = $false)]
[string[]]$ConfigurationFile = $null

,[Parameter(Mandatory = $false)]
,[Parameter(Mandatory = $false)]
[string]$Name = ''
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function Invoke-ONgDBUtility
[Parameter(Mandatory = $false,ValueFromPipeline = $false,Position = 0)]
[string]$Command = ''

,[Parameter(Mandatory = $false,ValueFromRemainingArguments = $true)]
,[Parameter(Mandatory = $false,ValueFromRemainingArguments = $true)]
[object[]]$CommandArgs = @()
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ dbms.connector.https.enabled=true
# Enable this to specify a parser other than the default one.
#cypher.default_language_version=3.0

# Determines if Cypher will allow using file URLs when loading data using
# Determines if Geequel will allow using file URLs when loading data using
# `LOAD CSV`. Setting this value to `false` will cause ONgDB to fail `LOAD CSV`
# clauses that load data from the file system.
#dbms.security.allow_csv_import_from_file_urls=true
Expand Down Expand Up @@ -327,10 +327,10 @@ dbms.jvm.additional=-Djdk.tls.ephemeralDHKeySize=2048
dbms.jvm.additional=-Djdk.tls.rejectClientInitiatedRenegotiation=true

# This filter prevents deserialization of arbitrary objects via java object serialization, addressing potential vulnerabilities.
# By default this filter whitelists all neo4j classes, as well as classes from the hazelcast library and the java standard library.
# By default this filter whitelists all ongdb classes, as well as classes from the hazelcast library and the java standard library.
# These defaults should only be modified by expert users!
# For more details (including filter syntax) see: https://openjdk.java.net/jeps/290
#dbms.jvm.additional=-Djdk.serialFilter=java.**;org.neo4j.**;com.neo4j.**;com.hazelcast.**;net.sf.ehcache.Element;com.sun.proxy.*;org.openjdk.jmh.**;!*
#dbms.jvm.additional=-Djdk.serialFilter=java.**;org.neo4j.**;com.hazelcast.**;net.sf.ehcache.Element;com.sun.proxy.*;org.openjdk.jmh.**;!*

#********************************************************************
# Wrapper Windows NT/2000/XP Service Properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ look at the web interface ...

1. Open a console and navigate to the install directory.
2. Start the server:
* Windows, use: bin\ONgDB.bat
* Windows, use: bin\ongdb console
* Linux/Mac, use: ./bin/ongdb console
3. In a browser, open http://localhost:#{default.http.port}/
4. From any REST client or browser, open http://localhost:#{default.http.port}/db/data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ dbms.connector.https.enabled=true
# "foo", half the name "bar". The setting value must match exactly between
# members of the same cluster. This setting is a one-off: once an instance
# is configured with a database name it may not be changed in future without
# using `neo4j-admin unbind`.
# using `ongdb-admin unbind`.
#causal_clustering.database=default

# Address and port that this machine advertises that it's RAFT server is listening at. Should be a
Expand Down

0 comments on commit 0b53efa

Please sign in to comment.