<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=us-ascii">
<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;}
@font-face
        {font-family:Aptos;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Aptos",sans-serif;
        mso-ligatures:standardcontextual;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#467886;
        text-decoration:underline;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Aptos",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        mso-ligatures:none;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
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="EN-US" link="#467886" vlink="#96607D" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hello again, <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">1) Did you install NGCP on a fresh/plain Debian bookworm system (as<o:p></o:p></p>
<p class="MsoNormal">opposed to a customized Debian system from your provider or alike)? Yes, I installed NGCP on a Fresh Debian bookworm (azure vm)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">2) How did you install NGCP? (Please provide the exact command lines.)<o:p></o:p></p>
<p class="MsoNormal"><b>1 downloaded the .deb file,<o:p></o:p></b></p>
<p class="MsoNormal"><b>2 run ngcp-installer, after the installation <o:p></o:p></b></p>
<p class="MsoNormal"><b>3 screen -S ngcp and ngcp-initial-configuration, and the rest of the configuration as in handbook. Then reboot</b><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">3) Did you run ngcp-initial-configuration with any special options?
<b>No special options. Just as the handbook states screen -S ngcp and ngcp-initial-configuration<o:p></o:p></b></p>
<p class="MsoNormal">Did you reboot your system betwen executing ngcp-installer and<o:p></o:p></p>
<p class="MsoNormal">ngcp-initial-configuration as instructed? <b>After the installation I run this command screen -S ngcp and ngcp-initial-configuration. After couple of minutes when initialization was completed, I rebooted.
</b><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">4) What's inside your /var/log/ngcp-installer.log?<b> I didn’t check the ngcp-installer.log at the time of the error. But checking now, I don’t see any error beside these below
<o:p></o:p></b></p>
<p class="MsoNormal"><b><o:p> </o:p></b></p>
<p class="MsoNormal"><b>Removing /etc/systemd/system-preset/01-installer.preset<o:p></o:p></b></p>
<p class="MsoNormal"><b>Calling systemd preset to configure services on the next boot:<o:p></o:p></b></p>
<p class="MsoNormal"><b>Failed to preset all units: File chronyd.service: Link has been severed<o:p></o:p></b></p>
<p class="MsoNormal"><b>Sleeping for 10 seconds (as requested via option 'STATUS_WAIT_SECONDS')<o:p></o:p></b></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-family:"Calibri",sans-serif;mso-ligatures:none">From:</span></b><span style="font-family:"Calibri",sans-serif;mso-ligatures:none"> Pa Ka <pa.ka12@outlook.com>
<br>
<b>Sent:</b> Wednesday, June 19, 2024 11:08 AM<br>
<b>To:</b> 'Pa Ka' <pa.ka12@outlook.com>; 'spce-user@lists.sipwise.com' <spce-user@lists.sipwise.com><br>
<b>Cc:</b> Michael Prokop <mprokop@sipwise.com><br>
<b>Subject:</b> RE: nginx failed to start due to the missing ssl folder and dhparam.pem<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hello, it is strange for sure. Below is the steps so you can investigate.
<o:p></o:p></p>
<p class="MsoNormal">1 Install mr12.3.1 on a vm with ngcp-installer.<o:p></o:p></p>
<p class="MsoNormal">2 run ngcp-initial-configuration. At this stage along with other configurations ngcp is functioning.<o:p></o:p></p>
<p class="MsoNormal">3. nginx failed to start because of ssl directory and dhparam.pem is missing within
<i>/etc/ngcp-config/shared-files/ssl</i><o:p></o:p></p>
<p class="MsoNormal">4 manually created ssl directory. And generated dhparam.pem file. The new ssl directory automatically has permissions like this root:ssl_cert , tried to change to permission to root:root, run ngcpcfg apply. After it revert back to root:ssl_cert
 . I think there’s a script that revert back the permission of the  ssl folder created to root:ssl_cert<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">That’s where the issue lies. <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-family:"Calibri",sans-serif;mso-ligatures:none">From:</span></b><span style="font-family:"Calibri",sans-serif;mso-ligatures:none"> Pa Ka <<a href="mailto:pa.ka12@outlook.com">pa.ka12@outlook.com</a>>
<br>
<b>Sent:</b> Tuesday, June 18, 2024 1:30 PM<br>
<b>To:</b> <a href="mailto:pa.ka12@outlook.com">pa.ka12@outlook.com</a>; <a href="mailto:spce-user@lists.sipwise.com">
spce-user@lists.sipwise.com</a><br>
<b>Subject:</b> RE: nginx failed to start due to the missing ssl folder and dhparam.pem<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Certain services also failed to start due to the missing ssl directory.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">This is ngcp-rest-api. Error: ENOENT: no such file or directory, open '/etc/ngcp-config/shared-files/ssl/myserver.key'<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Is creating the ssl directory manually a solution? What permission the new created directory will need to have ?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-family:"Calibri",sans-serif;mso-ligatures:none">From:</span></b><span style="font-family:"Calibri",sans-serif;mso-ligatures:none"> Pa Ka <<a href="mailto:pa.ka12@outlook.com">pa.ka12@outlook.com</a>>
<br>
<b>Sent:</b> Tuesday, June 18, 2024 1:06 PM<br>
<b>To:</b> <a href="mailto:spce-user@lists.sipwise.com">spce-user@lists.sipwise.com</a><br>
<b>Subject:</b> nginx failed to start due to the missing ssl folder and dhparam.pem<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hello Team, I am not sure if it’s a known error. But I have experienced this error in both mr12.3.1 and mr12.4.1 using ngcp-installer. Nginx failed to start.  when performed a test it returns an error below<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><i><span style="font-size:12.0pt;mso-ligatures:none">/etc/ngcp-config/shared-files/ssl/dhparam.pem") failed (SSL: error:80000002<o:p></o:p></span></i></p>
<p class="MsoNormal"><i><span style="font-size:12.0pt;mso-ligatures:none">library::No such file or directory<o:p></o:p></span></i></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">ssl directory is missing within <span style="font-size:12.0pt;mso-ligatures:none">
/etc/ngcp-config/shared-files/<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Temporary solution. Created ssl directory and generated dhparam.pem with openssl.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Nginx is starting. However, after creating ssl directory and generating dhparam.pem, ngcpcfg apply failed to build.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The error while building  <o:p></o:p></p>
<p class="MsoNormal">Executing /etc/ngcp-config/templates/var/sipwise/.ssh/authorized_keys.postbuild for /var/sipwise/.ssh/authorized_keys<o:p></o:p></p>
<p class="MsoNormal">Error: Build errors detected (see the output above)! Aborting.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Full nginx error before creating manually creating ssl directory<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:12.0pt;mso-ligatures:none">BIO_new_file("/etc/ngcp-config/shared-files/ssl/dhparam.pem") failed (SSL: error:80000002<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;mso-ligatures:none">library::No such file or directory<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;mso-ligatures:none">fopen(/etc/ngcp-config/shared-files/ssl/dhparam.pem, r) error:10000080<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;mso-ligatures:none">routines::no such file) nginx: configuration file /etc/nginx/nginx.conf test failed</span><o:p></o:p></p>
</div>
</body>
</html>