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

config class does not restart service #239

Closed
logicminds opened this issue Mar 5, 2021 · 1 comment
Closed

config class does not restart service #239

logicminds opened this issue Mar 5, 2021 · 1 comment

Comments

@logicminds
Copy link

logicminds commented Mar 5, 2021

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 6
  • Ruby: 2.5
  • Distribution: ubuntu 20
  • Module version: 7.0.0

How to reproduce (e.g Puppet code you use)

I changed the http port which then updated the grafana.ini file.

What are you seeing

The service was not restarted, so it is still listening on old port.

What behaviour did you expect instead

Service would be restarted.

Output log

Notice: /Stage[main]/Puppet_metrics_dashboard::Dashboards/File[/opt/puppetlabs/puppet/cache/state/overwrite_dashboards_disabled]/ensure: removed
Notice: /Stage[main]/Puppet_metrics_dashboard::Post_start_configs/Exec[create influxdb puppet_metrics database puppet_metrics]/returns: executed successfully
Notice: /Stage[main]/Grafana::Config/File[grafana.ini]/content:
--- /etc/grafana/grafana.ini	2021-03-04 17:06:54.099407408 -0800
+++ /tmp/puppet-file20210304-14549-znpr8u	2021-03-04 20:28:53.153055202 -0800
@@ -6,4 +6,7 @@
 admin_user = admin

 [server]
-http_port = 3000
+cert_file = /etc/grafana/cyberpowerpc4_cert.pem
+cert_key = /etc/grafana/cyberpowerpc4_key.pem
+http_port = 443
+protocol = https

Info: Computing checksum on file /etc/grafana/grafana.ini
Info: /Stage[main]/Grafana::Config/File[grafana.ini]: Filebucketed /etc/grafana/grafana.ini to puppet with sum 17c68004b36e811669bdc5ff6c26de34
Notice: /Stage[main]/Grafana::Config/File[grafana.ini]/content: content changed '{md5}17c68004b36e811669bdc5ff6c26de34' to '{md5}1f544419b8a7556a3effec94c5d80305'
Info: /Stage[main]/Grafana::Config/File[grafana.ini]: Scheduling refresh of Class[Grafana::Service]
Info: Class[Grafana::Config]: Scheduling refresh of Class[Grafana::Service]
Info: Class[Grafana::Service]: Scheduling refresh of Service[grafana]
Notice: /Stage[main]/Puppet_metrics_dashboard::Grafana/Puppet_metrics_dashboard::Certs[grafana]/File[/etc/grafana/cyberpowerpc4_key.pem]/ensure: defined content as '{md5}cfb77a94ca470c368824a2358452ce41'
Notice: /Stage[main]/Puppet_metrics_dashboard::Grafana/Puppet_metrics_dashboard::Certs[grafana]/File[/etc/grafana/cyberpowerpc4_cert.pem]/ensure: defined content as '{md5}654841cc3ab7e96d4e50929391f1d2c2'
Notice: /Stage[main]/Puppet_metrics_dashboard::Grafana/Puppet_metrics_dashboard::Certs[grafana]/File[/etc/grafana/ca.pem]/ensure: defined content as '{md5}9035a1b61b2f74102100ccddc4dbba8b'
Info: Puppet_metrics_dashboard::Certs[grafana]: Scheduling refresh of Service[grafana]
Notice: /Stage[main]/Grafana::Service/Service[grafana]: Triggered 'refresh' from 2 events
Error: /Stage[main]/Puppet_metrics_dashboard::Post_start_configs/Grafana_datasource[influxdb_telegraf]: Could not evaluate: Failed to open TCP connection to localhost:443 (Connection refused - connect(2) for "localhost" port 443)
Error: /Stage[main]/Puppet_metrics_dashboard::Post_start_configs/Grafana_datasource[influxdb_graphite]: Could not evaluate: Failed to open TCP connection to localhost:443 (Connection refused - connect(2) for "localhost" port 443)
Error: /Stage[main]/Puppet_metrics_dashboard::Post_start_configs/Grafana_datasource[influxdb_puppet_metrics]: Could not evaluate: Failed to open TCP connection to localhost:443 (Connection refused - connect(2) for "localhost" port 443)

Any additional information you'd like to impart

@logicminds
Copy link
Author

logicminds commented Mar 5, 2021

Appears that the problem is port 443 could not be used for some reason. I changed to 8443 and it works. Appears that using 443 is a known issue.

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

1 participant