Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g3igQ-0005jd-Fp for pgsql-general@arkaria.postgresql.org; Sat, 22 Sep 2018 14:14:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g3igN-0000aS-Cc for pgsql-general@arkaria.postgresql.org; Sat, 22 Sep 2018 14:14:51 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g3igL-0000aL-MT for pgsql-general@lists.postgresql.org; Sat, 22 Sep 2018 14:14:51 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g3igA-0000fs-3P for pgsql-general@lists.postgresql.org; Sat, 22 Sep 2018 14:14:48 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 3150421B01 for ; Sat, 22 Sep 2018 10:14:35 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sat, 22 Sep 2018 10:14:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=faL6QVKCafEzmH/RTyozkJ1gm4Anv FdMDcODxMlI1Xk=; b=Rb+3/7phIexde51Hx+iJV74pUhtRekqbX8NsEAjWfXNYp y0YlxaWUsqhi6EtmWQIVBRZfRR7AEzXHo+pxoj+rXBT4KzSWlnrGywZ7hEBhJRvi 1GcPzxZv6EVTigedfuWglHogqRX6BG8OgalaUMLNcXigIFdACYvnN6fkd+eB0zGl n8VuontMKHWtW7MOF8HDlgA13i1TfxsAVna56vUzhGXWayg7V+jtVFwOKtIIGsB6 XJ9mgVihTYfu73md6yh878IHD1860dln1ZLy6k0iyyAUs228/q6zTNPfOl2P/xzl 9PIGfmA4j4l+u5ZdVAe3Ce/a2TxpHDhafU1HOboAA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=faL6QV KCafEzmH/RTyozkJ1gm4AnvFdMDcODxMlI1Xk=; b=IWL2UyvuOGPDDRE1MGsRsm sYoNjsZJK5Qe8iWocEwF3Sdu+1V6gWYmq2VHRssm/XB7wq6ZBhe5LZrPwgVJN3Oq QO5iAf4tdpfZu80SVdjTWkFrZuLNM573Y3r6qJgew80UhezPb6ujXwzlwibktzn8 7W01ZlB0aQTwjnbSL9vDWF0AwYaj3ZllEplQuJStb8Yh4xwCSUSQS1Bgm+LODUjx iB45H1d0rMGX7j7SNC6VvPuIQYbMHV9DAj2dIJPTaht0T+gJqqhPPaw+MMjVLaNF 3N8YFIIWf4rwqXn9O8mzvqnzNEvmYcoK9/5pA/rbEgnkejAwiVE+jDA072iECeAw == X-ME-Proxy: X-ME-Sender: Received: from [192.168.1.3] (unknown [71.212.134.3]) by mail.messagingengine.com (Postfix) with ESMTPA id 92452E447F for ; Sat, 22 Sep 2018 10:14:34 -0400 (EDT) Subject: Re: postgresql systemd service fails to start only on boot but not manually To: pgsql-general@lists.postgresql.org References: <20180922104411.u463kkorvmbombyk@NUC.doronbehar.com> From: Adrian Klaver Message-ID: <46968a21-c937-232c-009c-fb65af1005af@aklaver.com> Date: Sat, 22 Sep 2018 07:14:33 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <20180922104411.u463kkorvmbombyk@NUC.doronbehar.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 9/22/18 3:44 AM, Doron Behar wrote: > Hello everyone, > > I'm having trouble with my PostgreSQL Systemd service and I wonder > whether this is a problem with the software or some problem with the > packaging or build. > > My server fails to start PostgreSQL only on boot, if I restart it > manually afterwards it doesn't have any problem starting. Here is the > log extracted from the journal: > > ``` > 2018-09-21 20:46:40.028 CEST [306] LOG: listening on IPv4 address "127.0.0.1", port 5432 > 2018-09-21 20:46:40.036 CEST [306] LOG: listening on Unix socket "/run/postgresql/.s.PGSQL.5432" > 2018-09-21 20:46:40.233 CEST [337] LOG: database system was shut down at 2018-09-21 20:46:21 CEST > 2018-09-21 20:48:10.441 CEST [352] WARNING: worker took too long to start; canceled > 2018-09-21 20:49:10.469 CEST [352] WARNING: worker took too long to start; canceled > 2018-09-21 20:49:10.478 CEST [306] LOG: database system is ready to accept connection > 2018-09-21 20:49:10.486 CEST [306] LOG: received fast shutdown request > 2018-09-21 20:49:10.497 CEST [306] LOG: aborting any active transactions > 2018-09-21 20:49:10.498 CEST [637] FATAL: terminating autovacuum process due to administrator command > 2018-09-21 20:49:10.500 CEST [306] LOG: worker process: logical replication launcher (PID 636) exited with code 1 > 2018-09-21 20:49:10.501 CEST [349] LOG: shutting down > 2018-09-21 20:49:10.518 CEST [306] LOG: database system is shut down > ``` > > Any Ideas? I'd really like to fix this since now after every reboot I have to > remember to manually restart it. Linux distro and version? Assuming Postgres version 10+ given logical replication warning. Still actual version would be nice. How did you install Postgres? Where did systemd script come from? What is in the systemd script? What does the log show when you do a successful manual start? What does the system log show when the Postgres reboot startup fails? > > Thanks. > > -- Adrian Klaver adrian.klaver@aklaver.com