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

Installer not working correctly - and GMD not starting. #38

Closed
mperryment opened this issue Aug 12, 2022 · 7 comments
Closed

Installer not working correctly - and GMD not starting. #38

mperryment opened this issue Aug 12, 2022 · 7 comments

Comments

@mperryment
Copy link

mperryment commented Aug 12, 2022

gm-installer-latest.txt

Some additional information the /etc/default/gmd file isn't being
created.

gm-installer version 1.8.0 (linux/amd64)
CentOS Linux release 7.9.2009 (Core)

Job for gmd.service failed because a configured resource limit was
exceeded. See "systemctl status gmd.service" and "journalctl -xe" for
details.

Aug 12 09:26:58 spare1 systemd[1]: gmd.service
failed to run 'start' task: No such file or directory Aug 12 09:26:58
spare1.projectcluster.co.uk systemd[1]: Failed to start gmd - galera
manager daemon.
Aug 12 09:26:58 spare1 systemd[1]: Unit
gmd.service entered failed state.
Aug 12 09:26:58 spare1 systemd[1]: gmd.service
failed.
Aug 12 09:26:58 spare1 systemd[1]: gmd.service
holdoff time over, scheduling restart.
Aug 12 09:26:58 spare1 systemd[1]: Stopped gmd -
galera manager daemon.
Aug 12 09:26:58 spare1 systemd[1]: start request
repeated too quickly for gmd.service Aug 12 09:26:58
spare1 systemd[1]: Failed to start gmd - galera
manager daemon.
Aug 12 09:26:58 spare1 systemd[1]: Unit
gmd.service entered failed state.
Aug 12 09:26:58 spare1 systemd[1]: gmd.service
failed.

As we don't use IPv6 I had to remove IPv6 from nginx before starting the
installer.

Setting it the permissive got me pass the first error.
/etc/selinux/config

SELINUX=permissive

SELinux status: enabled
SELinuxfs mount: /sys/fs/selinux
SELinux root directory: /etc/selinux
Loaded policy name: targeted
Current mode: permissive
Mode from config file: permissive
Policy MLS status: enabled
Policy deny_unknown status: allowed
Max kernel policy version: 31

thank you for choosing Galera Manager! I am sorry seeing issues with

Galera Manager.

Did SELinux really get disabled? Seems there might have been a failure
in disabling SELinux.

Can you paste output of tool:
sestatus

gm-installer.log

@mperryment
Copy link
Author

addition information, if run via the CLI working fine.

gmd run --influxdb-url='http://xxxx:xxxx@spare1.:8086' --bind-address=x.x.x.x:8000 --rsa-private-key=/var/lib/gmd/jwt-rsa.key

@denisgcm
Copy link
Collaborator

Can you please check the contents of /etc/systemd/system/default.target.wants/gmd.service?

It should be exactly as follows:

[Unit]
Description=gmd - galera manager daemon
After=network.target

[Service]
EnvironmentFile=/etc/default/gmd
User=gmd
Group=gmd
LimitNOFILE=65536
Restart=on-failure
Type=simple
ExecStart=/usr/bin/gmd run $ARGS

[Install]
WantedBy=default.target

If it's so, check please if you have /etc/default/gmd in place and /usr/bin/gmd as well.

@mperryment
Copy link
Author

mperryment commented Aug 23, 2022 via email

@denisgcm
Copy link
Collaborator

I noted that you use influxdb outside of gmd installation. This is unsupported currently. You should use a bundled influx installation. Also, the next version of the installer will be able to fix a broken installation. But currently to fix it manually, you should create a missing file /etc/default/gmd with the following content:

GMD_CONFIG_DIR=/var/lib/gmd
GMD_LOGS_DIR=/var/log/gmd
INFLUXDB_URL=http://INFLUX_USER:INFLUX_PASSWORD@GMD_NGINX_DOMAIN_OR_IP:8081

Note that if you use https, then the port must be 9091.

@mperryment
Copy link
Author

mperryment commented Aug 25, 2022

On a clean server installation, getting the selinux issue.

sestatus
SELinux status: disabled

INFO[0000] OS Detected: RedHat / CentOS Linux / Linux / Core / 7.9.2009

Do you accept the License Agreement? [a] to accept; [r] to read agreement; or [n] to reject.
Your choice: a
GMD Package Repository URL (blank for default):
GMD Admin User Login [admin]: admin
GMD Admin Password:
Repeat your entry:
By what domain name or an IP address this service will be reached?
(Note that an externally resolvable domain name is needed to use an external
Certificate Authority, otherwise we will have to resort to self-signed
certificates for SSL if encryption is required):
Enter your domain name or IP of the server: spare2
Enable https? [Y/n] y
Use LetsEncrypt Certbot to autogenerate the certificates [Y/n]: y
â 2022/08/25 10:25:55 INFO: Setting Repository URL
2022/08/25 10:25:55 INFO: Setting Repository Host
2022/08/25 10:25:55 TRACE: requirements not met, skipping "create_galera_manager_repo"
2022/08/25 10:25:55 INFO: Writing /etc/yum.repos.d/galera-manager.repo
2022/08/25 10:25:55 DEBUG: Writing to /etc/yum.repos.d/galera-manager.repo
2022/08/25 10:25:55 INFO: Adding influxdata repository
2022/08/25 10:25:55 DEBUG: Writing to /etc/yum.repos.d/influxdb.repo
2022/08/25 10:25:55 INFO: Temporarily Disabling SELinux
2022/08/25 10:25:55 INFO: Executing: setenforce Permissive
The installation log is located at /tmp/gm-installer.log
ERRO[0052] command failed (stepName=disable_selinux_temp, commandId=6, commandType=ExecCommand): exit status 1
[root@spare2.projectcluster.co.uk ~]# ^C
[root@spare2.projectcluster.co.uk ~]# sestatus
SELinux status: disabled

@denisgcm
Copy link
Collaborator

This should be fixed now in the new version of the installer. You can even run it on over an existing installation, it will reconfigure/repare it accordingly.

@denisgcm
Copy link
Collaborator

This should be fixed in the latest version of gm-installer.

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

2 participants