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

CacheAdapter cannot be used in the configuration file #8610

Closed
4 tasks done
beiguancyc opened this issue Jun 3, 2023 · 10 comments · Fixed by #8633
Closed
4 tasks done

CacheAdapter cannot be used in the configuration file #8610

beiguancyc opened this issue Jun 3, 2023 · 10 comments · Fixed by #8633
Labels
state:released Released as stable version state:released-alpha Released as alpha version state:released-beta Released as beta version type:bug Impaired feature or lacking behavior that is likely assumed

Comments

@beiguancyc
Copy link

beiguancyc commented Jun 3, 2023

New Issue Checklist

Issue Description

I prefer to configure Parse Server using a configuration file. In Parse Server 5.x, I used the following code to configure the cacheAdapter, but now in 6.x, I keep getting the error "The client is closed at Commander._RedisClient_sendCommand."
"cacheAdapter":{ "module":"C:/Users/Administrator/AppData/Roaming/npm/node_modules/parse-server/lib/Adapters/Cache/RedisCacheAdapter", "options":{ "url":"redis://127.0.0.1:6379/1" } }

@parse-github-assistant
Copy link

parse-github-assistant bot commented Jun 3, 2023

Thanks for opening this issue!

  • 🚀 You can help us to fix this issue faster by opening a pull request with a failing test. See our Contribution Guide for how to make a pull request, or read our New Contributor's Guide if this is your first time contributing.

@mtrezza
Copy link
Member

mtrezza commented Jun 3, 2023

Please provide the exact Parse Server version you are using; and possibly the earliest Parse Server version where you started to encounter the issue if you already did that investigation.

@mtrezza mtrezza added the type:bug Impaired feature or lacking behavior that is likely assumed label Jun 3, 2023
@beiguancyc
Copy link
Author

beiguancyc commented Jun 3, 2023

Please provide the exact Parse Server version you are using; and possibly the earliest Parse Server version where you started to encounter the issue if you already did that investigation.

I have tried every official release of Parse Server before version 5.5.0, and it worked without any issues. However, starting from version 6.1.0 and onwards, I encounter an error. The error message is "The client is closed at Commander._RedisClient_sendCommand."
And this is my config file.

{
  "appId" : "aaa",
  "masterKey" : "aaa",
  "dotNetKey" : "aaa",
  "clientKey" : "aaa",
  "restAPIKey" : "aaa",
  "javascriptKey" : "aaa",
  "databaseURI" : "mongodb://aaa",
  "publicServerURL" : "https://aaa",
  "port" : "1111",
  "mountPath" : "/",
  "cloud" : "c:/aaa/cloud/main.js",
  "jsonLogs" : true,
  "mountGraphQL" : true,
  "logsFolder" : "c:/aaa/log/logsParse",
  "maxLogFiles" : "20",
  "maxUploadSize" : "2000mb",
  "allowClientClassCreation":false,
  "cacheAdapter":{
    "module":"C:/Users/Administrator/AppData/Roaming/npm/node_modules/parse-server/lib/Adapters/Cache/RedisCacheAdapter",
    "options":{
	  "url":"redis://127.0.0.1:6379/1"
	}
  }
}

@dblythy
Copy link
Member

dblythy commented Jun 11, 2023

How are you starting Parse Server? cacheAdapter?.connect is called in api.start() (a new method in V6)

@beiguancyc
Copy link
Author

beiguancyc commented Jun 11, 2023

How are you starting Parse Server? cacheAdapter?.connect is called in api.start() (a new method in V6)

I saved the above configuration as config.json file and then executed the command parse-server config.json in the cmd. It works fine in version 5.x, but in version 6.x, it throws an error in the logs.
image

@dblythy
Copy link
Member

dblythy commented Jun 11, 2023

Confirming I have replicated the issue and waiting to hear whether #8633 resolves the issue

@beiguancyc
Copy link
Author

Confirming I have replicated the issue and waiting to hear whether #8633 resolves the issue

After several days of testing, no errors have occurred again.

@mtrezza mtrezza closed this as completed Mar 15, 2024
@mtrezza mtrezza reopened this Mar 15, 2024
@mtrezza mtrezza changed the title CacheAdapter cannot be used in the configuration file in Parse Server 6.x CacheAdapter cannot be used in the configuration file Mar 15, 2024
@mtrezza mtrezza pinned this issue Mar 15, 2024
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 7.0.0-alpha.27

@parseplatformorg parseplatformorg added the state:released-alpha Released as alpha version label Mar 15, 2024
@mtrezza mtrezza unpinned this issue Mar 16, 2024
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 7.0.0-beta.1

@parseplatformorg parseplatformorg added the state:released-beta Released as beta version label Mar 19, 2024
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 7.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state:released Released as stable version state:released-alpha Released as alpha version state:released-beta Released as beta version type:bug Impaired feature or lacking behavior that is likely assumed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants