Comments (14)
You should be able to swop the backslashes for forward slashes and it should work, i think
from natscli.
Yes it works if I edit the context.
So is the fault with nsc
that created the context or natscli
where it is used?
The context is technically correct since windows use backslash but where would you like the issue fixed?
from natscli.
Can you paste your context file please? C:\Users\<redacted username>\.config\nats\context\ngsleafnode.json
from natscli.
I have traced the issue to somewhere in the parse
func in nats-server/conf/parse.go
The context looks like this...
# Friendly description for this context shown when listing contexts
description: synadia (Synadia Communications Inc.)
# A comma separated list of NATS Servers to connect to
url: tls://connect.ngs.global
# Connect using a specific username, requires password to be set
user: ""
password: ""
# Connect using a NATS Credentials stored in a file
creds: C:\Users\<redacted username>\.local\share\nats\nsc\keys\creds\synadia\<redacted account>\default.creds
# Connect using a NKey derived from a seedfile
nkey: ""
# Configures a token to pass in the connection
token: ""
# Sets a x509 certificate to use, both cert and key should be set
cert: ""
key: ""
# Sets an optional x509 trust chain to use
ca: ""
# Retrieves connection information from 'nsc'
#
# Example: nsc://Acme+Inc/HR/Automation
nsc: ""
# Use a custom inbox prefix
#
# Example : _INBOX.private.userid
inbox_prefix: ""
# Sets a color scheme to use for the nats command line tool
# this will influence table color choices allowing different
# contexts to be visually distinguished.
#
# Valid values are:
#
# rounded
# double
# yellow
# blue
# cyan
# green
# magenta
# red
#
# When not set "rounded" is used
color_scheme: ""
# Connects to a specific JetStream domain
jetstream_domain: ""
# Subject used as a prefix when accessing the JetStream API if imported from another account
jetstream_api_prefix: ""
# Subject prefix used to access JetStream events if imported from another account
jetstream_event_prefix: ""
# Use a Socks5 proxy like ssh to connect to the NATS server URLS
#
# Example: socks5://example.net:1090
socks_proxy: ""
from natscli.
In json
{
"ca": "",
"cert": "",
"color_scheme": "",
"creds": "C:\\Users\\<redacted user>\\.local\\share\\nats\\nsc\\keys\\creds\\synadia\\<redacted account>\\default.creds",
"description": "synadia (Synadia Communications Inc.)",
"inbox_prefix": "",
"jetstream_api_prefix": "",
"jetstream_domain": "",
"jetstream_event_prefix": "",
"key": "",
"nkey": "",
"nsc": "",
"password": "",
"socks_proxy": "",
"token": "",
"url": "tls://connect.ngs.global",
"user": ""
}
from natscli.
The temporary server config created looks like
listen: 0.0.0.0:27260
server_name: nats_development
debug: false
trace: false
system_account: SYSTEM
logtime: false
jetstream {
store_dir: C:\\Users\\<redacted user>\\.local\\share\\nats\\nats_development
domain: NATS_DEVELOPMENT
}
accounts {
USER: {
jetstream: enabled
users: [
{
user: "local",
password: "<redacted hash>"
}
]
imports: [
{service: {account: SERVICE, subject: "service.>"}, to: "imports.SERVICE.>"}
]
}
SERVICE: {
jetstream: enabled
users: [
{
user: "service",
password: "<redacted hash>"
}
]
exports: [
{service: service.>}
]
}
SYSTEM: {
users: [{"user": "system", "password": "<redacted hash>"}],
}
}
leafnodes {
remotes = [
{
url: "tls://connect.ngs.global",
credentials: "C:\Users\<redacted user>\.local\share\nats\nsc\keys\creds\synadia\<redacted account>\default.creds",
account: "USER"
}
]
}
from natscli.
Looks as the remote credentials path doesn't get correctly escaped before the config template is processed.
from natscli.
OK - I am a bit surprised the docs led a NGS user down the path of nats server run
as its a very experimental feature.
But yes, seems if we escape these strings when writing the server config probably it will work
from natscli.
The output from your call to shellescape is the same as the input, so no effect.
from natscli.
The problem is we add yours then anyone who had already fixed this up will break...but anyway server run is not supported part of the cli (even hidden in --help) so will take your fix ontop of mine.
from natscli.
OK try main again, I should have just taken yours sorry about that.
from natscli.
Commit bcc57a2 now works, great, thanks..... but.
How about implementing the same method for StoreDir and remove the previous workaround ( about line 261-264 ).
Also add quotes to the StorDir in the template so that paths with spaces might work.
(see my PR for reference)
from natscli.
OK, I will have to get to this another day unfortunately - unless you want to update your PR or send a new one
from natscli.
I can make a new one. No worries
from natscli.
Related Issues (20)
- nats str edit cannot update Subject Transform HOT 2
- A bug that was filed in nats.go HOT 2
- If user is set then token is not transmitted HOT 2
- Displayed ObjectStore digest is truncated HOT 1
- Not recognizing difference in stream configuration for sources HOT 1
- Support wildcard for KV get HOT 11
- Broken nats-cli arm64 binary HOT 3
- Stream info shows first and last timestamps incorrectly HOT 2
- Enable inactive-threshold flag while editing consumer HOT 2
- Can't create pull consumer from cli HOT 10
- Add a JWT decoder
- `micro list` timeout when micro service process paused via debugger HOT 4
- Subscribing to JetStream Stream on a 3 node cluster with a single offline node fails 1 in 3 times HOT 10
- nats: error: user: unknown userid 929600006 HOT 1
- nats sub --stream does not respect the --js-domain flag HOT 7
- Max Message Size accepts too large a value HOT 2
- Add stream ingest rate sampling
- Clean up consumer code
- corrupt images when headers data is included HOT 4
- Consumer pause/resume commands fail after selecting stream/consumer
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from natscli.