As other colleagues here, I'm trying to reproduce the instructions shared on the excellent document here: https://github.com/jengelh/g-manual/blob/master/index.rst
My goal is to install Grommunio on a Debian 11 appliance, in a Proxmox LXC.
All the steps went quite easily but there is one which took all my day on searching why it was not working.
It seems that grommunio-admin-api doesn't work. I guess it's related to a uWSGI dependency but I compared my setup with the OpenSuse installation made via the ISO install and I don't find a difference.
`Apr 27 19:49:28 mail2 uwsgi[1057]: [uWSGI] getting INI configuration from /usr/share/grommunio-admin-api/api-config.ini
Apr 27 19:49:28 mail2 uwsgi[1057]: *** Starting uWSGI 2.0.19.1-debian (64bit) on [Wed Apr 27 19:49:28 2022] ***
Apr 27 19:49:28 mail2 uwsgi[1057]: compiled with version: 10.2.1 20210110 on 11 June 2021 09:08:33
Apr 27 19:49:28 mail2 uwsgi[1057]: os: Linux-5.13.19-3-pve #1 SMP PVE 5.13.19-6 (Tue, 11 Jan 2022 16:44:47 +0100)
Apr 27 19:49:28 mail2 uwsgi[1057]: nodename: mail2
Apr 27 19:49:28 mail2 uwsgi[1057]: machine: x86_64
Apr 27 19:49:28 mail2 uwsgi[1057]: clock source: unix
Apr 27 19:49:28 mail2 uwsgi[1057]: pcre jit disabled
Apr 27 19:49:28 mail2 uwsgi[1057]: detected number of CPU cores: 2
Apr 27 19:49:28 mail2 uwsgi[1057]: current working directory: /usr/share/grommunio-admin-api
Apr 27 19:49:28 mail2 uwsgi[1057]: detected binary path: /usr/bin/uwsgi-core
Apr 27 19:49:28 mail2 uwsgi[1057]: chdir() to /usr/share/grommunio-admin-api
Apr 27 19:49:28 mail2 uwsgi[1057]: your processes number limit is 127769
Apr 27 19:49:28 mail2 uwsgi[1057]: your memory page size is 4096 bytes
Apr 27 19:49:28 mail2 uwsgi[1057]: detected max file descriptor number: 1024
Apr 27 19:49:28 mail2 uwsgi[1057]: lock engine: pthread robust mutexes
Apr 27 19:49:28 mail2 uwsgi[1057]: thunder lock: disabled (you can enable it with --thunder-lock)
Apr 27 19:49:28 mail2 uwsgi[1057]: - SystemD socket activation detected -
Apr 27 19:49:28 mail2 uwsgi[1057]: uwsgi socket 1 attached to UNIX address /run/grommunio/admin-api.socket fd 3
Apr 27 19:49:28 mail2 uwsgi[1057]: Python version: 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110]
Apr 27 19:49:28 mail2 uwsgi[1057]: Python main interpreter initialized at 0x561c1b10a850
Apr 27 19:49:28 mail2 uwsgi[1057]: python threads support enabled
Apr 27 19:49:28 mail2 uwsgi[1057]: your server socket listen backlog is limited to 100 connections
Apr 27 19:49:28 mail2 uwsgi[1057]: your mercy for graceful operations on workers is 60 seconds
Apr 27 19:49:28 mail2 uwsgi[1057]: mapped 208704 bytes (203 KB) for 4 cores
Apr 27 19:49:28 mail2 uwsgi[1057]: *** Operational MODE: threaded ***
Apr 27 19:49:29 mail2 uwsgi[1057]: Traceback (most recent call last):
Apr 27 19:49:29 mail2 uwsgi[1057]: File "./api/init.py", line 17, in _loadOpenApiSpec
Apr 27 19:49:29 mail2 uwsgi[1057]: with open("res/openapi.json", "r") as file:
Apr 27 19:49:29 mail2 uwsgi[1057]: FileNotFoundError: [Errno 2] No such file or directory: 'res/openapi.json'
Apr 27 19:49:29 mail2 uwsgi[1057]: During handling of the above exception, another exception occurred:
Apr 27 19:49:29 mail2 uwsgi[1057]: Traceback (most recent call last):
Apr 27 19:49:29 mail2 uwsgi[1057]: File "/usr/lib/python3/dist-packages/yaml/reader.py", line 89, in peek
Apr 27 19:49:29 mail2 uwsgi[1057]: return self.buffer[self.pointer+index]
Apr 27 19:49:29 mail2 uwsgi[1057]: IndexError: string index out of range
Apr 27 19:49:29 mail2 uwsgi[1057]: During handling of the above exception, another exception occurred:
Apr 27 19:49:29 mail2 uwsgi[1057]: Traceback (most recent call last):
Apr 27 19:49:29 mail2 uwsgi[1057]: File "./main.py", line 20, in <module>
Apr 27 19:49:29 mail2 uwsgi[1057]: from api.core import API # Export to uwsgi server
Apr 27 19:49:29 mail2 uwsgi[1057]: File "./api/init.py", line 26, in <module>
Apr 27 19:49:29 mail2 uwsgi[1057]: _loadOpenApiSpec()
Apr 27 19:49:29 mail2 uwsgi[1057]: File "./api/init.py", line 22, in _loadOpenApiSpec
Apr 27 19:49:29 mail2 uwsgi[1057]: apiSpec = yaml.load(file, Loader=yaml.SafeLoader)
Apr 27 19:49:29 mail2 uwsgi[1057]: File "/usr/lib/python3/dist-packages/yaml/init.py", line 114, in load
Apr 27 19:49:29 mail2 uwsgi[1057]: return loader.get_single_data()
Apr 27 19:49:29 mail2 uwsgi[1057]: File "/usr/lib/python3/dist-packages/yaml/constructor.py", line 49, in get_single_data
Apr 27 19:49:29 mail2 uwsgi[1057]: node = self.get_single_node()
Apr 27 19:49:29 mail2 uwsgi[1057]: File "/usr/lib/python3/dist-packages/yaml/composer.py", line 36, in get_single_node
Apr 27 19:49:29 mail2 uwsgi[1057]: document = self.compose_document()
Apr 27 19:49:29 mail2 uwsgi[1057]: File "/usr/lib/python3/dist-packages/yaml/composer.py", line 55, in compose_document
Apr 27 19:49:29 mail2 uwsgi[1057]: node = self.compose_node(None, None)
Apr 27 19:49:29 mail2 uwsgi[1057]: File "/usr/lib/python3/dist-packages/yaml/composer.py", line 84, in compose_node
Apr 27 19:49:29 mail2 uwsgi[1057]: node = self.compose_mapping_node(anchor)
Apr 27 19:49:29 mail2 uwsgi[1057]: File "/usr/lib/python3/dist-packages/yaml/composer.py", line 133, in compose_mapping_node
Apr 27 19:49:29 mail2 uwsgi[1057]: item_value = self.compose_node(node, item_key)
Apr 27 19:49:29 mail2 uwsgi[1057]: File "/usr/lib/python3/dist-packages/yaml/composer.py", line 84, in compose_node
Apr 27 19:49:29 mail2 uwsgi[1057]: node = self.compose_mapping_node(anchor)
Apr 27 19:49:29 mail2 uwsgi[1057]: File "/usr/lib/python3/dist-packages/yaml/composer.py", line 133, in compose_mapping_node
Apr 27 19:49:29 mail2 uwsgi[1057]: item_value = self.compose_node(node, item_key)
Apr 27 19:49:29 mail2 uwsgi[1057]: File "/usr/lib/python3/dist-packages/yaml/composer.py", line 84, in compose_node
Apr 27 19:49:29 mail2 uwsgi[1057]: node = self.compose_mapping_node(anchor)
Apr 27 19:49:29 mail2 uwsgi[1057]: File "/usr/lib/python3/dist-packages/yaml/composer.py", line 133, in compose_mapping_node
Apr 27 19:49:29 mail2 uwsgi[1057]: item_value = self.compose_node(node, item_key)
Apr 27 19:49:29 mail2 uwsgi[1057]: File "/usr/lib/python3/dist-packages/yaml/composer.py", line 84, in compose_node
Apr 27 19:49:29 mail2 uwsgi[1057]: node = self.compose_mapping_node(anchor)
Apr 27 19:49:29 mail2 uwsgi[1057]: File "/usr/lib/python3/dist-packages/yaml/composer.py", line 133, in compose_mapping_node
Apr 27 19:49:29 mail2 uwsgi[1057]: item_value = self.compose_node(node, item_key)
Apr 27 19:49:29 mail2 uwsgi[1057]: File "/usr/lib/python3/dist-packages/yaml/composer.py", line 84, in compose_node
Apr 27 19:49:29 mail2 uwsgi[1057]: node = self.compose_mapping_node(anchor)
Apr 27 19:49:29 mail2 uwsgi[1057]: File "/usr/lib/python3/dist-packages/yaml/composer.py", line 133, in compose_mapping_node
Apr 27 19:49:29 mail2 uwsgi[1057]: item_value = self.compose_node(node, item_key)
Apr 27 19:49:29 mail2 uwsgi[1057]: File "/usr/lib/python3/dist-packages/yaml/composer.py", line 84, in compose_node
Apr 27 19:49:29 mail2 uwsgi[1057]: node = self.compose_mapping_node(anchor)
Apr 27 19:49:29 mail2 uwsgi[1057]: File "/usr/lib/python3/dist-packages/yaml/composer.py", line 133, in compose_mapping_node
Apr 27 19:49:29 mail2 uwsgi[1057]: item_value = self.compose_node(node, item_key)
Apr 27 19:49:29 mail2 uwsgi[1057]: File "/usr/lib/python3/dist-packages/yaml/composer.py", line 64, in compose_node
Apr 27 19:49:29 mail2 uwsgi[1057]: if self.check_event(AliasEvent):
Apr 27 19:49:29 mail2 uwsgi[1057]: File "/usr/lib/python3/dist-packages/yaml/parser.py", line 98, in check_event
Apr 27 19:49:29 mail2 uwsgi[1057]: self.current_event = self.state()
Apr 27 19:49:29 mail2 uwsgi[1057]: File "/usr/lib/python3/dist-packages/yaml/parser.py", line 449, in parse_block_mapping_value
Apr 27 19:49:29 mail2 uwsgi[1057]: if not self.check_token(KeyToken, ValueToken, BlockEndToken):
Apr 27 19:49:29 mail2 uwsgi[1057]: File "/usr/lib/python3/dist-packages/yaml/scanner.py", line 116, in check_token
Apr 27 19:49:29 mail2 uwsgi[1057]: self.fetch_more_tokens()
Apr 27 19:49:29 mail2 uwsgi[1057]: File "/usr/lib/python3/dist-packages/yaml/scanner.py", line 255, in fetch_more_tokens
Apr 27 19:49:29 mail2 uwsgi[1057]: return self.fetch_plain()
Apr 27 19:49:29 mail2 uwsgi[1057]: File "/usr/lib/python3/dist-packages/yaml/scanner.py", line 679, in fetch_plain
Apr 27 19:49:29 mail2 uwsgi[1057]: self.tokens.append(self.scan_plain())
Apr 27 19:49:29 mail2 uwsgi[1057]: File "/usr/lib/python3/dist-packages/yaml/scanner.py", line 1290, in scan_plain
Apr 27 19:49:29 mail2 uwsgi[1057]: ch = self.peek(length)
Apr 27 19:49:29 mail2 uwsgi[1057]: File "/usr/lib/python3/dist-packages/yaml/reader.py", line 91, in peek
Apr 27 19:49:29 mail2 uwsgi[1057]: self.update(index+1)
Apr 27 19:49:29 mail2 uwsgi[1057]: File "/usr/lib/python3/dist-packages/yaml/reader.py", line 153, in update
Apr 27 19:49:29 mail2 uwsgi[1057]: self.update_raw()
Apr 27 19:49:29 mail2 uwsgi[1057]: File "/usr/lib/python3/dist-packages/yaml/reader.py", line 178, in update_raw
Apr 27 19:49:29 mail2 uwsgi[1057]: data = self.stream.read(size)
Apr 27 19:49:29 mail2 uwsgi[1057]: File "/usr/lib/python3.9/encodings/ascii.py", line 26, in decode
Apr 27 19:49:29 mail2 uwsgi[1057]: return codecs.ascii_decode(input, self.errors)[0]
Apr 27 19:49:29 mail2 uwsgi[1057]: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 6936: ordinal not in range(128)
Apr 27 19:49:29 mail2 uwsgi[1057]: unable to load app 0 (mountpoint='') (callable not found or import error)
Apr 27 19:49:29 mail2 uwsgi[1057]: *** no app loaded. going in full dynamic mode ***
Apr 27 19:49:29 mail2 uwsgi[1057]: *** uWSGI is running in multiple interpreter mode ***
Apr 27 19:49:29 mail2 uwsgi[1057]: spawned uWSGI master process (pid: 1057)
Apr 27 19:49:29 mail2 uwsgi[1057]: spawned uWSGI worker 1 (pid: 1058, cores: 4)
Apr 27 19:49:29 mail2 systemd[1]: Started grommunio admin api.
<< I'm now calling the https://fqdn-address:8443/api/v1/login >>
Apr 27 19:50:43 mail2 uwsgi[1058]: --- no python application found, check your startup logs for errors ---
Apr 27 19:50:43 mail2 uwsgi[1058]: [pid: 1058|app: -1|req: -1/1] XXX.XXX.XXX.XXX () {54 vars in 993 bytes} [Wed Apr 27 19:50:43 2022] GET /api/v1/login => generated 21 bytes in 0 msecs (HTTP/1.1 500) 2 headers in 83 bytes (0 switches on :50:43 2022] GET /api/v1/login => generated 21 bytes in 0 msecs (HTTP/1.1 500) 2 headers in 83 bytes (0 switches on core 0)
`
Not being a Python expert, I see that uwsgi doesn't find the openapi.json but this file is also missing on the OpenSuse appliance provided by Grommunio.
Maybe good to add that I tried with the community and the supported repositories.
The current version of the installed package can be found here below:
# dpkg -l | grep 'gromox\|grommunio'
ii grommunio-admin-api 1.6.36.d0b990e-1+107.1 all Backend for grommunio management
ii grommunio-admin-common 4.99b2d3b-1+7.1 amd64 Common files for grommunio management
ii grommunio-admin-web 2.2.0.4.7dc2ccc-1+50.1 all Frontend for grommunio management
ii grommunio-common 4.554c55a-1+11.1 amd64 Common configuration package for grommunio
ii grommunio-error-pages 1.0.3.daed05c-1+4.1 all Grommunio-branded error pages for webservers
ii grommunio-web 2.9.67.466be1f5-1+66.1 all Web access for grommunio
ii gromox 1.19.0.c1d541e65-1+1.1 amd64 Groupware server (backend) with RPCH, IMAP and Z-MAPI support
ii system-user-grommunio 0-1 all System user and group grommunio
ii system-user-gromox 0-1 all System user and group gromox
If anyone has an idea, I'm interested :-)