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

Garnet WithPersistence Failed To Start #4870

Closed
1 task done
Alirexaa opened this issue Jul 12, 2024 · 2 comments · Fixed by #5087
Closed
1 task done

Garnet WithPersistence Failed To Start #4870

Alirexaa opened this issue Jul 12, 2024 · 2 comments · Fixed by #5087
Labels
area-integrations Issues pertaining to Aspire Integrations packages

Comments

@Alirexaa
Copy link
Contributor

Alirexaa commented Jul 12, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

While I try to extract the test project for garnet from Aspire.Hosting.Tests to the new test project Aspire.Hosting.Garnet.Tests according to #4294, running Garnet Container using WithPersistence failed.

Expected Behavior

The container starts without any errors.

Steps To Reproduce

Just add GarnetResource using WithPersistence

var builder = DistributedApplication.CreateBuilder(args);

var garnet = builder.AddGarnet("garnet")
    .WithPersistence();

builder.Build().Run();

Exceptions (if any)

No response

.NET Version info

.NET SDK:
Version: 8.0.303
Commit: 29ab8e3268
Workload version: 8.0.300-manifests.280f8661
MSBuild version: 17.10.4+10fbfbf2e

Runtime Environment:
OS Name: Windows
OS Version: 10.0.19045
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\8.0.303\

.NET workloads installed:
[android]
Installation Source: SDK 8.0.300, VS 17.10.34916.146
Manifest Version: 34.0.95/8.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.android\34.0.95\WorkloadManifest.json
Install Type: FileBased

[aspire]
Installation Source: SDK 8.0.300, VS 17.10.34916.146
Manifest Version: 8.0.1/8.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.aspire\8.0.1\WorkloadManifest.json
Install Type: FileBased

[ios]
Installation Source: SDK 8.0.300, VS 17.10.34916.146
Manifest Version: 17.2.8053/8.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.ios\17.2.8053\WorkloadManifest.json
Install Type: FileBased

[maccatalyst]
Installation Source: SDK 8.0.300, VS 17.10.34916.146
Manifest Version: 17.2.8053/8.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.maccatalyst\17.2.8053\WorkloadManifest.json
Install Type: FileBased

[maui-windows]
Installation Source: SDK 8.0.300, VS 17.10.34916.146
Manifest Version: 8.0.21/8.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.maui\8.0.21\WorkloadManifest.json
Install Type: FileBased

Host:
Version: 8.0.7
Architecture: x64
Commit: 2aade6beb0

.NET SDKs installed:
8.0.300 [C:\Program Files\dotnet\sdk]
8.0.303 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.19 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.30 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.19 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.30 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.19 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.7 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables:
Not set

global.json file:
Not found

Anything else?

Container Logs:

GarnetServer

Copyright (c) Microsoft Corporation

ERROR(S):

Option 'save' is unknown.

Encountered error(s) while parsing command line arguments.

For detailed usage information run with --help.

09::55::17 info: ArgParser[0] Configuration import from embedded resource succeeded. Path: defaults.conf.

Unable to initialize server due to exception: Encountered an error when initializing Garnet server. Please see log messages above for more details.

@eerhardt eerhardt added area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication and removed area-acquisition labels Jul 16, 2024
@CRidge
Copy link

CRidge commented Jul 26, 2024

I get the same behavior and error when using WithDataBindMount. Without using WithDataBindMount it works fine.

@vladislav-karamfilov
Copy link

vladislav-karamfilov commented Sep 2, 2024

A workaround that worked for me until the linked PR is merged and released:

var cache = builder
    .AddGarnet("cache")
    // TODO: .WithDataVolume("cache-data") // lines below are a workaround for https://github.com/dotnet/aspire/issues/4870
    .WithVolume("cache-data", "/data")
    .WithArgs("--checkpointdir", "/data/checkpoints", "--recover", "--aof", "--aof-commit-freq", "60000");

@davidfowl davidfowl added area-integrations Issues pertaining to Aspire Integrations packages bug and removed area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication labels Sep 7, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Oct 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-integrations Issues pertaining to Aspire Integrations packages
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants