wire-server-deploy icon indicating copy to clipboard operation
wire-server-deploy copied to clipboard

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

Open mfarhanmail opened this issue 1 year ago • 9 comments

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 avatar Jun 19 '23 04:06 mfarhanmail

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 avatar Jun 19 '23 08:06 mfarhanmail

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 avatar Jun 19 '23 08:06 mfarhanmail

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

Websocket connections are failing.

mfarhanmail avatar Jun 20 '23 08:06 mfarhanmail

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

Websocket connections are failing.

Hey @mfarhanmail :wave:

*.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. :smile:

supersven avatar Jun 20 '23 09:06 supersven

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.

mfarhanmail avatar Jun 20 '23 09:06 mfarhanmail

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.

supersven avatar Jun 20 '23 13:06 supersven

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

mfarhanmail avatar Jun 21 '23 03:06 mfarhanmail

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.

julialongtin avatar Jun 21 '23 10:06 julialongtin

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

mfarhanmail avatar Jun 21 '23 12:06 mfarhanmail