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

Nginz Pod Error while installing demo wire-server through wire-server-deploy #619

Open
mfarhanmail opened this issue Jun 19, 2023 · 9 comments

Comments

@mfarhanmail
Copy link

mfarhanmail commented Jun 19, 2023

Basic information

  • On-premises: yes
  • Cloud-Provider:AWS, GCP, none, etc.
  • Installation type: demo
  • Kubernetes version: <!-- version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.7", GitCommit:"1dd5338295409edcfff11505e7bb246f0d325d15", GitTreeState:"clean", BuildDate:"2021-01-13T13:23:52Z", GoVersion:"go1.15.5", Compiler:"gc", Platform:"linux/amd64"}'
  • Helm version: version.BuildInfo{Version:"v3.8.1", GitCommit:"5cb9af4b1b271d11d7a97a71df3ac337dd94ad37", GitTreeState:"", GoVersion:"go1.17.7"}
  • Installed with Kubespray: yes
  • (Helm) Charts version: 4.35.0'
  • List of installed top-level charts: database-ephemeral, demo-smtp
  • Other related technologies + version: Ansible, Helm, Terraform

What is the expected result?

nginz pod failing and crashing, in logs i have these things

kubectl logs nginz-cfd66dff6-hjccg
error: a container name must be specified for pod nginz-cfd66dff6-hjccg, choose one of: [nginz-disco nginz]

kubectl logs nginz-cfd66dff6-hjccg --all-containers
Starting nginx
Setting up watches for /etc/wire/nginz/upstreams
nginx PID: 7
Setting up watches.
Watches established.
nginx: [emerg] failed to load keystore [1] in /etc/wire/nginz/conf/nginx.conf:183
/nix/store/b6v3ffbwxi028wdhhrxdmg4ywfj6yngs-reload-script/bin/.nginz_reload.sh-wrapped: line 12: kill: (7) - No such process
Files /etc/wire/nginz/upstreams/upstreams.conf and /etc/wire/nginz/upstreams/upstreams.conf.new differ
upstream change found, replacing /etc/wire/nginz/upstreams/upstreams.conf with /etc/wire/nginz/upstreams/upstreams.conf.new
done, sleeping 2.841718
.
.
.

Setting up watches for /etc/wire/nginz/upstreams
Starting nginx
nginx PID: 7
Setting up watches.
Watches established.
nginx: [emerg] failed to load keystore [1] in /etc/wire/nginz/conf/nginx.conf:183
/nix/store/b6v3ffbwxi028wdhhrxdmg4ywfj6yngs-reload-script/bin/.nginz_reload.sh-wrapped: line 12: kill: (7) - No such process

What is the actual result?

How to reproduce the issue?

@mfarhanmail mfarhanmail changed the title Bug: [BUG TITLE] Nginz Pod Error while installing demo wire-server through wire-server-deploy Jun 19, 2023
@mfarhanmail
Copy link
Author

mfarhanmail commented Jun 19, 2023

When i bash into nginz container i dont see folder /etc/wire/nginz/secrets/zauth.conf, for this reason nginz pod is failing as its not able to find the keystore file. Am i missing any step for demo installation which is causing this issue to happen?

@mfarhanmail
Copy link
Author

Okay now i got this nginz pod to running status. The thing which i tried was to copy zauth.text files public and private keys to brig and nginz section of secrets.yaml file. Then i did helm uninstall wire-server && install wire-server, it got to work. Also i bashed into nginz container to verify and saw it now has those folders and files /etc/wire/nginz/secrets/.

Maybe as docs are changing this step might have got retired.

@mfarhanmail
Copy link
Author

Request URL: https://nginz-https.example.com/v3/properties/webapp
Request Method: GET
Status Code: 404

Websocket connections are failing.

@supersven
Copy link
Contributor

Request URL: https://nginz-https.example.com/v3/properties/webapp Request Method: GET Status Code: 404

Websocket connections are failing.

Hey @mfarhanmail 👋

*.example.com looks like a default value that surely does not fit to your setup. You may want to exchange all occurrences of example.com with your domain. 😄

@mfarhanmail
Copy link
Author

mfarhanmail commented Jun 20, 2023

OK i dint had domains, as of now i have setup DNS record in my local machine in /etc/hosts/ to point to server where wire-server is deployed, so i was able to create and validate user but got stuck in a page where i only see "checking for new messages".

I see other API calls are just working fine, example
Request URL: https://nginz-https.example.com/v3/self
Request Method: GET
Status Code: 200

Request URL: https://nginz-https.example.com/v3/clients/63d004dfd75c4c8d/prekeys
Request Method: GET
Status Code: 200

You mean other features will require correct domain in setup to work? @supersven
Thanks for your guidance.

@supersven
Copy link
Contributor

Ah, I see. You may get away with fake domains as long as you stay consistent. However, this is not officially supported. And, you may need to solve HTTPS/SSL certificate issues. (Please, don't do this for a production environment.)

The next debugging step would likely be the open the webapp (likely https://webapp.example.com) and see which requests are failing.

@mfarhanmail
Copy link
Author

mfarhanmail commented Jun 21, 2023

Request URL: https://nginz-https.example.com/v3/properties/webapp
Request Method: GET
Status Code: 404

Request URL: https://nginz-https.example.com/v3/properties/WIRE_RECEIPT_MODE
Request Method: GET
Status Code: 404

Request URL: https://nginz-https.example.com/v3/properties/WIRE_TYPING_INDICATOR_MODE
Request Method: GET
Status Code: 404

Websocket:
An SSL certificate error occurred when fetching the script.

reconnecting-websocket-mjs.js:518 WebSocket connection to 'wss://nginz-ssl.example.com/await?access_token=0fIw2u2Ewm-C5RgV9o30lCs4o1TpAXAEaBtor2DqSL4SkKnXLvfz3kaWqCw9hBf81XvzvSsa21lemPBC_rZFDg==.v=1.k=1.d=1687319583.t=a.l=.u=0e1a7141-4a46-4201-abf4-324a25cab575.i=63d004dfd75c4c8d.c=13529975733778401668&client=63d004dfd75c4c8d' failed:

Rest of the api's are working fine with 200 status code in the page where still "Checking for new messages" progress is shown.

@supersven

@julialongtin
Copy link
Contributor

what have you done for certificates? if you're doing the "just hit the trust button" method, you need to go to nginz-ssl.example.com manually in a web browser, and hit trust there.

@mfarhanmail
Copy link
Author

Thank you it worked amazingly. Now ill get away with fake certificates.

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