Having started with the Puppet Learning VM, I'm trying to install puppet for the first time. My issue is that I cannot get PuppetDB to start as a service, and I cannot find an error message indicative enough of any issue. (Shutting down due to JVM shutdown hook.
)
Yet when I run puppetdb foreground
, PuppetDB seems to start fine without shutting down, however there is no further output after PuppetDB finished starting, disabling maintenance mode
.
Can anyone suggest what the issue might be? Is there anywhere else I can look for logs that might make things clearer?
Is it a timeout, because the final output PuppetDB finished starting, disabling maintenance mode
isn't what's is expected?
I have confirmed that puppetdb foreground
indeed works, by checking http://localhost:8080/pdb/dashboard/index.html.
To start puppetdb as a service, I run service puppetdb start
or puppet resource service puppetdb ensure=running
.
# puppet resource service puppetdb ensure=running
Error: Could not start Service[puppetdb]: Execution of '/usr/bin/systemctl start puppetdb' returned 1: Job for puppetdb.service failed. See 'systemctl status puppetdb.service' and 'journalctl -xn' for details.
Error: /Service[puppetdb]/ensure: change from stopped to running failed: Could not start Service[puppetdb]: Execution of '/usr/bin/systemctl start puppetdb' returned 1: Job for puppetdb.service failed. See 'systemctl status puppetdb.service' and 'journalctl -xn' for details.
journalctl
Nov 25 21:58:36 hostname systemd[1]: Unit puppetdb.service entered failed state.
Nov 25 21:58:36 hostname systemd[1]: Failed to start puppetdb Service.
Nov 25 21:58:35 hostname systemd[1]: puppetdb.service operation timed out. Stopping.
Nov 25 21:58:01 hostname CROND[15785]: (root) CMD (/usr/local/rtm/bin/rtm 32 > /dev/null 2> /dev/null)
Nov 25 21:58:01 hostname systemd[1]: Started Session c1982 of user root.
Nov 25 21:58:01 hostname systemd[1]: Starting Session c1982 of user root.
Nov 25 21:57:01 hostname CROND[15496]: (root) CMD (/usr/local/rtm/bin/rtm 32 > /dev/null 2> /dev/null)
Nov 25 21:57:01 hostname systemd[1]: Started Session c1981 of user root.
Nov 25 21:57:01 hostname systemd[1]: Starting Session c1981 of user root.
Nov 25 21:56:01 hostname CROND[15207]: (root) CMD (/usr/local/rtm/bin/rtm 32 > /dev/null 2> /dev/null)
Nov 25 21:56:01 hostname systemd[1]: Started Session c1980 of user root.
Nov 25 21:56:01 hostname systemd[1]: Starting Session c1980 of user root.
Nov 25 21:55:35 hostname systemd[1]: Starting puppetdb Service...
/var/log/puppetlabs/puppetdb/puppetdb.log
2015-11-25 21:55:52,831 INFO [o.e.j.u.log] Logging initialized @16842ms
2015-11-25 21:55:55,301 INFO [p.t.s.w.jetty9-service] Initializing web server(s).
2015-11-25 21:55:55,334 INFO [p.p.pdb-routing] Starting PuppetDB, entering maintenance mode
2015-11-25 21:55:55,369 INFO [p.t.s.n.nrepl-service] nREPL service disabled, not starting
2015-11-25 21:55:55,370 INFO [p.t.s.w.jetty9-service] Starting web server(s).
2015-11-25 21:55:55,480 INFO [p.t.s.w.jetty9-core] Starting web server.
2015-11-25 21:55:55,483 INFO [o.e.j.s.Server] jetty-9.2.z-SNAPSHOT
2015-11-25 21:55:55,511 INFO [o.e.j.s.h.ContextHandler] Started o.e.j.s.h.ContextHandler@689754d0{/pdb,null,AVAILABLE}
2015-11-25 21:55:55,525 INFO [o.e.j.s.ServerConnector] Started ServerConnector@594ee70f{HTTP/1.1}{127.0.0.1:8080}
2015-11-25 21:55:55,568 INFO [o.e.j.s.ServerConnector] Started ServerConnector@59de9c86{SSL-HTTP/1.1}{127.0.0.1:8081}
2015-11-25 21:55:55,569 INFO [o.e.j.s.Server] Started @19582ms
2015-11-25 21:55:55,572 INFO [p.p.metrics] Starting metrics server
2015-11-25 21:55:55,574 INFO [o.e.j.s.h.ContextHandler] Started o.e.j.s.h.ContextHandler@322f974b{/metrics,null,AVAILABLE}
2015-11-25 21:55:55,597 INFO [p.p.c.services] PuppetDB version 3.2.0
2015-11-25 21:55:55,691 INFO [p.p.s.migrate] There are no pending migrations
2015-11-25 21:55:55,701 INFO [c.j.b.BoneCP] Shutting down connection pool...
2015-11-25 21:55:55,703 INFO [c.j.b.BoneCP] Connection pool has been shutdown.
2015-11-25 21:55:55,705 INFO [p.p.c.services] Starting broker
2015-11-25 21:55:56,370 INFO [o.a.a.s.k.MessageDatabase] KahaDB is version 5
2015-11-25 21:55:56,379 INFO [o.a.a.s.k.MessageDatabase] Recovering from the journal ...
2015-11-25 21:55:56,381 INFO [o.a.a.s.k.MessageDatabase] Recovery replayed 32 operations from the journal in 0.009 seconds.
2015-11-25 21:55:56,474 INFO [p.p.c.services] Starting sweep of stale reports (threshold: 14 days)
2015-11-25 21:55:56,496 INFO [p.p.c.services] Finished sweep of stale reports (threshold: 14 days)
2015-11-25 21:55:56,497 INFO [p.p.c.services] Starting database garbage collection
2015-11-25 21:55:56,517 INFO [p.p.c.services] Finished database garbage collection
2015-11-25 21:55:56,591 INFO [p.p.dashboard] Redirecting / to the PuppetDB dashboard
2015-11-25 21:55:56,594 INFO [o.e.j.s.h.ContextHandler] Started o.e.j.s.h.ContextHandler@2372a439{/,null,AVAILABLE}
2015-11-25 21:55:56,595 INFO [p.p.pdb-routing] PuppetDB finished starting, disabling maintenance mode
2015-11-25 21:58:35,987 INFO [p.t.internal] Shutting down due to JVM shutdown hook.
2015-11-25 21:58:35,988 INFO [p.t.internal] Beginning shutdown sequence
2015-11-25 21:58:36,005 INFO [p.p.c.services] Shutdown request received; puppetdb exiting.
2015-11-25 21:58:36,006 INFO [p.p.c.services] Shutting down the messsage queues.
2015-11-25 21:58:36,525 INFO [c.j.b.BoneCP] Shutting down connection pool...
2015-11-25 21:58:36,528 INFO [c.j.b.BoneCP] Connection pool has been shutdown.
2015-11-25 21:58:36,528 INFO [c.j.b.BoneCP] Shutting down connection pool...
2015-11-25 21:58:36,530 INFO [c.j.b.BoneCP] Connection pool has been shutdown.
2015-11-25 21:58:36,532 INFO [p.t.s.w.jetty9-service] Shutting down web server(s).
2015-11-25 21:58:36,533 INFO [p.t.s.w.jetty9-core] Shutting down web server.
2015-11-25 21:58:36,535 INFO [o.e.j.s.ServerConnector] Stopped ServerConnector@594ee70f{HTTP/1.1}{127.0.0.1:8080}
2015-11-25 21:58:36,536 INFO [o.e.j.s.ServerConnector] Stopped ServerConnector@59de9c86{SSL-HTTP/1.1}{127.0.0.1:8081}
2015-11-25 21:58:36,536 INFO [o.e.j.s.h.ContextHandler] Stopped o.e.j.s.h.ContextHandler@2372a439{/,null,UNAVAILABLE}
2015-11-25 21:58:36,536 INFO [o.e.j.s.h.ContextHandler] Stopped o.e.j.s.h.ContextHandler@322f974b{/metrics,null,UNAVAILABLE}
2015-11-25 21:58:36,536 INFO [o.e.j.s.h.ContextHandler] Stopped o.e.j.s.h.ContextHandler@689754d0{/pdb,null,UNAVAILABLE}
2015-11-25 21:58:36,537 INFO [p.t.s.w.jetty9-core] Web server shutdown
2015-11-25 21:58:36,538 INFO [p.t.internal] Finished shutdown sequence
This is the output when I run puppetdb foreground
2015-11-25 22:27:11,806 INFO [o.e.j.u.log] Logging initialized @11673ms
2015-11-25 22:27:14,146 INFO [p.t.s.w.jetty9-service] Initializing web server(s).
2015-11-25 22:27:14,178 INFO [p.p.pdb-routing] Starting PuppetDB, entering maintenance mode
2015-11-25 22:27:14,208 INFO [p.t.s.n.nrepl-service] nREPL service disabled, not starting
2015-11-25 22:27:14,209 INFO [p.t.s.w.jetty9-service] Starting web server(s).
2015-11-25 22:27:14,314 INFO [p.t.s.w.jetty9-core] Starting web server.
2015-11-25 22:27:14,317 INFO [o.e.j.s.Server] jetty-9.2.z-SNAPSHOT
2015-11-25 22:27:14,348 INFO [o.e.j.s.h.ContextHandler] Started o.e.j.s.h.ContextHandler@38979a58{/pdb,null,AVAILABLE}
2015-11-25 22:27:14,364 INFO [o.e.j.s.ServerConnector] Started ServerConnector@57333ebe{HTTP/1.1}{127.0.0.1:8080}
2015-11-25 22:27:14,414 INFO [o.e.j.s.ServerConnector] Started ServerConnector@14ca5d70{SSL-HTTP/1.1}{127.0.0.1:8081}
2015-11-25 22:27:14,414 INFO [o.e.j.s.Server] Started @14283ms
2015-11-25 22:27:14,417 INFO [p.p.metrics] Starting metrics server
2015-11-25 22:27:14,419 INFO [o.e.j.s.h.ContextHandler] Started o.e.j.s.h.ContextHandler@69ad4539{/metrics,null,AVAILABLE}
2015-11-25 22:27:14,444 INFO [p.p.c.services] PuppetDB version 3.2.0
2015-11-25 22:27:14,555 INFO [p.p.s.migrate] There are no pending migrations
2015-11-25 22:27:14,565 INFO [c.j.b.BoneCP] Shutting down connection pool...
2015-11-25 22:27:14,568 INFO [c.j.b.BoneCP] Connection pool has been shutdown.
2015-11-25 22:27:14,570 INFO [p.p.c.services] Starting broker
2015-11-25 22:27:15,245 INFO [o.a.a.s.k.MessageDatabase] KahaDB is version 5
2015-11-25 22:27:15,255 INFO [o.a.a.s.k.MessageDatabase] Recovering from the journal ...
2015-11-25 22:27:15,258 INFO [o.a.a.s.k.MessageDatabase] Recovery replayed 32 operations from the journal in 0.01 seconds.
2015-11-25 22:27:15,361 INFO [p.p.c.services] Starting sweep of stale reports (threshold: 14 days)
2015-11-25 22:27:15,382 INFO [p.p.c.services] Finished sweep of stale reports (threshold: 14 days)
2015-11-25 22:27:15,383 INFO [p.p.c.services] Starting database garbage collection
2015-11-25 22:27:15,400 INFO [p.p.c.services] Finished database garbage collection
2015-11-25 22:27:15,487 INFO [p.p.dashboard] Redirecting / to the PuppetDB dashboard
2015-11-25 22:27:15,491 INFO [o.e.j.s.h.ContextHandler] Started o.e.j.s.h.ContextHandler@6f8242ec{/,null,AVAILABLE}
2015-11-25 22:27:15,492 INFO [p.p.pdb-routing] PuppetDB finished starting, disabling maintenance mode