Comments (3)
Update:
I might have been mistaken regarding the port exposition.
Using "netstat -tulpn", I can see there is something on 9090 in the container, when the Account Server is trying to communicate with Nats Cluster in loop.
But somehow it's unreachable (tried with telnet).
/ # netstat -tulpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 :::9090 :::* LISTEN 27/nats-account-ser
/ # telnet 0.0.0.0 9090
Connection closed by foreign host
Also I see these messages in the logs, so it suggest that the startHTTP method would have been called successfully right ?
2020/01/31 17:01:17.618484 [INF] http listening on port 9090
2020/01/31 17:01:17.618561 [INF] nats-account-server is running
2020/01/31 17:01:17.618607 [INF] configure the nats-server with:
2020/01/31 17:01:17.618675 [INF] resolver: URL(http://0.0.0.0:9090/jwt/v1/accounts/)
2020/01/31 17:01:22.618340 [INF] connecting to NATS for notifications
nats-account-server/server/core/server.go
Line 259 in 383d1a6
I'm not really sure anymore what's the real issue then. The port seems exposed but somehow the connection gets closed, the application doesn't reply. Maybe that's what makes the Nats Cluster resolver trigger an error.
from nats-account-server.
So it seems it's not really port related.
On nats-account-server container the port is exposed and I can curl the application:
/ # curl -i 0.0.0.0:9090/jwt/v1/accounts/
HTTP/1.1 200 OK
/ # netstat -tulpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 :::9090
SO it seems the nats-account-server is up and running
But when I try to reach it from another container, I can't
~ # ping nats-account-server
PING nats-account-server (172.20.25.95): 56 data bytes
^C
--- nats-account-server ping statistics ---
2 packets transmitted, 0 packets received, 100% packet loss
~ # curl nats-account-server:9090
curl: (7) Failed to connect to nats-account-server port 9090: Connection refused
I do have the "Kubernetes service" running
nats-account-server ClusterIP 172.20.25.95 <none> 9090/TCP 7m55s
I don't have issue with communication with any other containers on any ports.
It's only for the "incoming" request to the nats-account-server container.
Is there anything in the application that could prevent inbound request from outside the container ?
I mean, in the config I use "0.0.0.0" and on netstat we can see it's not attached to the loopback 127.0.0.1.
http {
host: "0.0.0.0",
port: 9090
}
Running out of ideas here, anyone have a hint ?
from nats-account-server.
Damn ! My service selector was using app = "nats-account-server" and my deployment had name = "nats-account-server"
app instead of name.
What a waste of time.
Sorry guys :)
from nats-account-server.
Related Issues (20)
- No Logs for when the account server connects to nats (only on reconnect)
- investigate adding pack support to nsc store
- Run nats-account-server as Windows Service HOT 1
- Are filesystem notifications required? HOT 1
- Algorithm Problem Activations
- `--primary` flag has no config file equivalent and it should.
- Host bind should default to 0.0.0.0
- Add --version flag
- Add `system_account` as in the NATS Server
- Add `operator` config as in the NATS Server
- Is `nats-io/jwt/v2` not supported with `nats-account-server` ? HOT 1
- panic: runtime error when revocation is done for a user
- nsc push results in 404 HOT 1
- some flags not working or missing
- Primary and replica
- staticcheck error S1017 HOT 1
- v1.0.0 release broken HOT 3
- Support for direct access of the nsc folder has been removed
- feature request - support db store for accounts HOT 2
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 nats-account-server.