Closed KissBalazs closed 2 years ago
In the logs, I can see the following in C:\greengrass\v2\logs~greengrass.log:
2022-08-03T11:54:49.086Z [INFO] (main) com.aws.greengrass.util.platforms.Platform: Getting platform instance com.aws.greengrass.util.platforms.windows.WindowsPlatform.. {}
2022-08-03T11:54:49.187Z [WARN] (Serialized listener processor) com.aws.greengrass.lifecyclemanager.KernelAlternatives: C:\greengrass\v2\alts\current. {}
2022-08-03T11:54:49.188Z [WARN] (Serialized listener processor) com.aws.greengrass.lifecyclemanager.KernelAlternatives: C:\greengrass\v2\alts\current. {}
2022-08-03T11:54:49.192Z [INFO] (main) com.aws.greengrass.lifecyclemanager.Kernel: No ongoing deployment detected. Proceed as default. {}
2022-08-03T11:54:49.252Z [INFO] (main) com.aws.greengrass.config.Configuration: config-loading. Read configuration from a file path. {path=C:\greengrass\v2\config\config.tlog}
2022-08-03T11:54:49.297Z [INFO] (main) com.aws.greengrass.lifecyclemanager.Kernel: effective-config-dump-complete. {file=C:\greengrass\v2\config\effectiveConfig.yaml}
2022-08-03T11:54:49.385Z [INFO] (main) com.aws.greengrass.deployment.DeviceConfiguration: Copy Nucleus artifacts to component store. {destination=C:\greengrass\v2\packages\artifacts-unarchived\aws.greengrass.Nucleus\2.7.0\aws.greengrass.nucleus, source=C:\Users\bk73027\Projects\GreengrassCore}
2022-08-03T11:54:49.460Z [ERROR] (main) com.aws.greengrass.deployment.DeviceConfiguration: Unable to set up Nucleus from build recipe file. {}
java.io.IOException: Failed to setup initial launch directory. Expecting loader script at: C:\greengrass\v2\alts\current\distro\bin\loader.cmd
at com.aws.greengrass.lifecyclemanager.KernelAlternatives.relinkInitLaunchDir(KernelAlternatives.java:206)
at com.aws.greengrass.deployment.DeviceConfiguration.initializeComponentStore(DeviceConfiguration.java:357)
at com.aws.greengrass.deployment.DeviceConfiguration.initializeNucleusFromRecipe(DeviceConfiguration.java:388)
at com.aws.greengrass.lifecyclemanager.Kernel.parseArgs(Kernel.java:645)
at com.aws.greengrass.easysetup.GreengrassSetup.performSetup(GreengrassSetup.java:296)
at com.aws.greengrass.easysetup.GreengrassSetup.main(GreengrassSetup.java:269)
2022-08-03T11:55:06.421Z [INFO] (main) com.aws.greengrass.lifecyclemanager.Kernel: effective-config-dump-complete. {file=C:\greengrass\v2\config\effectiveConfig.yaml}
2022-08-03T11:55:06.425Z [INFO] (main) com.aws.greengrass.lifecyclemanager.KernelLifecycle: Waiting for services to shutdown. {}
2022-08-03T11:55:06.431Z [WARN] (main) com.aws.greengrass.lifecyclemanager.KernelAlternatives: C:\greengrass\v2\alts\current. {}
2022-08-03T11:55:06.433Z [ERROR] (main) com.aws.greengrass.util.orchestration.WinswUtils: winsw-setup. Failed to set up Windows service. {}
java.nio.file.FileAlreadyExistsException: C:\greengrass\v2\alts\current
at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:87)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
at java.base/sun.nio.fs.WindowsFileSystemProvider.createSymbolicLink(WindowsFileSystemProvider.java:585)
at java.base/java.nio.file.Files.createSymbolicLink(Files.java:1059)
at com.aws.greengrass.lifecyclemanager.KernelAlternatives.setupLinkToDirectory(KernelAlternatives.java:345)
at com.aws.greengrass.lifecyclemanager.KernelAlternatives.setupInitLaunchDirIfAbsent(KernelAlternatives.java:178)
at com.aws.greengrass.util.orchestration.WinswUtils.setupSystemService(WinswUtils.java:38)
at com.aws.greengrass.easysetup.GreengrassSetup.performSetup(GreengrassSetup.java:328)
at com.aws.greengrass.easysetup.GreengrassSetup.main(GreengrassSetup.java:269)
2022-08-03T11:55:06.433Z [INFO] (main) com.aws.greengrass.lifecyclemanager.KernelLifecycle: system-shutdown. {main=null}
2022-08-03T11:55:06.443Z [INFO] (main) com.aws.greengrass.lifecyclemanager.Kernel: effective-config-dump-complete. {file=C:\greengrass\v2\config\effectiveConfig.yaml}
2022-08-03T11:55:06.444Z [INFO] (main) com.aws.greengrass.lifecyclemanager.KernelLifecycle: Waiting for services to shutdown. {}
2022-08-03T11:55:06.444Z [INFO] (Serialized listener processor) com.aws.greengrass.lifecyclemanager.KernelLifecycle: executor-service-shutdown-initiated. {}
2022-08-03T11:55:06.445Z [INFO] (main) com.aws.greengrass.lifecyclemanager.KernelLifecycle: Waiting for executors to shutdown. {}
2022-08-03T11:55:06.445Z [INFO] (main) com.aws.greengrass.lifecyclemanager.KernelLifecycle: executor-service-shutdown-complete. {executor-terminated=true, scheduled-executor-terminated=true}
2022-08-03T11:55:06.445Z [INFO] (main) com.aws.greengrass.lifecyclemanager.KernelLifecycle: context-shutdown-initiated. {}
2022-08-03T11:55:06.446Z [INFO] (main) com.aws.greengrass.lifecyclemanager.KernelLifecycle:
Following up the last comment, I have placed the script there:
C:\Users\bk73027\Projects> cat C:\greengrass\v2\alts\current\distro\bin\loader.cmd
@REM -------------------------------
@REM Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
@REM SPDX-License-Identifier: Apache-2.0
@REM -------------------------------
@echo off
SETLOCAL EnableDelayedExpansion
etc...
But it still writes the same error upon installing :(
Hello,
The error from the log you provided is that that installation directory is not empty. Please completely delete c:/greengrass then retry.
Thank you for the help. After deleting the folder, and starting everything again, it worked.
I think the problem might have been that I did not start the installation from my home folder, but from a different directory first.
Describe the bug I am trying to install AWS Greengrass on a (my own) windows machine, but it fails with the following output (after correctly configuring aws credentials and downloading the official packages).
To Reproduce
Expected behavior To successfully set up Nucleus.
Actual behavior This is the output I get:
Environment
Additional context This is a fresh install, on a new machine. I would like to run it on my local environment for testing.
I've tried to follow the troubleshooting guide but it seems outdated?
The service won't start so there is no instance of it:
And on the next step, I couldn't really understand what this is supposed to do :( :