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

Issue when configuring storage option MySQL for NanoMDM #82

Closed
WolfsParadise5 opened this issue Sep 25, 2023 · 5 comments
Closed

Issue when configuring storage option MySQL for NanoMDM #82

WolfsParadise5 opened this issue Sep 25, 2023 · 5 comments

Comments

@WolfsParadise5
Copy link

WolfsParadise5 commented Sep 25, 2023

Following is an error occured on Ubuntu Server 22.04LTS and also on MacOS Ventura 13.2.1 with their respective os-specific versions of NanoMDM(both on amd64 platforms) while configuring runtime with an external SQL Server.

  • Command input: ./nanomdm-linux-amd64 -ca ../../CertificateChain/ca.pem -api api_key -storage mysql -storage-dsn user:password@tcp(db.ip.address:port)/mdm

Command output: -bash: syntax error near unexpected token ('`

Normal workarounds to this leads to the following error as follows:

  • Command input (Attmept 1): ./nanomdm-linux-amd64 -ca ../../CertificateChain/ca.pem -api api_key -storage mysql -storage-dsn "user:password@tcp(db.ip.address:port)/mdm"
  • Command input (Attempt 2):./nanomdm-linux-amd64 -ca ../../CertificateChain/ca.pem -api api_key -storage mysql -storage-dsn user:password@tcp\(db.ip.address:port\)/mdm

Command output: flag provided but not defined: -storage-dsn

@korylprince
Copy link

Enclosing in single quotes should work:

./nanomdm-linux-amd64 -ca ../../CertificateChain/ca.pem -api api_key -storage mysql -storage-dsn 'user:password@tcp(db.ip.address:port)/mdm'

Using single quotes passes the argument as-is.

@WolfsParadise5
Copy link
Author

WolfsParadise5 commented Sep 26, 2023

The utilisation of single quotes has resulted to the same error as before

Command Output : flag provided but not defined: -storage-dsn

I have also tested another way of input and the same issue arises

Command test Input : ./nanomdm-linux-amd64-v0.5.0/nanomdm-linux-amd64 -ca ../../CertificateChain/ca.pem -api api_key -storage mysql -storage-dsn='user:password@tcp(db.ip.address:port)/mdm'

Command Output : flag provided but not defined: -storage-dsn

@korylprince
Copy link

Eh, sorry, I misread the original error. The current tagged release (v0.5.0) still uses -dsn, not -storage-dsn. The flag was changed to -storage-dsn after v0.5.0.

@jessepeterson
Copy link
Member

Ah, good catch Kory. Yes, the flag name changed.

fwiw this is documented in the ops guide. perhaps we can make that more visible.

or I just need to get on top of a newer release. :)

@WolfsParadise5
Copy link
Author

WolfsParadise5 commented Oct 3, 2023

My apologies for the late reply but thanks for the clarification. Command works now on v0.5 with -dsn

To be frank would be preferable to make it clear in the example explaining the usage of mysql if a newer version is not out yet since it may get a little confusing :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants