replace nebula.exe -service install with New-Service
nebula's built-in Go service manager (-service install) is unreliable on Windows — it reports "service already exists" when the SCM, registry, and Get-Service all confirm no service is present. Use PowerShell's New-Service cmdlet instead, which talks directly to the Windows SCM.
This commit is contained in:
parent
881664345e
commit
4cee8a0a35
@ -137,7 +137,7 @@ Get-WinEvent -FilterHashtable @{LogName='Application'; ProviderName='nebula'} -M
|
||||
|
||||
Common causes:
|
||||
- **"found unknown escape character"** — Backslashes in `config.yml` paths. YAML interprets `\` as escape characters inside double quotes. Use forward slashes (`C:/Program Files/Nebula/ca.crt`).
|
||||
- **"no config files found"** — The service was installed without `-config`. Reinstall using `install-nebula.ps1`.
|
||||
- **"no config files found"** — The service binary path is missing the `-config` argument. Reinstall using `install-nebula.ps1`.
|
||||
|
||||
### Handshake timeouts after reboot
|
||||
Nebula started before the physical network was ready. Verify the service is configured with auto start and NLA dependency:
|
||||
|
||||
@ -209,9 +209,10 @@ if (-not (Test-Path (Join-Path $InstallDir "dist"))) {
|
||||
# --- Install and configure service ---
|
||||
|
||||
Write-Host "Installing Nebula service..."
|
||||
& "$InstallDir\nebula.exe" -service install -config "$ConfigPath"
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Error "Failed to install Nebula service."
|
||||
try {
|
||||
New-Service -Name "nebula" -BinaryPathName $ExpectedBinPath -StartupType Automatic -Description "Nebula Network Service" -ErrorAction Stop | Out-Null
|
||||
} catch {
|
||||
Write-Error "Failed to install Nebula service: $_"
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user