Closed bmullan closed 3 years ago
@afeiszli
I think I found *part of the problem why I have a dev.yaml and no ENV.yaml. But in addition it seems like the user: and pass: below overwrite what I passed as my "user" and "pass" when I installed?
In the Netmaker repo:
https://raw.githubusercontent.com/gravitl/netmaker/v0.2/netmaker-server.sh
#!/bin/sh set -e
mkdir -p /etc/netmaker/config/environments wget -O /etc/netmaker/netmaker https://github.com/gravitl/netmaker/releases/download/latest/netmaker chmod +x /etc/netmaker/netmaker
cat >/etc/netmaker/config/environments/dev.yaml<<EOL server: host: apiport: "8081" grpcport: "50051" masterkey: "secretkey" allowedorigin: "*" restbackend: true
agentbackend: true defaultnetname: "default" defaultnetrange: "10.10.10.0/24" createdefault: true mongoconn: user: "mongoadmin" pass: "mongopass" host: "localhost" port: "27017" opts: '/?authSource=admin' EOLcat >/etc/systemd/system/netmaker.service<<EOL [Unit] Description=Netmaker Server After=network.target
[Service] Type=simple Restart=on-failure
WorkingDirectory=/etc/netmaker ExecStart=/etc/netmaker/netmaker
[Install] WantedBy=multi-user.target EOL systemctl daemon-reload systemctl start netmaker.service
Hi Brian, yes this is another mis-clarification in docs. It specifies "ENV.yaml" as a placeholder for whatever you're calling your env file. It could be dev.yaml or prod.yaml or something else. On startup, netmaker will look for an environment variable $APP_ENV.
If that value is not found, it will use "dev" by default and choose the dev.yaml file.
Based on your output, this does appear to be an authentication issue with mongo so the problem is likely the mongo user:pass.
@afeiszli re your comment
Based on your output, this does appear to be an authentication issue with mongo so the problem is likely the mongo user:pass.
You may have missed this in my previous post:
But in addition it seems like the user: and pass: below overwrite what
I passed as my "user" and "pass" when I installed?
In my command I was specifying both "user=admin" and "pass=admin"
but I found those were ignored/overwritten by the above script and was setting user=mongoadmin and pass=mongopass
I'm not sure why my user: and pass: were overwritten
Were user/pass overwritten on the server (config for connecting with mongo), or on mongo itself There's nothing written in Netmaker that can write a user/pass to mongodb.
Still following the Non-Docker installation.
Any idea what "might" be causing the error provided by - journalctl -u netmaker
I know the userID and password are correctly entered.
thanks
$ sudo journalctl -u netmaker
shows... (snippet)
MongoDB is listening on port 27017
$ sudo lsof -i -P -n | grep LISTEN
systemd-r 881 systemd-resolve 13u IPv4 34855 0t0 TCP 127.0.0.53:53 (LISTEN) cupsd 934 root 6u IPv6 37929 0t0 TCP [::1]:631 (LISTEN) cupsd 934 root 7u IPv4 37930 0t0 TCP 127.0.0.1:631 (LISTEN) mongod 1013 mongodb 11u IPv4 36746 0t0 TCP 127.0.0.1:27017 (LISTEN) sshd 1051 root 3u IPv4 35210 0t0 TCP :22 (LISTEN) sshd 1051 root 4u IPv6 35212 0t0 TCP :22 (LISTEN)