From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id +DnhI29r01/zUQAA0tVLHw (envelope-from ) for ; Fri, 11 Dec 2020 12:51:59 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id +OOzH29r018rBAAA1q6Kng (envelope-from ) for ; Fri, 11 Dec 2020 12:51:59 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 579FA940429 for ; Fri, 11 Dec 2020 12:51:59 +0000 (UTC) Received: from localhost ([::1]:34690 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1knhtu-00051U-Bi for larch@yhetil.org; Fri, 11 Dec 2020 07:51:58 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49552) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kneOa-0006IP-EF for help-guix@gnu.org; Fri, 11 Dec 2020 04:07:24 -0500 Received: from out1.migadu.com ([2001:41d0:2:863f::]:5950) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kneOX-000232-KE for help-guix@gnu.org; Fri, 11 Dec 2020 04:07:24 -0500 Date: Fri, 11 Dec 2020 01:07:18 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=carlo.red; s=key1; t=1607677639; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=+G+bW0HE9zld+7gGNyMu3EhTLbmfhDl3eGX2VCBn4sE=; b=lHrToh4jZNxq1g/NQA3bIRpfnLr85sllzjGY5fCr6dpWrwpg8mqYbTQWdS8FvlCLW1zeoM qAwIiZoUnfQtI0S2A3RtsdIcHviQ2OKXXpo+Awd5tvNHfcOiKyHL5U/dW7Of93WLsi9hWt Il7frhhfWnRhQnxnNycIFMky80/hQ3RY1syw6QH1GB1bJoQLvXf6bsGDs8DoBz1syThySW v96OSmOax26COw2s0PJkkK3ExnDkR6QhRXL9Fb0S9UudVhzQMCG/HbouMBZERJtnAwGQl0 6GZm4ppPeH9sp69jeGOra6rcXgAYQ2cQsNcg53bp6sOME8IMlTrhLk9Cuel1GA== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Carlo Holl To: help-guix@gnu.org Subject: Running postgres with shepherd as user-level service? Message-ID: <20201211090718.euypj7n2sqd62jeh@cehdev> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline X-Migadu-Auth-User: mail@carlo.red Date: Fri, 11 Dec 2020 09:07:19 GMT Received-SPF: pass client-ip=2001:41d0:2:863f::; envelope-from=mail@carlo.red; helo=out1.migadu.com X-Spam_score_int: 4 X-Spam_score: 0.4 X-Spam_bar: / X-Spam_report: (0.4 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, FROM_FMBLA_NEWDOM14=0.999, INVALID_DATE=1.096, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Fri, 11 Dec 2020 07:51:46 -0500 X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: 0.90 Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=carlo.red header.s=key1 header.b=lHrToh4j; dmarc=none; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Queue-Id: 579FA940429 X-Spam-Score: 0.90 X-Migadu-Scanner: scn1.migadu.com X-TUID: zQHIf1x6cE0R Hello Guix! I'm struggling to find the right incantation to start a postgresql service with shepherd outside of a system context. Suppose the following snippet (postgres.scm): (use-modules (gnu services) (gnu packages databases) (gnu services databases)) (define pg-service (service postgresql-service-type (postgresql-configuration (postgresql postgresql) (data-directory "path-to-data-dir")))) (register-services pg-service) (start pg-service) If I run the above with 'herd load root postgres.scm', I get: Loading postgres.scm. herd: exception caught while executing 'load' on service 'root': In procedure fport_write: Input/output error Firstly, I'm not sure this is the right approach. Are the services defined in say (gnu services databases) supposed to be run outside of system config context? Secondly, I don't know how to go about diagnosing the issue since I'm not given a stack trace and I don't know where to get a more detailed log of the failure. The shepherd log file just shows 'Loading postgres.scm' for every invocation of the herd command. A point in the right direction would be greatly appreciated. -Carlo