<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.E-MailFormatvorlage17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DE" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hello list,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">after days of reading man-pages and searching the web i have no solution to my problem, and I am lost in the documentation.<o:p></o:p></p>
<p class="MsoNormal">My system is Debian Jessie 8.5, upgraded from wheezy 7.11. With Debian wheezy all works fine, after the upgrade to jessie my postgresql-service does not start on boot automatically.<o:p></o:p></p>
<p class="MsoNormal">Starting manually after booting works fine, but this is not a option for a database-server.<o:p></o:p></p>
<p class="MsoNormal">I want do some simple thing, which worked with SysV-Init without any problems:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Starting postgresql from a NFS-mount.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I am not able to achieve this. The error is always the same:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Jul 01 16:11:27 postgis1 postgresql@9.4-main[536]: Error: /mnt/daten/postgis/9.4/main is not accessible or does not exist<o:p></o:p></p>
<p class="MsoNormal">Jul 01 16:11:27 postgis1 systemd[1]: postgresql@9.4-main.service: control process exited, code=exited status=1<o:p></o:p></p>
<p class="MsoNormal">Jul 01 16:11:27 postgis1 systemd[1]: Failed to start PostgreSQL Cluster 9.4-main.<o:p></o:p></p>
<p class="MsoNormal">Jul 01 16:11:27 postgis1 systemd[1]: Unit postgresql@9.4-main.service entered failed state.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">A few lines after these log-lines i  find this:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Jul 01 16:11:28 postgis1 rpcbind[818]: Starting rpcbind daemon....<o:p></o:p></p>
<p class="MsoNormal">Jul 01 16:11:28 postgis1 rpc.statd[861]: Version 1.2.8 starting<o:p></o:p></p>
<p class="MsoNormal">Jul 01 16:11:28 postgis1 rpc.statd[861]: Flags: TI-RPC<o:p></o:p></p>
<p class="MsoNormal">Jul 01 16:11:28 postgis1 kernel: FS-Cache: Loaded<o:p></o:p></p>
<p class="MsoNormal">Jul 01 16:11:28 postgis1 kernel: RPC: Registered named UNIX socket transport module.<o:p></o:p></p>
<p class="MsoNormal">Jul 01 16:11:28 postgis1 kernel: RPC: Registered udp transport module.<o:p></o:p></p>
<p class="MsoNormal">Jul 01 16:11:28 postgis1 kernel: RPC: Registered tcp transport module.<o:p></o:p></p>
<p class="MsoNormal">Jul 01 16:11:28 postgis1 kernel: RPC: Registered tcp NFSv4.1 backchannel transport module.<o:p></o:p></p>
<p class="MsoNormal">Jul 01 16:11:28 postgis1 kernel: FS-Cache: Netfs 'nfs' registered for caching<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">It seems to me, that NFS-mounts were done after trying to start postgresql.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="mso-element:para-border-div;border:none;border-bottom:solid windowtext 1.0pt;padding:0cm 0cm 1.0pt 0cm">
<p class="MsoNormal" style="border:none;padding:0cm">My postgresql.service is this:  (unmodified file)<o:p></o:p></p>
</div>
<p class="MsoNormal">[Unit]<o:p></o:p></p>
<p class="MsoNormal">Description=PostgreSQL RDBMS<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">[Service]<o:p></o:p></p>
<p class="MsoNormal">Type=oneshot<o:p></o:p></p>
<p class="MsoNormal">ExecStart=/bin/true<o:p></o:p></p>
<p class="MsoNormal">ExecReload=/bin/true<o:p></o:p></p>
<p class="MsoNormal">RemainAfterExit=on<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">[Install]<o:p></o:p></p>
<p class="MsoNormal">WantedBy=multi-user.target<o:p></o:p></p>
<p class="MsoNormal">-----------------------------------------------------------<o:p></o:p></p>
<p class="MsoNormal">Modifications in section [Unit] like :<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:35.4pt">ConditionPathExists=/mnt/daten/postgis<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="text-indent:35.4pt">Requires=mnt-daten-postgis.mount<o:p></o:p></p>
<p class="MsoNormal" style="text-indent:35.4pt">Before=mnt-daten-postgis.mount<o:p></o:p></p>
<p class="MsoNormal">(and creating a Unit-file for the mount-point, enabling etc. instead of /etc/fstab) don’t change the problem.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">After booting is complete, the mount is available, but not at the time, when postgresql should  be startet.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Maybe it is caused by this  (ssome lines before in journalctl-log):
<o:p></o:p></p>
<p class="MsoNormal">Jul 01 16:09:57 postgis1 systemd[1]: Cannot add dependency job for unit display-manager.service, ignoring: Unit display-manager.service f<o:p></o:p></p>
<p class="MsoNormal">Jul 01 16:09:57 postgis1 systemd[1]: Found ordering cycle on basic.target/start<o:p></o:p></p>
<p class="MsoNormal">Jul 01 16:09:57 postgis1 systemd[1]: Found dependency on sysinit.target/start<o:p></o:p></p>
<p class="MsoNormal">Jul 01 16:09:57 postgis1 systemd[1]: Found dependency on rpcbind.service/start<o:p></o:p></p>
<p class="MsoNormal">Jul 01 16:09:57 postgis1 systemd[1]: Found dependency on network-online.target/start<o:p></o:p></p>
<p class="MsoNormal">Jul 01 16:09:57 postgis1 systemd[1]: Found dependency on vmware-tools.service/start<o:p></o:p></p>
<p class="MsoNormal">Jul 01 16:09:57 postgis1 systemd[1]: Found dependency on basic.target/start<o:p></o:p></p>
<p class="MsoNormal">Jul 01 16:09:57 postgis1 systemd[1]: Breaking ordering cycle by deleting job rpcbind.service/start<o:p></o:p></p>
<p class="MsoNormal">Jul 01 16:09:57 postgis1 systemd[1]: Job rpcbind.service/start deleted to break ordering cycle starting with basic.target/start<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Where is my error? <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="mso-fareast-language:DE">mit freundlichen Grüssen<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:DE"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:DE">Wolfgang Wagner<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:DE">Systemadministration<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:DE"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:DE">RIWA GmbH <o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:DE">Gesellschaft für Geoinformationen<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:DE">Zwingerstr. 2, 87435 Kempten<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:DE">E-Mail: wolfgang.wagner@riwa-gis.de<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:DE">http://www.riwa-gis.de
<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p></p>
<pre>
--------------------------------------------------------------------------
RIWA GmbH, Zwingerstrasse 2, 87435 Kempten
Sitz der Gesellschaft: Kempten (Allgaeu)
Registergericht: Amtsgericht Kempten, HRB 6480
Geschaeftsfuehrer: Dipl.-Ing. Guenter Kraus
--------------------------------------------------------------------------
</pre>
<p></p>
</body>
</html>