stopping the nats-server where the account-server is performing notifications, stops the JWT store
aricart opened this issue · 1 comments
aricart commented
nsc create operator -n X
nsc create account -n A
nsc create account -n SYS
nsc create user -n sys
Create a nats-account-server config nas.conf:
systemaccountjwtpath: "/users/synadia/.nsc/nats/X/accounts/SYS/SYS.jwt"
http {
port: 9090
},
store {
dir: "/tmp/as_store",
readonly: false,
shard: true
}
nats {
servers: [nats://localhost:4222]
usercredentials: "/Users/synadia/.nkeys/X/accounts/SYS/users/sys.creds"
}
Create a nats-server config server.conf:
operator: /users/synadia/.nsc/nats/X/X.jwt
resolver: URL(http://localhost:9090/jwt/v1/accounts/)
system_account: AAUR7CJU5WTR2RROXOJJFTJFJQPZ6B4VF2NOX6OQ6SQMPIKLQYQ7T37U
Start the various processes
> nats-account-server -c nas.conf
> nats-server -c server.conf
Use nsc to seed the account server
nsc push -A
<ctrl+z> the nats-server
The nats-account-server disconnects:
2019/05/31 16:37:28.631941 [WRN] nats disconnected
2019/05/31 16:37:28.632019 [ERR] nats connection closed, shutting down bridge
2019/05/31 16:37:28.632029 [INF] stopping account server
2019/05/31 16:37:28.632032 [INF] disconnected from NATS
2019/05/31 16:37:28.632035 [INF] stopping http server
2019/05/31 16:37:28.632090 [INF] http server stopped
2019/05/31 16:37:28.632100 [INF] http stopped
2019/05/31 16:37:28.632105 [INF] closed JWT store
aricart commented
If you set maxreconnects
it stays on. The main issue is without that the process stays on (goroutines are prob running) and the systemd doesn't get a chance to restart the server.