<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:thr="http://purl.org/syndication/thread/1.0">
  <title type="html">Error Note</title>
  <id>https://error.note.tc/</id>
  <link rel="alternate" type="text/html" hreflang="ko" href="https://error.note.tc/" />
  <subtitle type="html">Error, Waring, Fault, ...</subtitle>
  <updated>2025-11-08T22:44:09+09:00</updated>
  <generator>Textcube 2.0.0 : Beta 3 : inquieto</generator>
  <entry>
    <title type="html">[dnf/yum] downgrade가 막힐 때 (--allowerasing)</title>
    <link rel="alternate" type="text/html" href="https://error.note.tc/entry/dnf-yum-downgrade%EA%B0%80-%EB%A7%89%ED%9E%90-%EB%95%8C-allowerasing" />
    <link rel="replies" type="application/atom+xml" href="https://error.note.tc/atom/response/85" thr:count="0"/>
    <category term="Linux 일반" />
    <category term="yum" />
    <category term="openssl" />
    <category term="linux" />
    <category term="downgrade" />
    <category term="dnf" />
    <category term="allowerasing" />
    <author>
      <name>깜빡쟁이</name>
    </author>
    <id>https://error.note.tc/entry/dnf-yum-downgrade%EA%B0%80-%EB%A7%89%ED%9E%90-%EB%95%8C-allowerasing</id>
    <updated>2025-10-19T17:04:30+09:00</updated>
    <published>2025-10-19T17:04:30+09:00</published>
    <summary type="html">&lt;p&gt;&amp;nbsp; dnf 또는 yum으로 한 단계씩 downgrade로 판을 낮추려다 보니 다음과 같은 오류를 만났다.&lt;/p&gt;
&lt;div class=&quot;textbox&quot;&gt;# sudo dnf downgrade openssl-libs&lt;br /&gt;Last metadata expiration check: 0:04:36 ago on Sun 19 Oct 2025 11:46:26 AM KST.&lt;br /&gt;Error:&lt;br /&gt;&amp;nbsp;Problem: problem with installed package openssl-fips-provider-1:3.5.1-2.el9.x86_64&lt;br /&gt;&amp;nbsp; - package openssl-fips-provider-1:3.5.1-2.el9.x86_64 from @System requires openssl-libs(x86-64) = 1:3.5.1-2.el9, but none of the providers can be installed&lt;br /&gt;&amp;nbsp; - package openssl-fips-provider-1:3.5.1-2.el9.x86_64 from baseos requires openssl-libs(x86-64) = 1:3.5.1-2.el9, but none of the providers can be installed&lt;br /&gt;&amp;nbsp; - package openssl-fips-provider-1:3.5.1-3.el9.x86_64 from baseos requires openssl-libs(x86-64) = 1:3.5.1-3.el9, but none of the providers can be installed&lt;br /&gt;&amp;nbsp; - package openssl-fips-provider-1:3.5.1-5.el9.x86_64 from baseos requires openssl-libs(x86-64) = 1:3.5.1-5.el9, but none of the providers can be installed&lt;br /&gt;&amp;nbsp; - cannot install both openssl-libs-1:3.5.1-1.el9.x86_64 from baseos and openssl-libs-1:3.5.1-2.el9.x86_64 from @System&lt;br /&gt;&amp;nbsp; - cannot install both openssl-libs-1:3.5.1-2.el9.x86_64 from baseos and openssl-libs-1:3.5.1-1.el9.x86_64 from baseos&lt;br /&gt;&amp;nbsp; - cannot install both openssl-libs-1:3.5.1-3.el9.x86_64 from baseos and openssl-libs-1:3.5.1-1.el9.x86_64 from baseos&lt;br /&gt;&amp;nbsp; - cannot install both openssl-libs-1:3.5.1-5.el9.x86_64 from baseos and openssl-libs-1:3.5.1-1.el9.x86_64 from baseos&lt;br /&gt;&amp;nbsp; - cannot install the best candidate for the job&lt;br /&gt;(try to add &#039;--allowerasing&#039; to command line to replace conflicting packages or &#039;--skip-broken&#039; to skip uninstallable packages or &#039;--nobest&#039; to use not only best candidate packages)&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;--allowerasing을 붙이면 아래처럼 downgrade를 더 이어갈 수 있다.&lt;/p&gt;
&lt;div class=&quot;textbox&quot;&gt;
&lt;p&gt;# sudo dnf downgrade openssl-libs --allowerasing&lt;br /&gt;Last metadata expiration check: 0:07:15 ago on Sun 19 Oct 2025 11:46:26 AM KST.&lt;br /&gt;Dependencies resolved.&lt;br /&gt;========================================================================================&lt;br /&gt;&amp;nbsp;Package&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Architecture&amp;nbsp; &amp;nbsp; &amp;nbsp;Version&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Repository&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Size&lt;br /&gt;========================================================================================&lt;br /&gt;Downgrading:&lt;br /&gt;&amp;nbsp;openssl&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; x86_64&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1:3.5.0-4.el9&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;baseos&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1.5 M&lt;br /&gt;&amp;nbsp;openssl-libs&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;x86_64&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1:3.5.0-4.el9&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;baseos&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2.7 M&lt;br /&gt;&lt;br /&gt;Transaction Summary&lt;br /&gt;========================================================================================&lt;br /&gt;Downgrade&amp;nbsp; 2 Packages&lt;br /&gt;&lt;br /&gt;Total download size: 4.1 M&lt;br /&gt;Is this ok [y/N]: y&lt;br /&gt;Downloading Packages:&lt;br /&gt;(1/2): openssl-3.5.0-4.el9.x86_64.rpm&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1.4 MB/s | 1.5 MB&amp;nbsp; &amp;nbsp; &amp;nbsp;00:01&lt;br /&gt;(2/2): openssl-libs-3.5.0-4.el9.x86_64.rpm&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2.0 MB/s | 2.7 MB&amp;nbsp; &amp;nbsp; &amp;nbsp;00:01&lt;br /&gt;----------------------------------------------------------------------------------------&lt;br /&gt;Total&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2.1 MB/s | 4.1 MB&amp;nbsp; &amp;nbsp; &amp;nbsp;00:01&lt;br /&gt;Running transaction check&lt;br /&gt;Transaction check succeeded.&lt;br /&gt;Running transaction test&lt;br /&gt;Transaction test succeeded.&lt;br /&gt;Running transaction&lt;br /&gt;&amp;nbsp; Preparing&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; :&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1/1&lt;br /&gt;&amp;nbsp; Downgrading&amp;nbsp; &amp;nbsp; &amp;nbsp; : openssl-libs-1:3.5.0-4.el9.x86_64&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1/4&lt;br /&gt;&amp;nbsp; Downgrading&amp;nbsp; &amp;nbsp; &amp;nbsp; : openssl-1:3.5.0-4.el9.x86_64&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2/4&lt;br /&gt;&amp;nbsp; Cleanup&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; : openssl-1:3.5.1-1.el9.x86_64&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3/4&lt;br /&gt;&amp;nbsp; Cleanup&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; : openssl-libs-1:3.5.1-1.el9.x86_64&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4/4&lt;br /&gt;&amp;nbsp; Running scriptlet: openssl-libs-1:3.5.1-1.el9.x86_64&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4/4&lt;br /&gt;&amp;nbsp; Verifying&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; : openssl-1:3.5.0-4.el9.x86_64&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1/4&lt;br /&gt;&amp;nbsp; Verifying&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; : openssl-1:3.5.1-1.el9.x86_64&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2/4&lt;br /&gt;&amp;nbsp; Verifying&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; : openssl-libs-1:3.5.0-4.el9.x86_64&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3/4&lt;br /&gt;&amp;nbsp; Verifying&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; : openssl-libs-1:3.5.1-1.el9.x86_64&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4/4&lt;br /&gt;&lt;br /&gt;Downgraded:&lt;br /&gt;&amp;nbsp; openssl-1:3.5.0-4.el9.x86_64&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;openssl-libs-1:3.5.0-4.el9.x86_64&lt;br /&gt;&lt;br /&gt;Complete!&lt;/p&gt;
&lt;/div&gt;</summary>
  </entry>
  <entry>
    <title type="html">[certbot/snapd] error: cannot list snaps: cannot communicate with server</title>
    <link rel="alternate" type="text/html" href="https://error.note.tc/entry/certbot-snapd-error-cannot-list-snaps-cannot-communicate-with-server" />
    <link rel="replies" type="application/atom+xml" href="https://error.note.tc/atom/response/84" thr:count="0"/>
    <category term="certbot" />
    <category term="리눅스" />
    <category term="snapd.socket" />
    <category term="snapd.service" />
    <category term="snap" />
    <category term="linux" />
    <category term="letsencrypt" />
    <category term="certbot" />
    <author>
      <name>깜빡쟁이</name>
    </author>
    <id>https://error.note.tc/entry/certbot-snapd-error-cannot-list-snaps-cannot-communicate-with-server</id>
    <updated>2025-06-09T23:45:58+09:00</updated>
    <published>2025-06-09T18:23:34+09:00</published>
    <summary type="html">&lt;p&gt;&amp;nbsp; snapd.service가 멈추어 있을 때 이런 오류가 나올 수 있다.&lt;/p&gt;
&lt;pre class=&quot;prettyprint &quot;&gt;&lt;code&gt;# snap list&lt;br /&gt;error: cannot list snaps: cannot communicate with server: Get &quot;http://localhost/v2/snaps&quot;: dial unix /run/snapd.socket: connect: no such file or directory&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp; snapd를 통하여 letsencrypt를 쓰고 있을 때에도 오류가 나올 수 있다.&lt;/p&gt;
&lt;pre class=&quot;prettyprint &quot;&gt;&lt;code&gt;# certbot&lt;br /&gt;cannot snap-exec: cannot exec &quot;/var/lib/snapd/snap/certbot/4482/bin/python3&quot;: no such file or directory&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp; 이런 때에는 snapd.service를 시작해 준다.&lt;/p&gt;
&lt;pre class=&quot;prettyprint &quot;&gt;&lt;code&gt;# systemctl start snapd.service&lt;br /&gt;# snap list&lt;br /&gt;Name                 Version   Rev    Tracking       Publisher     Notes&lt;br /&gt;certbot              3.3.0     4482   latest/stable  certbot-eff✓  classic&lt;br /&gt;certbot-dns-rfc2136  3.3.0     4066   latest/stable  certbot-eff✓  -&lt;br /&gt;core20               20250213  2501   latest/stable  canonical✓    base&lt;br /&gt;core24               20241217  739    latest/stable  canonical✓    base,disabled&lt;br /&gt;snapd                2.67.1    23771  latest/stable  canonical✓    snapd&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp; 아래처럼 snapd.socket만 재시작하면 아래와 같은 오류가 나기도 하는데, 그런 때에는 위처럼 snapd.service를 띄우거나 &quot;snap refresh&quot;로 구성 요소를 판올림하면 문제가 풀리기도 한다.&lt;/p&gt;
&lt;pre class=&quot;prettyprint &quot;&gt;&lt;code&gt;# snap list&lt;br /&gt;error: cannot list snaps: cannot communicate with server: Get &quot;http://localhost/v2/snaps&quot;: dial unix /run/snapd.socket: connect: connection refused&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;prettyprint &quot;&gt;&lt;code&gt;# snap refresh&lt;br /&gt;certbot-dns-rfc2136 4.0.0 from Certbot Project (certbot-eff✓) refreshed&lt;/code&gt;&lt;/pre&gt;</summary>
  </entry>
  <entry>
    <title type="html">[named] Failed to start Berkeley Internet Name Domain (DNS)</title>
    <link rel="alternate" type="text/html" href="https://error.note.tc/entry/named-Failed-to-start-Berkeley-Internet-Name-Domain-DNS" />
    <link rel="replies" type="application/atom+xml" href="https://error.note.tc/atom/response/83" thr:count="0"/>
    <category term="named" />
    <category term="zone" />
    <category term="systemctl" />
    <category term="named" />
    <category term="name server" />
    <category term="linux" />
    <category term="journalctl" />
    <category term="file" />
    <category term="error" />
    <category term="domain" />
    <category term="DNS" />
    <author>
      <name>깜빡쟁이</name>
    </author>
    <id>https://error.note.tc/entry/named-Failed-to-start-Berkeley-Internet-Name-Domain-DNS</id>
    <updated>2025-05-02T18:21:18+09:00</updated>
    <published>2025-05-02T18:20:40+09:00</published>
    <summary type="html">&lt;blockquote&gt;# systemctl start named-chroot&lt;br /&gt;Job for named-chroot.service failed because the control process exited with error code.&lt;br /&gt;See &quot;systemctl status named-chroot.service&quot; and &quot;journalctl -xeu named-chroot.service&quot; for details.&lt;/blockquote&gt;
&lt;p&gt;&amp;nbsp; named-chroot 서비스가 문제가 있어서 시작되지 못했음을 알리고 있다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; 아래는 &quot;systemctl status named-chroot.service&quot; 또는 &quot;journalctl -xeu named-chroot.service&quot;로 본 로그 내용이다.&lt;/p&gt;
&lt;blockquote&gt;░░ Subject: Unit process exited&lt;br /&gt;░░ Defined-By: systemd&lt;br /&gt;░░ Support: https://wiki.almalinux.org/Help-and-Support&lt;br /&gt;░░&lt;br /&gt;░░ An ExecStartPre= process belonging to unit named-chroot.service has exited.&lt;br /&gt;░░&lt;br /&gt;░░ The process&#039; exit code is &#039;exited&#039; and its exit status is 1.&lt;br /&gt;May 02 09:00:40 KR-D1 systemd[1]: named-chroot.service: Failed with result &#039;exit-code&#039;.&lt;br /&gt;░░ Subject: Unit failed&lt;br /&gt;░░ Defined-By: systemd&lt;br /&gt;░░ Support: https://wiki.almalinux.org/Help-and-Support&lt;br /&gt;░░&lt;br /&gt;░░ The unit named-chroot.service has entered the &#039;failed&#039; state with result &#039;exit-code&#039;.&lt;br /&gt;May 02 09:00:40 KR-D1 systemd[1]: &lt;span style=&quot;color: #ff0000;&quot;&gt;Failed to start Berkeley Internet Name Domain (DNS).&lt;/span&gt;&lt;br /&gt;░░ Subject: A start job for unit named-chroot.service has failed&lt;br /&gt;░░ Defined-By: systemd&lt;br /&gt;░░ Support: https://wiki.almalinux.org/Help-and-Support&lt;br /&gt;░░&lt;br /&gt;░░ A start job for unit named-chroot.service has finished with a failure.&lt;br /&gt;░░&lt;br /&gt;░░ The job identifier is 1116 and the job result is failed.&lt;/blockquote&gt;
&lt;p&gt;&amp;nbsp; &quot;&lt;span style=&quot;color: #ff0000;&quot;&gt;Failed to start Berkeley Internet Name Domain (DNS).&lt;/span&gt;&quot;는 /var/named의 zone 파일이 없거나 문제가 있으면 나타날 수 있다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; ???.zone 파일을 ???.zone.a라고 이름을 바꾸어도 이 오류가 나올 수 있다.&lt;/p&gt;</summary>
  </entry>
  <entry>
    <title type="html">[PHP] Deprecated:  Creation of dynamic property...</title>
    <link rel="alternate" type="text/html" href="https://error.note.tc/entry/PHP-Deprecated-Creation-of-dynamic-property" />
    <link rel="replies" type="application/atom+xml" href="https://error.note.tc/atom/response/81" thr:count="0"/>
    <category term="PHP" />
    <category term="클래스" />
    <category term="변수" />
    <category term="warning" />
    <category term="variable" />
    <category term="PHP" />
    <category term="dynamic property" />
    <category term="deprecated" />
    <category term="class" />
    <author>
      <name>깜빡쟁이</name>
    </author>
    <id>https://error.note.tc/entry/PHP-Deprecated-Creation-of-dynamic-property</id>
    <updated>2024-08-14T10:57:23+09:00</updated>
    <published>2024-08-14T10:53:38+09:00</published>
    <summary type="html">&lt;p&gt;&amp;nbsp; PHP 8.1까지는 아래처럼 미리 선언하지 않은 클래스의 동적 요소를 쓸 수 있었다.&lt;/p&gt;
&lt;pre class=&quot;prettyprint &quot;&gt;&lt;code&gt;class Class_name {
	public function __construct() {
		$this-&amp;gt;id = null;
	}
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp; 하지만 PHP 8.2에서는 위와 같이 미리 선언하지 않은 동적 요소(dynamic property)로서 클래스의 메소드에 쓰인 변수가 있으면, 아래처럼 비권장 경고문이 나온다.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;PHP Deprecated:&amp;nbsp; Creation of dynamic property Class_name::$var is deprecated in .../???.php on line 3&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&amp;nbsp; PHP 8.2에서는 경고문만 나오고 있지만, 그 뒤에 나오는 판에서는 클래스의 멤버 변수로 미리 선언하지 않은 동적 요소로 들어간 변수가 있으면 작동하지 않을 수도 있다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; 아래처럼 클래스 내부에 멤버 변수($id)를 미리 선언하면, PHP 8.2 이후에 나올 수 있는 경고문이나 오류를 피할 수 있다.&lt;/p&gt;
&lt;pre class=&quot;prettyprint &quot;&gt;&lt;code&gt;class Class_name {
	public $id;
	public function __construct() {
		$this-&amp;gt;id = null;
	}
}&lt;/code&gt;&lt;/pre&gt;</summary>
  </entry>
  <entry>
    <title type="html">[phpMyAdmin] mismatch between HTTPS indicated on the server and client</title>
    <link rel="alternate" type="text/html" href="https://error.note.tc/entry/phpMyAdmin-mismatch-between-HTTPS-indicated-on-the-server-and-client" />
    <link rel="replies" type="application/atom+xml" href="https://error.note.tc/atom/response/80" thr:count="0"/>
    <category term="MySQL" />
    <category term="인증서" />
    <category term="phpMyAdmin" />
    <category term="MySQL" />
    <category term="HTTPS" />
    <category term="database" />
    <author>
      <name>깜빡쟁이</name>
    </author>
    <id>https://error.note.tc/entry/phpMyAdmin-mismatch-between-HTTPS-indicated-on-the-server-and-client</id>
    <updated>2024-08-13T17:18:28+09:00</updated>
    <published>2024-08-13T17:09:45+09:00</published>
    <summary type="html">&lt;p&gt;&amp;nbsp; 아래는 로그인 정보를 넣는 항목이 나오지 않고 제목만 나온 phpMyAdmin의 모습이다.&lt;/p&gt;
&lt;figure class=&quot;imageblock center&quot; style=&quot;text-align: center; clear: both;&quot;&gt;&lt;a href=&quot;/attach/6/1384831640.webp&quot; data-lightbox=&quot;lightbox[1group080]&quot; title=&quot;로그인 항목이 나오지 않은 phpMyAdmin&quot; class=&quot;lightbox-image-css&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;/attach/6/1384831640.webp&quot;  width=&quot;537&quot; height=&quot;698&quot; alt=&quot;로그인 항목이 나오지 않은 phpMyAdmin&quot; loading=&quot;lazy&quot; &gt;&lt;/a&gt;&lt;figcaption class=&quot;cap1&quot;&gt;로그인 항목이 나오지 않은 phpMyAdmin&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&amp;nbsp; 디버그 도구로 숨김 처리된 HTML 항목의 CSS 내용(display: none;)을 없애면 아래와 같은 화면을 볼 수 있다.&lt;/p&gt;
&lt;figure class=&quot;imageblock center&quot; style=&quot;text-align: center; clear: both;&quot;&gt;&lt;a href=&quot;/attach/6/2305365059.webp&quot; data-lightbox=&quot;lightbox[1group080]&quot; title=&quot;phpMyAdmin - There is a mismatch between HTTPS indicated on the server and client...&quot; class=&quot;lightbox-image-css&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;/attach/6/2305365059.webp&quot;  width=&quot;537&quot; height=&quot;698&quot; alt=&quot;phpMyAdmin - There is a mismatch between HTTPS indicated on the server and client...&quot; loading=&quot;lazy&quot; &gt;&lt;/a&gt;&lt;/figure&gt;
&lt;blockquote&gt;
&lt;p&gt;There is a mismatch between HTTPS indicated on the server and client. This can lead to a non working phpMyAdmin or a security risk. Please fix your server configuration to indicate HTTPS properly.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&amp;nbsp; phpMyAdmin에는 이상이 없으나 서버와 클라이언트의 HTTPS 인증서 정보가 서로 맞지 않을 때에 위와 같은 화면이 나올 수 있다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; 서로 다른 웹 서버에서 주 도메인과 서브 도메인을 이용할 때에 쿠키나 HTTPS 인증서의 정보가 서로 다르면 이런 문제가 생길 수도 있는 것 같은데, 모두 같은 HTTPS 인증서를 쓰는 것 말고는 확실한 해결책을 찾지 못했다. 이 문제가 있더라도 숨은 화면을 보이게 해서 사용자명과 암호를 넣으면 phpMyAdmin은 작동한다.&lt;/p&gt;</summary>
  </entry>
  <entry>
    <title type="html">Inhibitor: Upgrade requires links in root directory to be relative</title>
    <link rel="alternate" type="text/html" href="https://error.note.tc/entry/Inhibitor-Upgrade-requires-links-in-root-directory-to-be-relative" />
    <link rel="replies" type="application/atom+xml" href="https://error.note.tc/atom/response/75" thr:count="0"/>
    <category term="Linux 일반" />
    <category term="upgrage" />
    <category term="symbolic link" />
    <category term="root directory" />
    <category term="migration" />
    <category term="ln" />
    <category term="leapp" />
    <category term="directory" />
    <category term="centos" />
    <category term="AlmaLinux" />
    <author>
      <name>깜빡쟁이</name>
    </author>
    <id>https://error.note.tc/entry/Inhibitor-Upgrade-requires-links-in-root-directory-to-be-relative</id>
    <updated>2024-08-07T13:03:12+09:00</updated>
    <published>2024-08-07T13:03:12+09:00</published>
    <summary type="html">&lt;p&gt;&amp;nbsp; 아래는 CentOS 7에서 AlmaLinux 8, 9으로 판을 올리는 과정에서 &quot;leapp preupgrade&quot; 명령을 넣었을 때에 나타날 수 있는 내용이다. (&lt;a href=&quot;https://wiki.almalinux.org/elevate/ELevating-CentOS7-to-AlmaLinux-9.html#upgrade-centos-7-to-almalinux-8&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;ELevating CentOS 7 to AlmaLinux 9 | AlmaLinux Wiki&lt;/a&gt;)&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;============================================================&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UPGRADE INHIBITED&lt;br /&gt;============================================================&lt;br /&gt;&lt;br /&gt;Upgrade has been inhibited due to the following problems:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1. Inhibitor: Upgrade requires links in root directory to be relative&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2. Inhibitor: Missing required answers in the answer file&lt;br /&gt;Consult the pre-upgrade report for details and possible remediation.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&amp;nbsp; /var/log/leapp/leapp-report.txt 파일에서 자세한 내용을 볼 수 있다.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Risk Factor: high (inhibitor)&lt;br /&gt;Title: Upgrade requires links in root directory to be relative&lt;br /&gt;Summary: After rebooting, parts of the upgrade process can fail if symbolic links in / point to absolute paths.&lt;br /&gt;Please change these links to relative ones.&lt;br /&gt;Remediation: [command] sh -c ln -snf var/lib/snapd/snap /snap&lt;br /&gt;Key: 3d895ad37ceaf4157864d439edb6bd75562061fa&lt;br /&gt;----------------------------------------&lt;br /&gt;Risk Factor: high (inhibitor)&lt;br /&gt;Title: Missing required answers in the answer file&lt;br /&gt;Summary: One or more sections in answerfile are missing user choices: remove_pam_pkcs11_module_check.confirm&lt;br /&gt;For more information consult https://leapp.readthedocs.io/en/latest/dialogs.html&lt;br /&gt;Remediation: [hint] Please register user choices with leapp answer cli command or by manually editing the answerfile.&lt;br /&gt;[command] leapp answer --section remove_pam_pkcs11_module_check.confirm=True&lt;br /&gt;Key: d35f6c6b1b1fa6924ef442e3670d90fa92f0d54b&lt;br /&gt;----------------------------------------&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&amp;nbsp; 루트 디렉토리(뿌리 자료방)의 심볼릭 링크 문제는 위의 경우에는 &quot;ln -snf /var/lib/snapd/snap /snap&quot;로 풀 수 있다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; 두번째 문제는 &quot;leapp answer --section remove_pam_pkcs11_module_check.confirm=True&quot; 명령을 넣거나 /var/log/leapp/answerfile 파일을 고쳐서 풀 수 있다.&lt;/p&gt;</summary>
  </entry>
  <entry>
    <title type="html">[nginx] nginx.conf의 if 문 안에 넣을 수 없는 명령들 - listen, http2, ssl_protocols, …</title>
    <link rel="alternate" type="text/html" href="https://error.note.tc/entry/nginx-listen-directive-is-not-allowed-here" />
    <link rel="replies" type="application/atom+xml" href="https://error.note.tc/atom/response/77" thr:count="0"/>
    <category term="nginx" />
    <category term="ssl_protocols" />
    <category term="nginx.conf" />
    <category term="nginx" />
    <category term="listen" />
    <category term="if" />
    <category term="http2" />
    <category term="error" />
    <category term="directive" />
    <author>
      <name>깜빡쟁이</name>
    </author>
    <id>https://error.note.tc/entry/nginx-listen-directive-is-not-allowed-here</id>
    <updated>2024-08-10T02:53:42+09:00</updated>
    <published>2024-08-07T10:42:53+09:00</published>
    <summary type="html">&lt;p&gt;&amp;nbsp; 아래는 &quot;nginx -t&quot;로 nginx 설정 파일(nginx.conf)을 검사한 내용이다.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;# nginx -t&lt;br /&gt;nginx: [emerg] &quot;listen&quot; directive is not allowed here in /etc/nginx/conf.d/???.conf:62&lt;br /&gt;nginx: configuration file /etc/nginx/nginx.conf test failed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;figure class=&quot;imageblock center&quot; style=&quot;text-align: center; clear: both;&quot;&gt;&lt;a href=&quot;/attach/6/3949641263.webp&quot; data-lightbox=&quot;lightbox[1group077]&quot; title=&quot;&amp;quot;listen&amp;quot; directive is not allowed here in ...&quot; class=&quot;lightbox-image-css&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;/attach/6/3949641263.webp&quot;  width=&quot;602&quot; height=&quot;54&quot; alt=&quot;&amp;quot;listen&amp;quot; directive is not allowed here in ...&quot; loading=&quot;lazy&quot; &gt;&lt;/a&gt;&lt;/figure&gt;
&lt;p&gt;&amp;nbsp; 여기에서 listen 명령 때문에 오류가 난 까닭은 아래처럼 listen을 if 문 안에 넣었기 때문이다.&lt;/p&gt;
&lt;pre class=&quot;prettyprint &quot;&gt;&lt;code&gt;http {
	server {
		server_name www.domain-name.com domain-name.com
		if ($host != &quot;www.domain-name.com&quot;) {
			listen 443 quic;
		}
	...
	}
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp; listen을 if 문 밖으로 빼내면 이 오류를 없앨 수 있다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; listen 말고도 if 문 안에 넣을 수 없는 명령은 http2, ssl_protocols를 비롯하여 여러 가지가 있다.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;# nginx -t&lt;br /&gt;nginx: [emerg] &quot;ssl_protocols&quot; directive is not allowed here in /etc/nginx/conf.d/???.conf:33&lt;br /&gt;nginx: configuration file /etc/nginx/nginx.conf test failed&lt;/p&gt;
&lt;/blockquote&gt;</summary>
  </entry>
  <entry>
    <title type="html">[memcached] Cannot set item size limit higher than 1/2 of memory max.</title>
    <link rel="alternate" type="text/html" href="https://error.note.tc/entry/memcached-Cannot-set-item-size-limit-higher-than-1-2-of-memory-max" />
    <link rel="replies" type="application/atom+xml" href="https://error.note.tc/atom/response/78" thr:count="0"/>
    <category term="Linux 일반" />
    <category term="캐시" />
    <category term="리눅스" />
    <category term="MemoryMax" />
    <category term="memory" />
    <category term="memcached" />
    <category term="linux" />
    <category term="cache" />
    <author>
      <name>깜빡쟁이</name>
    </author>
    <id>https://error.note.tc/entry/memcached-Cannot-set-item-size-limit-higher-than-1-2-of-memory-max</id>
    <updated>2024-08-06T11:23:30+09:00</updated>
    <published>2024-08-06T11:22:32+09:00</published>
    <summary type="html">&lt;p&gt;&amp;nbsp; memcached의 메모리를 너무 적게 설정하면 아래처럼 &quot;Cannot set item size limit higher than 1/2 of memory max.&quot;라고 나오며 memcached가 실행되지 않을 수 있다.&lt;/p&gt;
&lt;pre class=&quot;prettyprint &quot;&gt;&lt;code&gt;● memcached.service - memcached daemon
     Loaded: loaded (/usr/lib/systemd/system/memcached.service; enabled; preset: disabled)
     Active: failed (Result: exit-code) since Sun 2024-08-04 17:53:12 KST; 24s ago
   Duration: 21ms
    Process: 4037 ExecStart=/usr/bin/memcached -p ${PORT} -u ${USER} -m ${CACHESIZE} -c ${MAXCONN} $OPTIONS (code=exited, status=64)
   Main PID: 4037 (code=exited, status=64)
        CPU: 13ms

Aug 04 17:53:12 server_name systemd[1]: Started memcached daemon.
Aug 04 17:53:12 server_name memcached[4037]: Cannot set item size limit higher than 1/2 of memory max.
Aug 04 17:53:12 server_name systemd[1]: memcached.service: Main process exited, code=exited, status=64/USAGE
Aug 04 17:53:12 server_name systemd[1]: memcached.service: Failed with result &#039;exit-code&#039;.&lt;/code&gt;&lt;/pre&gt;&lt;figure class=&quot;imageblock center&quot; style=&quot;text-align: center; clear: both;&quot;&gt;&lt;a href=&quot;/attach/6/2664454213.webp&quot; data-lightbox=&quot;lightbox[1group078]&quot; title=&quot;[memcached] Cannot set item size limit higher than 1/2 of memory max.&quot; class=&quot;lightbox-image-css&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;/attach/6/2664454213.webp&quot;  width=&quot;700&quot; height=&quot;151&quot; alt=&quot;[memcached] Cannot set item size limit higher than 1/2 of memory max.&quot; loading=&quot;lazy&quot; &gt;&lt;/a&gt;&lt;/figure&gt;
&lt;p&gt;&amp;nbsp; memcached 설정 파일(/etc/sysconfig/memcached)의 내용은 대략 이러한 식이다.&lt;/p&gt;
&lt;pre class=&quot;prettyprint &quot;&gt;&lt;code&gt;PORT=&quot;11211&quot;&lt;br /&gt;USER=&quot;memcached&quot;&lt;br /&gt;MAXCONN=&quot;1024&quot;&lt;br /&gt;CACHESIZE=&quot;1&quot;&lt;br /&gt;OPTIONS=&quot;-l 127.0.0.1,::1&quot;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp; CACHESIZE 값을 2 이상으로 늘려 준다. 아래처럼 하면 캐시 크기가 32MB가 된다.&lt;br /&gt;(초기 설정 파일의 CACHESIZE 기본값은 64) &lt;pre class=&quot;prettyprint &quot;&gt;&lt;code&gt;CACHESIZE=&quot;32&quot;&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; 아래처럼 OPTIONS 값으로 캐시 크기를 바꾸는 방법도 있다.&lt;/p&gt;
&lt;p&gt;&lt;pre class=&quot;prettyprint &quot;&gt;&lt;code&gt;OPTIONS=&quot;-m 32 -l 127.0.0.1,::1&quot;&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;</summary>
  </entry>
  <entry>
    <title type="html">[MariaDB] A manual upgrade is required</title>
    <link rel="alternate" type="text/html" href="https://error.note.tc/entry/MariaDB-A-manual-upgrade-is-required" />
    <link rel="replies" type="application/atom+xml" href="https://error.note.tc/atom/response/71" thr:count="0"/>
    <category term="MySQL" />
    <category term="리눅스" />
    <category term="update" />
    <category term="rpm" />
    <category term="MySQL" />
    <category term="MariaDB" />
    <category term="linux" />
    <category term="dnf" />
    <category term="database" />
    <category term="centos" />
    <author>
      <name>깜빡쟁이</name>
    </author>
    <id>https://error.note.tc/entry/MariaDB-A-manual-upgrade-is-required</id>
    <updated>2024-07-28T11:59:55+09:00</updated>
    <published>2024-07-28T11:59:55+09:00</published>
    <summary type="html">&lt;p&gt;&amp;nbsp; 아래는 CentOS 7에서 예전에 쓰던 MariaDB(10.11.8)를 깨끗이 지우지 않고 dnf로 11.4.2판으로 곧바로 판올림하려다가 막힌 모습이다.&lt;/p&gt;
&lt;pre class=&quot;prettyprint &quot;&gt;&lt;code&gt;[user@host ~]# sudo dnf update
MariaDB Tools                                          0.0  B/s |   0  B     00:00
MariaDB Server                                         251 kB/s | 384 kB     00:01
MariaDB MaxScale                                       0.0  B/s |   0  B     00:00
Dependencies resolved.
=======================================================================================
 Package                   Arch       Version                   Repository        Size
=======================================================================================
Upgrading:
 MariaDB-client            x86_64     11.4.2-1.el7.centos       mariadb-main      17 M
 MariaDB-common            x86_64     11.4.2-1.el7.centos       mariadb-main      82 k
 MariaDB-compat            x86_64     11.4.2-1.el7.centos       mariadb-main     2.2 M
 MariaDB-server            x86_64     11.4.2-1.el7.centos       mariadb-main      27 M
Installing dependencies:
 MariaDB-client-compat     noarch     11.4.2-1.el7.centos       mariadb-main     7.9 k
 MariaDB-server-compat     noarch     11.4.2-1.el7.centos       mariadb-main     5.5 k
Transaction Summary
=======================================================================================
Install  2 Packages
Upgrade  4 Packages
Total download size: 46 M
Is this ok [y/N]: y
Downloading Packages:
(1/6): MariaDB-client-compat-11.4.2-1.el7.centos.noarc 9.7 kB/s | 7.9 kB     00:00
(2/6): MariaDB-server-compat-11.4.2-1.el7.centos.noarc 5.0 kB/s | 5.5 kB     00:01
(3/6): MariaDB-common-11.4.2-1.el7.centos.x86_64.rpm    94 kB/s |  82 kB     00:00
(4/6): MariaDB-client-11.4.2-1.el7.centos.x86_64.rpm   7.3 MB/s |  17 MB     00:02
(5/6): MariaDB-compat-11.4.2-1.el7.centos.x86_64.rpm   1.4 MB/s | 2.2 MB     00:01
(6/6): MariaDB-server-11.4.2-1.el7.centos.x86_64.rpm   7.7 MB/s |  27 MB     00:03
---------------------------------------------------------------------------------------
Total                                                  8.8 MB/s |  46 MB     00:05
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                               1/1
  Running scriptlet: MariaDB-compat-11.4.2-1.el7.centos.x86_64                    1/10
  Upgrading        : MariaDB-compat-11.4.2-1.el7.centos.x86_64                    1/10
  Running scriptlet: MariaDB-compat-11.4.2-1.el7.centos.x86_64                    1/10
  Running scriptlet: MariaDB-common-11.4.2-1.el7.centos.x86_64                    2/10
  Upgrading        : MariaDB-common-11.4.2-1.el7.centos.x86_64                    2/10
  Running scriptlet: MariaDB-common-11.4.2-1.el7.centos.x86_64                    2/10
  Running scriptlet: MariaDB-client-11.4.2-1.el7.centos.x86_64                    3/10
  Upgrading        : MariaDB-client-11.4.2-1.el7.centos.x86_64                    3/10
  Running scriptlet: MariaDB-client-11.4.2-1.el7.centos.x86_64                    3/10
  Running scriptlet: MariaDB-client-compat-11.4.2-1.el7.centos.noarch             4/10
  Installing       : MariaDB-client-compat-11.4.2-1.el7.centos.noarch             4/10
  Running scriptlet: MariaDB-client-compat-11.4.2-1.el7.centos.noarch             4/10
  Running scriptlet: MariaDB-server-compat-11.4.2-1.el7.centos.noarch             5/10
  Installing       : MariaDB-server-compat-11.4.2-1.el7.centos.noarch             5/10
  Running scriptlet: MariaDB-server-compat-11.4.2-1.el7.centos.noarch             5/10
  Running scriptlet: MariaDB-server-11.4.2-1.el7.centos.x86_64                    6/10
******************************************************************
A MySQL or MariaDB server package (MariaDB-server-10.11.8-1.el7.centos.x86_64) is installed.
Upgrading directly from MySQL 10 to MariaDB 11 may not
be safe in all cases.  A manual dump and restore using mysqldump is
recommended.  It is important to review the MariaDB manual&#039;s Upgrading
section for version-specific incompatibilities.
A manual upgrade is required.
- Ensure that you have a complete, working backup of your data and my.cnf
  files
- Shut down the MySQL server cleanly
- Remove the existing MySQL packages.  Usually this command will
  list the packages you should remove:
  rpm -qa | grep -i &#039;^mysql-&#039;
  You may choose to use &#039;rpm --nodeps -ev &#039; to remove
  the package which contains the mysqlclient shared library.  The
  library will be reinstalled by the MariaDB-shared package.
- Install the new MariaDB packages supplied by MariaDB Foundation
- Ensure that the MariaDB server is started
- Run the &#039;mysql_upgrade&#039; program
This is a brief description of the upgrade process.  Important details
can be found in the MariaDB manual, in the Upgrading section.
******************************************************************
error: %pre(MariaDB-server-11.4.2-1.el7.centos.x86_64) scriptlet failed, exit status 1
Error in PREIN scriptlet in rpm package MariaDB-server
  Running scriptlet: MariaDB-client-10.11.8-1.el7.centos.x86_64                   7/10
error: MariaDB-server-11.4.2-1.el7.centos.x86_64: install failed
error: MariaDB-server-10.11.8-1.el7.centos.x86_64: erase skipped
  Cleanup          : MariaDB-client-10.11.8-1.el7.centos.x86_64                   7/10
  Running scriptlet: MariaDB-client-10.11.8-1.el7.centos.x86_64                   7/10
  Running scriptlet: MariaDB-compat-10.11.8-1.el7.centos.x86_64                   8/10
  Cleanup          : MariaDB-compat-10.11.8-1.el7.centos.x86_64                   8/10
  Running scriptlet: MariaDB-compat-10.11.8-1.el7.centos.x86_64                   8/10
  Running scriptlet: MariaDB-common-10.11.8-1.el7.centos.x86_64                   9/10
  Cleanup          : MariaDB-common-10.11.8-1.el7.centos.x86_64                   9/10
  Running scriptlet: MariaDB-common-10.11.8-1.el7.centos.x86_64                   9/10
  Verifying        : MariaDB-client-compat-11.4.2-1.el7.centos.noarch             1/10
  Verifying        : MariaDB-server-compat-11.4.2-1.el7.centos.noarch             2/10
  Verifying        : MariaDB-client-11.4.2-1.el7.centos.x86_64                    3/10
  Verifying        : MariaDB-client-10.11.8-1.el7.centos.x86_64                   4/10
  Verifying        : MariaDB-common-11.4.2-1.el7.centos.x86_64                    5/10
  Verifying        : MariaDB-common-10.11.8-1.el7.centos.x86_64                   6/10
  Verifying        : MariaDB-compat-11.4.2-1.el7.centos.x86_64                    7/10
  Verifying        : MariaDB-compat-10.11.8-1.el7.centos.x86_64                   8/10
  Verifying        : MariaDB-server-11.4.2-1.el7.centos.x86_64                    9/10
  Verifying        : MariaDB-server-10.11.8-1.el7.centos.x86_64                  10/10
Upgraded:
  MariaDB-client-11.4.2-1.el7.centos.x86_64  MariaDB-common-11.4.2-1.el7.centos.x86_64
  MariaDB-compat-11.4.2-1.el7.centos.x86_64
Installed:
  MariaDB-client-compat-11.4.2-1.el7.centos.noarch
  MariaDB-server-compat-11.4.2-1.el7.centos.noarch
Failed:
  MariaDB-server-11.4.2-1.el7.centos.x86_64 MariaDB-server-10.11.8-1.el7.centos.x86_64
Error: Transaction failed&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp; 다른 요소들은 판올림하여 깔 수 있었지만, MariaDB-server-11.4.2-1는 깔지 못하고 실패했다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; mariadb가 제대로 깔리지 않은 상태였기 때문인지, 아래처럼 단순히 mysql_upgrade를 실행하는 것은 보람이 없었다.&lt;/p&gt;
&lt;pre class=&quot;prettyprint &quot;&gt;&lt;code&gt;[user@host ~]# sudo mysql_upgrade
Reading datadir from the MariaDB server failed. Got the following error when executing the &#039;mysql&#039; command line client
ERROR 2026 (HY000): TLS/SSL error: SSL is required, but the server does not support it
FATAL ERROR: Upgrade failed&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp; 또한 아래처럼 dnf update를 실행하더라도 MariaDB-server-11.4.2-1이 깔리지 않는다.&lt;/p&gt;
&lt;pre class=&quot;prettyprint &quot;&gt;&lt;code&gt;[user@host ~]# sudo dnf update
Last metadata expiration check: 0:02:32 ago on Thu 20 Jun 2024 11:40:06 PM KST.
Dependencies resolved.
=======================================================================================
 Package              Arch         Version                    Repository          Size
=======================================================================================
Upgrading:
 MariaDB-server       x86_64       11.4.2-1.el7.centos        mariadb-main        27 M
Transaction Summary
=======================================================================================
Upgrade  1 Package
Total download size: 27 M
Is this ok [y/N]: y
Downloading Packages:
MariaDB-server-11.4.2-1.el7.centos.x86_64.rpm           11 MB/s |  27 MB     00:02
---------------------------------------------------------------------------------------
Total                                                   10 MB/s |  27 MB     00:02
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                               1/1
  Running scriptlet: MariaDB-server-11.4.2-1.el7.centos.x86_64                     1/2
******************************************************************
A MySQL or MariaDB server package (MariaDB-server-10.11.8-1.el7.centos.x86_64) is installed.
Upgrading directly from MySQL 10 to MariaDB 11 may not
be safe in all cases.  A manual dump and restore using mysqldump is
recommended.  It is important to review the MariaDB manual&#039;s Upgrading
section for version-specific incompatibilities.
A manual upgrade is required.
- Ensure that you have a complete, working backup of your data and my.cnf
  files
- Shut down the MySQL server cleanly
- Remove the existing MySQL packages.  Usually this command will
  list the packages you should remove:
  rpm -qa | grep -i &#039;^mysql-&#039;
  You may choose to use &#039;rpm --nodeps -ev &#039; to remove
  the package which contains the mysqlclient shared library.  The
  library will be reinstalled by the MariaDB-shared package.
- Install the new MariaDB packages supplied by MariaDB Foundation
- Ensure that the MariaDB server is started
- Run the &#039;mysql_upgrade&#039; program
This is a brief description of the upgrade process.  Important details
can be found in the MariaDB manual, in the Upgrading section.
******************************************************************
error: %pre(MariaDB-server-11.4.2-1.el7.centos.x86_64) scriptlet failed, exit status 1
Error in PREIN scriptlet in rpm package MariaDB-server
  Verifying        : MariaDB-server-11.4.2-1.el7.centos.x86_64                     1/2
  Verifying        : MariaDB-server-10.11.8-1.el7.centos.x86_64                    2/2
Failed:
  MariaDB-server-11.4.2-1.el7.centos.x86_64 MariaDB-server-10.11.8-1.el7.centos.x86_64
Error: Transaction failed&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp; dnf 로 MariaDB-server(10.11.8-1)를 지우는 것도 아래처럼 막히고 있다.&lt;/p&gt;
&lt;p&gt;&lt;pre class=&quot;prettyprint &quot;&gt;&lt;code&gt;[user@host ~]# sudo dnf remove MariaDB-server
Dependencies resolved.
=======================================================================================
 Package             Arch        Version                      Repository          Size
=======================================================================================
Removing:
 MariaDB-server      x86_64      10.11.8-1.el7.centos         @mariadb-main      141 M
Transaction Summary
=======================================================================================
Remove  1 Package
Freed space: 141 M
Is this ok [y/N]: y
Running transaction check
Error: transaction check vs depsolve:
MariaDB-server &amp;gt;= 11.0.0 is needed by (installed) MariaDB-server-compat-11.4.2-1.el7.centos.noarch
To diagnose the problem, try running: &#039;rpm -Va --nofiles --nodigest&#039;.
You probably have corrupted RPMDB, running &#039;rpm --rebuilddb&#039; might fix the issue.&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; rpm 명령으로 mariadb가 들어가는 깔린 꾸러미(패키지)들이 무엇인지 알아 본다.&lt;/p&gt;
&lt;p&gt;&lt;pre class=&quot;prettyprint &quot;&gt;&lt;code&gt;[user@host ~]# sudo rpm -qa | grep -i &quot;^mariadb&quot;
MariaDB-compat-11.4.2-1.el7.centos.x86_64
MariaDB-client-compat-11.4.2-1.el7.centos.noarch
MariaDB-common-11.4.2-1.el7.centos.x86_64
MariaDB-server-compat-11.4.2-1.el7.centos.noarch
MariaDB-server-10.11.8-1.el7.centos.x86_64
MariaDB-client-11.4.2-1.el7.centos.x86_64&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; 앞에서 dnf를 실행했을 때에 나온 설명을 참고하여, 아래처럼 rpm 명령으로 MariaDB-server-10.11.8-1.el7.centos.x86_64을 지운다.&lt;/p&gt;
&lt;pre class=&quot;prettyprint &quot;&gt;&lt;code&gt;[user@host ~]# sudo rpm --nodeps -ev MariaDB-server-10.11.8-1.el7.centos.x86_64
 Preparing packages...
 MariaDB-server-10.11.8-1.el7.centos.x86_64&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp; 이렇게 하면 MariaDB-server가 깔리지 않은 상태가 되므로, 아래처럼 MariaDB-server를 새로 깔 수 있다.&lt;/p&gt;
&lt;pre class=&quot;prettyprint &quot;&gt;&lt;code&gt;[user@host ~]# sudo dnf install MariaDB-server
Last metadata expiration check: 0:05:54 ago on Thu 20 Jun 2024 11:40:06 PM KST.
Dependencies resolved.
=======================================================================================
 Package              Arch         Version                    Repository          Size
=======================================================================================
Installing:
 MariaDB-server       x86_64       11.4.2-1.el7.centos        mariadb-main        27 M
Transaction Summary
=======================================================================================
Install  1 Package
Total download size: 27 M
Installed size: 137 M
Is this ok [y/N]: y
Downloading Packages:
MariaDB-server-11.4.2-1.el7.centos.x86_64.rpm          9.8 MB/s |  27 MB     00:02
---------------------------------------------------------------------------------------
Total                                                  9.8 MB/s |  27 MB     00:02
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                               1/1
  Running scriptlet: MariaDB-server-11.4.2-1.el7.centos.x86_64                     1/1
  Installing       : MariaDB-server-11.4.2-1.el7.centos.x86_64                     1/1
  Running scriptlet: MariaDB-server-11.4.2-1.el7.centos.x86_64                     1/1
  Verifying        : MariaDB-server-11.4.2-1.el7.centos.x86_64                     1/1
Installed:
  MariaDB-server-11.4.2-1.el7.centos.x86_64
Complete!&lt;/code&gt;&lt;/pre&gt;</summary>
  </entry>
  <entry>
    <title type="html">[memcached] Too many open files</title>
    <link rel="alternate" type="text/html" href="https://error.note.tc/entry/memcached-Too-many-open-files" />
    <link rel="replies" type="application/atom+xml" href="https://error.note.tc/atom/response/76" thr:count="0"/>
    <category term="Linux 일반" />
    <category term="캐시" />
    <category term="리눅스" />
    <category term="unix socket" />
    <category term="memcached" />
    <category term="linux" />
    <category term="file" />
    <category term="cache" />
    <author>
      <name>깜빡쟁이</name>
    </author>
    <id>https://error.note.tc/entry/memcached-Too-many-open-files</id>
    <updated>2024-07-27T13:55:33+09:00</updated>
    <published>2024-07-27T13:55:33+09:00</published>
    <summary type="html">&lt;p&gt;&amp;nbsp; memcached의 설정 파일인 /etc/sysconfig/memcached에서 MAXCONN의 기본값은 아래와 같다.&lt;/p&gt;
&lt;pre class=&quot;prettyprint &quot;&gt;&lt;code&gt;MAXCONN=&quot;1024&quot;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp; 이 값을 너무 낮추면 아래처럼 오류가 뜰 수 있다.&lt;br /&gt;&lt;br /&gt;&lt;figure class=&quot;imageblock center&quot; style=&quot;text-align: center; clear: both;&quot;&gt;&lt;a href=&quot;/attach/6/4064767665.webp&quot; data-lightbox=&quot;lightbox[1group076]&quot; title=&quot;&quot; class=&quot;lightbox-image-css&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;/attach/6/4064767665.webp&quot;  width=&quot;700&quot; height=&quot;146&quot; alt=&quot;사용자 삽입 이미지&quot; loading=&quot;lazy&quot; &gt;&lt;/a&gt;&lt;/figure&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;# systemctl status memcached&lt;br /&gt;&amp;times; memcached.service - memcached daemon&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Loaded: loaded (/usr/lib/systemd/system/memcached.service; enabled; preset: disabled)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Active: failed (Result: exit-code) since Sat 2024-07-27 09:08:49 KST; 3s ago&lt;br /&gt;&amp;nbsp;&amp;nbsp; Duration: 32ms&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Process: 39005 ExecStart=/usr/bin/memcached -p ${PORT} -u ${USER} -m ${CACHESIZE} -c ${MAXCONN} $OPTIONS (code=exited, status=1/FAILURE)&lt;br /&gt;&amp;nbsp;&amp;nbsp; Main PID: 39005 (code=exited, status=1/FAILURE)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CPU: 15ms&lt;br /&gt;&lt;br /&gt;Jul 27 09:08:49 server_name systemd[1]: Started memcached daemon.&lt;br /&gt;Jul 27 09:08:49 server_name memcached[39005]: [warn] evutil_make_internal_pipe_: pipe: Too many open files&lt;br /&gt;Jul 27 09:08:49 server_name memcached[39005]: [err] evsig_init_: socketpair: Too many open files&lt;br /&gt;Jul 27 09:08:49 server_name systemd[1]: memcached.service: Main process exited, code=exited, status=1/FAILURE&lt;br /&gt;Jul 27 09:08:49 server_name systemd[1]: memcached.service: Failed with result &#039;exit-code&#039;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;# systemctl status memcached&lt;br /&gt;&amp;times; memcached.service - memcached daemon&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Loaded: loaded (/usr/lib/systemd/system/memcached.service; enabled; preset: disabled)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Active: failed (Result: exit-code) since Sat 2024-07-27 09:09:33 KST; 1s ago&lt;br /&gt;&amp;nbsp;&amp;nbsp; Duration: 17ms&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Process: 39032 ExecStart=/usr/bin/memcached -p ${PORT} -u ${USER} -m ${CACHESIZE} -c ${MAXCONN} $OPTIONS (code=exited, status=71)&lt;br /&gt;&amp;nbsp;&amp;nbsp; Main PID: 39032 (code=exited, status=71)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CPU: 16ms&lt;br /&gt;&lt;br /&gt;Jul 27 09:09:33 server_name systemd[1]: Started memcached daemon.&lt;br /&gt;Jul 27 09:09:33 server_name memcached[39032]: socket(): Too many open files&lt;br /&gt;Jul 27 09:09:33 server_name memcached[39032]: failed to listen on UNIX socket: /.../memcached.sock: Too many open files&lt;br /&gt;Jul 27 09:09:33 server_name systemd[1]: memcached.service: Main process exited, code=exited, status=71/OSERR&lt;br /&gt;Jul 27 09:09:33 server_name systemd[1]: memcached.service: Failed with result &#039;exit-code&#039;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&amp;nbsp; MAXCONN 값이 기본적으로 열어야 하는 파일의 수만큼은 되어야 하는 것 같다. 때에 따라 다르겠지만, 시험해 보았을 때는 MAXCONN 값이 27보다 작게 하면 위와 같은 오류가 떴다.&lt;/p&gt;</summary>
  </entry>
  <entry>
    <title type="html">[PHP] Non-static method cannot be called statically</title>
    <link rel="alternate" type="text/html" href="https://error.note.tc/entry/PHP-Non-static-method-cannot-be-called-statically" />
    <link rel="replies" type="application/atom+xml" href="https://error.note.tc/atom/response/74" thr:count="0"/>
    <category term="PHP" />
    <category term="static function" />
    <category term="PHP" />
    <category term="non-static function" />
    <category term="method" />
    <category term="function" />
    <category term="fatal error" />
    <category term="deprecated" />
    <category term="class" />
    <author>
      <name>깜빡쟁이</name>
    </author>
    <id>https://error.note.tc/entry/PHP-Non-static-method-cannot-be-called-statically</id>
    <updated>2024-07-11T23:47:03+09:00</updated>
    <published>2024-07-11T21:29:59+09:00</published>
    <summary type="html">&lt;pre class=&quot;prettyprint &quot;&gt;&lt;code&gt;class Class_Name {
    function Method_name($param1 = null, $param2 = null) {
       ...
    }
}&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;prettyprint &quot;&gt;&lt;code&gt;Class_name::Method_name($a, $b);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp; PHP 8 이상에서 위처럼 non-static 메소드를 static 메소드처럼 다루면 아래와 같은 오류가 날 수 있다.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;PHP Fatal error:&amp;nbsp; Uncaught Error: Non-static method Class_name::Method_name() cannot be called statically in /.../.../???.php:115&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&amp;nbsp; 다음 두 가지 방법으로 이 오류를 없앨 수 있다.&lt;/p&gt;
&lt;h2&gt;(1) static 메소드로 바꾸기&lt;/h2&gt;
&lt;p&gt;&amp;nbsp; 클래스의 메소드를 non-static에서 static 메소드로 바꾸면 메소드를 이용하는 곳의 부호글은 고치지 않아도 된다.&lt;/p&gt;
&lt;pre class=&quot;prettyprint &quot;&gt;&lt;code&gt;static class Class_Name {
    static function Method_name($param1 = null, $param2 = null) {
       ...
    }
}&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;prettyprint &quot;&gt;&lt;code&gt;Class_name::Method_name($a, $b);&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;(2) non-static 메소드에 맞는 접근 방식으로 바꾸기&lt;/h2&gt;
&lt;p&gt;&amp;nbsp; 메소드를 이용하는 곳의 접근 방식을 non-static 메소드에 맞게 고친다.&lt;/p&gt;
&lt;pre class=&quot;prettyprint &quot;&gt;&lt;code&gt;static class Class_Name {
    static function Method_name($param1 = null, $param2 = null) {
       ...
    }
}&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;prettyprint &quot;&gt;&lt;code&gt;(new Class_name)-&amp;gt;Method_name($a, $b);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp; 클래스의 멤버 함수(메소드) 하나를 한 번만 쏙 뽑아 쓰는 때에는 (2)보다 (1)가 간결하기는 하다.&lt;/p&gt;</summary>
  </entry>
  <entry>
    <title type="html">[nginx] Can&#039;t open PID file /var/run/nginx.pid (yet?) after start: No such file or directory</title>
    <link rel="alternate" type="text/html" href="https://error.note.tc/entry/nginx-Cant-open-PID-file-varrunnginxpid-yet-after-start-No-such-file-or-directory" />
    <link rel="replies" type="application/atom+xml" href="https://error.note.tc/atom/response/41" thr:count="0"/>
    <category term="nginx" />
    <category term="systemd" />
    <category term="sleep" />
    <category term="nginx.service" />
    <category term="nginx.conf" />
    <category term="nginx" />
    <category term="linux" />
    <category term="ExexStartPost" />
    <author>
      <name>깜빡쟁이</name>
    </author>
    <id>https://error.note.tc/entry/nginx-Cant-open-PID-file-varrunnginxpid-yet-after-start-No-such-file-or-directory</id>
    <updated>2024-07-10T01:53:53+09:00</updated>
    <published>2024-07-10T01:52:59+09:00</published>
    <summary type="html">&lt;blockquote&gt;
&lt;p&gt;-- Unit nginx.service has begun starting up.&lt;br /&gt;Jan 15 01:40:19 test_server systemd[1]: &lt;strong&gt;Can&#039;t open PID file /var/run/nginx.pid (yet?) after start: No such file or directory&lt;/strong&gt;&lt;br /&gt;Jan 15 01:40:19 test_server systemd[1]: Started nginx - high performance web server.&lt;br /&gt;-- Subject: Unit nginx.service has finished start-up&lt;br /&gt;-- Defined-By: systemd&lt;br /&gt;-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel&lt;br /&gt;--&lt;br /&gt;-- Unit nginx.service has finished starting up.&lt;br /&gt;--&lt;br /&gt;-- The start-up result is done.&lt;br /&gt;Jan 15 01:40:19 test_server polkitd[588]: Unregistered Authentication Agent for unix-process:21917:95474130 (system bus name :1.15088, object path /org/freedesktop/&lt;br /&gt;~&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&amp;nbsp; PID 파일이 만들어지는 찰나의 시간차 때문에 생긴 오류가 아닌가 싶다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; 다음 글에서는 nginx.service 파일의 ExecStartPost 값에 sleep 명령을 넣는 방법이 소개되어 있다.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://god-logger.tistory.com/81&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;nginx.service: Can&#039;t open PID file /run/nginx.pid (yet?) after start: Operation not permitted 이슈 해결 방안 &amp;mdash; 문제해결집&lt;/a&gt; (https://god-logger.tistory.com/81)&lt;/li&gt;
&lt;/ul&gt;</summary>
  </entry>
  <entry>
    <title type="html">[PHP] count(): Argument #1 ($value) must be of type Countable|array, null given ...</title>
    <link rel="alternate" type="text/html" href="https://error.note.tc/entry/PHP-count-Argument-1-must-be-of-type-Countable%7Carray-null-given" />
    <link rel="replies" type="application/atom+xml" href="https://error.note.tc/atom/response/72" thr:count="0"/>
    <category term="PHP" />
    <category term="함수" />
    <category term="배열" />
    <category term="TypeError" />
    <category term="PHP" />
    <category term="is_countable" />
    <category term="function" />
    <category term="fatal error" />
    <category term="countable" />
    <category term="count" />
    <category term="array" />
    <author>
      <name>깜빡쟁이</name>
    </author>
    <id>https://error.note.tc/entry/PHP-count-Argument-1-must-be-of-type-Countable%7Carray-null-given</id>
    <updated>2024-07-09T18:42:04+09:00</updated>
    <published>2024-07-09T18:40:36+09:00</published>
    <summary type="html">&lt;blockquote&gt;
&lt;p&gt;PHP Fatal error:&amp;nbsp; Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /&amp;hellip;/&amp;hellip;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&amp;nbsp; 배열이나 객체의 원소 수를 셀 때 count 함수를 쓰곤 한다. PHP 8 이상에서 셀 수 있는 객체나 변수를 count 함수로 세려고 하면 위와 같은 오류가 나올 수 있다. PHP 7까지는 없던 제한이다.&lt;/p&gt;
&lt;pre class=&quot;prettyprint &quot;&gt;&lt;code&gt;$a = count($b);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp; $b가 null 값이거나 셀 수 없는 것이면 오류가 날 수 있다. 아래처럼 바꾸어 주면 PHP 7에서와 같은 결과를 얻을 수 있다.&lt;/p&gt;
&lt;pre class=&quot;prettyprint &quot;&gt;&lt;code&gt;$a = is_countable($b) ? count($b) : 0;&lt;/code&gt;&lt;/pre&gt;</summary>
  </entry>
  <entry>
    <title type="html">[PHP/SElinux] opcache JIT 기능을 켰을 때의 &#039;502 Bad Gateway&#039;</title>
    <link rel="alternate" type="text/html" href="https://error.note.tc/entry/PHP-SElinux-opcache-JIT-502-Bad-Gateway" />
    <link rel="replies" type="application/atom+xml" href="https://error.note.tc/atom/response/73" thr:count="0"/>
    <category term="SELinux" />
    <category term="보안 강화 리눅스" />
    <category term="리눅스" />
    <category term="setsebool" />
    <category term="semodule_package" />
    <category term="semodule" />
    <category term="SELinux" />
    <category term="PHP-FPM" />
    <category term="PHP" />
    <category term="opcache" />
    <category term="nginx" />
    <category term="linux" />
    <category term="JIT" />
    <category term="httpd_t" />
    <category term="httpd_execmem" />
    <category term="checkmodule" />
    <category term="centos" />
    <category term="audit2why" />
    <category term="audit2allow" />
    <category term="audit.log" />
    <category term="AlmaLinux" />
    <category term="502 error" />
    <category term="502 Bad Gateway" />
    <author>
      <name>깜빡쟁이</name>
    </author>
    <id>https://error.note.tc/entry/PHP-SElinux-opcache-JIT-502-Bad-Gateway</id>
    <updated>2024-07-08T14:44:20+09:00</updated>
    <published>2024-07-08T10:49:06+09:00</published>
    <summary type="html">&lt;figure class=&quot;imageblock center&quot; style=&quot;text-align: center; clear: both;&quot;&gt;&lt;a href=&quot;/attach/6/8257889356.png&quot; data-lightbox=&quot;lightbox[1group073]&quot; title=&quot;502 Bad Gateway (nginx error)&quot; class=&quot;lightbox-image-css&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;/attach/6/8257889356.png&quot;  width=&quot;498&quot; height=&quot;125&quot; alt=&quot;502 Bad Gateway (nginx error)&quot; loading=&quot;lazy&quot; &gt;&lt;/a&gt;&lt;/figure&gt;
&lt;p&gt;&amp;nbsp; PHP에 들어간 opcache의 JIT 기능을 켜면 &#039;502 Bad Gateway&#039; 오류가 떴는데, Selinux를 끄면 오류가 나지 않으므로 SELinux에 원인이 있었다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; Centos Stream 9로 돌리는 웹 서버에서는 Selinux를 끄고 php-fpm을 다시 실행하면 502 오류가 다시 뜨지 않았지만, 알마리눅스(AlmaLinux) 9.4로 돌리는 웹 서버는 Selinux를 끄면 502 오류가 다시 나왔다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; audit2why와 audit2allow로 audit 로그(audit.log)와 해결 정보를 살폈다.&lt;/p&gt;
&lt;pre class=&quot;prettyprint &quot;&gt;&lt;code&gt;# audit2why &amp;lt; /var/log/audit/audit.log&lt;br /&gt;...&lt;br /&gt;type=AVC msg=audit(1720401420.710:1162): avc:  denied  { execmem } for  pid=2633 comm=&quot;php-fpm&quot; scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:system_r:httpd_t:s0 tclass=process permissive=1&lt;br /&gt;&lt;br /&gt;        Was caused by:&lt;br /&gt;        The boolean httpd_execmem was set incorrectly.&lt;br /&gt;        Description:&lt;br /&gt;        Allow httpd to execmem&lt;br /&gt;&lt;br /&gt;        Allow access by executing:&lt;br /&gt;        # setsebool -P httpd_execmem 1&lt;br /&gt;...&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;prettyprint &quot;&gt;&lt;code&gt;# audit2allow -a&lt;br /&gt;&lt;br /&gt;#============= httpd_t ==============&lt;br /&gt;&lt;br /&gt;#!!!! This avc can be allowed using the boolean &#039;httpd_unified&#039;&lt;br /&gt;allow httpd_t httpd_user_content_t:dir create;&lt;br /&gt;&lt;br /&gt;#!!!! This avc can be allowed using the boolean &#039;httpd_execmem&#039;&lt;br /&gt;allow httpd_t self:process execmem;&lt;br /&gt;allow httpd_t var_run_t:file { read write };&lt;br /&gt;...&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp; httpd_execmem에 관한 권한이 원인이었던 것 같다. &lt;a href=&quot;https://error.note.tc/entry/selinux-recv-failed-104-Connection-reset-by-peer-while-reading-response-header-from-upstream&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;[SELinux] recv() failed (104: Connection reset by peer) while reading response header from upstream...&lt;/a&gt;에서 이야기한 nginx-passenger.te 파일에 아래 내용을 더 넣어 주었다.&lt;pre class=&quot;prettyprint &quot;&gt;&lt;code&gt;module nginx-passenger 1.0;&lt;br /&gt;require {&lt;br /&gt;...&lt;br /&gt;#============= httpd_t ==============&lt;br /&gt;...&lt;br /&gt;&lt;strong&gt;allow httpd_t self:process execmem;&lt;br /&gt;allow httpd_t var_run_t:file { read write };&lt;/strong&gt;&lt;br /&gt;...&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;그리고 보안 규칙을 다시 적용시킨다.&lt;/p&gt;
&lt;pre class=&quot;prettyprint &quot;&gt;&lt;code&gt;# checkmodule -M -m -o nginx-passenger.mod nginx-passenger.te&lt;br /&gt;checkmodule:  loading policy configuration from nginx-passenger.te&lt;br /&gt;checkmodule:  policy configuration loaded&lt;br /&gt;checkmodule:  writing binary representation (version 19) to nginx-passenger.mod&lt;br /&gt;&lt;br /&gt;# semodule_package -o nginx-passenger.pp -m nginx-passenger.mod&lt;br /&gt;# semodule -i nginx-passenger.pp&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp; 보안 규칙을 다시 적용한 뒤에는 opcache의 JIT 기능을 켜도 502 bad gatewate가 뜨지 않았다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; 보안 규칙을 적용하지 않고, 위에 나온 것처럼 &#039;setsebool -P httpd_execmem 1&#039;를 실행하는 방법을 쓸 수도 있을 것이다.&lt;/p&gt;
&lt;h3&gt;※ 참고&lt;/h3&gt;
&lt;a href=&quot;https://hoing.io/archives/15882&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Nginx PHP-FPM SELinux 정책 추가 내역 | Hoing&lt;/a&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</summary>
  </entry>
  <entry>
    <title type="html">[curl] SSL certificate problem: unable to get local issuer certificate</title>
    <link rel="alternate" type="text/html" href="https://error.note.tc/entry/curl-SSL-certificate-problem-unable-to-get-local-issuer-certificate" />
    <link rel="replies" type="application/atom+xml" href="https://error.note.tc/atom/response/58" thr:count="0"/>
    <category term="Linux 일반" />
    <category term="인증서" />
    <category term="구글" />
    <category term="TLS" />
    <category term="SSL" />
    <category term="linux" />
    <category term="HTTPS" />
    <category term="google" />
    <category term="curl" />
    <category term="certificate" />
    <author>
      <name>깜빡쟁이</name>
    </author>
    <id>https://error.note.tc/entry/curl-SSL-certificate-problem-unable-to-get-local-issuer-certificate</id>
    <updated>2024-07-11T23:45:33+09:00</updated>
    <published>2024-07-04T11:13:15+09:00</published>
    <summary type="html">&lt;p&gt;&amp;nbsp; 신뢰할 수 있는 인증 기관으로 등록되지 않은 SSL/TLS 인증서를 쓰는 곳을 curl로 접근하먼 이런 오류를 겪을 수 있다. 구글(google) 인증서를 쓰는 곳에서 그럴 수 있다.&lt;/p&gt;
&lt;pre class=&quot;prettyprint &quot;&gt;&lt;code&gt;# curl https://www...&lt;br /&gt;curl: (60) SSL certificate problem: unable to get local issuer certificate&lt;br /&gt;More details here: https://curl.se/docs/sslcerts.html&lt;br /&gt;&lt;br /&gt;curl failed to verify the legitimacy of the server and therefore could not&lt;br /&gt;establish a secure connection to it. To learn more about this situation and&lt;br /&gt;how to fix it, please visit the web page mentioned above.&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp; &#039;-k&#039;(또는 &#039;--insecure&#039;)와 &#039;-L google.com&#039;을 붙여서 인증서 검증을 하지 않게 할 수 있다.&lt;/p&gt;
&lt;pre class=&quot;prettyprint &quot;&gt;&lt;code&gt;# curl -k -L google.com https://www..&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;prettyprint &quot;&gt;&lt;code&gt;# curl --insecure -L google.com https://www...&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp; 신뢰할 수 있는 인증서 목록에 넣으려면&lt;/p&gt;
&lt;pre class=&quot;prettyprint &quot;&gt;&lt;code&gt;# curl -v https://google.com&lt;br /&gt;*   Trying 2607:f8b0:4009:81b::200e:443...&lt;br /&gt;* Connected to google.com (2607:f8b0:4009:81b::200e) port 443 (#0)&lt;br /&gt;* ALPN, offering h2&lt;br /&gt;* ALPN, offering http/1.1&lt;br /&gt;*  CAfile: /etc/pki/tls/certs/ca-bundle.crt&lt;br /&gt;* TLSv1.0 (OUT), TLS header, Certificate Status (22):&lt;br /&gt;* TLSv1.3 (OUT), TLS handshake, Client hello (1):&lt;br /&gt;* TLSv1.2 (IN), TLS header, Certificate Status (22):&lt;br /&gt;* TLSv1.3 (IN), TLS handshake, Server hello (2):&lt;br /&gt;* TLSv1.2 (IN), TLS header, Finished (20):&lt;br /&gt;* TLSv1.2 (IN), TLS header, Unknown (23):&lt;br /&gt;* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):&lt;br /&gt;* TLSv1.3 (IN), TLS handshake, Certificate (11):&lt;br /&gt;* TLSv1.3 (IN), TLS handshake, CERT verify (15):&lt;br /&gt;* TLSv1.3 (IN), TLS handshake, Finished (20):&lt;br /&gt;* TLSv1.2 (OUT), TLS header, Finished (20):&lt;br /&gt;* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):&lt;br /&gt;* TLSv1.2 (OUT), TLS header, Unknown (23):&lt;br /&gt;* TLSv1.3 (OUT), TLS handshake, Finished (20):&lt;br /&gt;* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384&lt;br /&gt;* ALPN, server accepted to use h2&lt;br /&gt;* Server certificate:&lt;br /&gt;*  subject: CN=*.google.com&lt;br /&gt;*  start date: Dec 11 08:03:31 2023 GMT&lt;br /&gt;*  expire date: Mar  4 08:03:30 2024 GMT&lt;br /&gt;*  subjectAltName: host &quot;google.com&quot; matched cert&#039;s &quot;google.com&quot;&lt;br /&gt;*  issuer: C=US; O=Google Trust Services LLC; CN=GTS CA 1C3&lt;br /&gt;*  SSL certificate verify ok.&lt;br /&gt;* Using HTTP2, server supports multi-use&lt;br /&gt;* Connection state changed (HTTP/2 confirmed)&lt;br /&gt;* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0&lt;br /&gt;* TLSv1.2 (OUT), TLS header, Unknown (23):&lt;br /&gt;* TLSv1.2 (OUT), TLS header, Unknown (23):&lt;br /&gt;* TLSv1.2 (OUT), TLS header, Unknown (23):&lt;br /&gt;* Using Stream ID: 1 (easy handle 0x55bacf75c540)&lt;br /&gt;* TLSv1.2 (OUT), TLS header, Unknown (23):&lt;br /&gt;&amp;gt; GET / HTTP/2&lt;br /&gt;&amp;gt; Host: google.com&lt;br /&gt;&amp;gt; user-agent: curl/7.76.1&lt;br /&gt;&amp;gt; accept: */*&lt;br /&gt;&amp;gt;&lt;br /&gt;* TLSv1.2 (IN), TLS header, Unknown (23):&lt;br /&gt;* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):&lt;br /&gt;* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):&lt;br /&gt;* old SSL session ID is stale, removing&lt;br /&gt;* TLSv1.2 (IN), TLS header, Unknown (23):&lt;br /&gt;* TLSv1.2 (OUT), TLS header, Unknown (23):&lt;br /&gt;* TLSv1.2 (IN), TLS header, Unknown (23):&lt;br /&gt;* TLSv1.2 (IN), TLS header, Unknown (23):&lt;br /&gt;&amp;lt; HTTP/2 301&lt;br /&gt;&amp;lt; location: https://www.google.com/&lt;br /&gt;&amp;lt; content-type: text/html; charset=UTF-8&lt;br /&gt;&amp;lt; content-security-policy-report-only: object-src &#039;none&#039;;base-uri &#039;self&#039;;script-src &#039;nonce-A71EtqVLshhMqBU3l6geSg&#039; &#039;strict-dynamic&#039; &#039;report-sample&#039; &#039;unsafe-eval&#039; &#039;unsafe-inline&#039; https: http:;report-uri https://csp.withgoogle.com/csp/gws/other-hp&lt;br /&gt;&amp;lt; date: Sat, 13 Jan 2024 20:31:41 GMT&lt;br /&gt;&amp;lt; expires: Mon, 12 Feb 2024 20:31:41 GMT&lt;br /&gt;&amp;lt; cache-control: public, max-age=2592000&lt;br /&gt;&amp;lt; server: gws&lt;br /&gt;&amp;lt; content-length: 220&lt;br /&gt;&amp;lt; x-xss-protection: 0&lt;br /&gt;&amp;lt; x-frame-options: SAMEORIGIN&lt;br /&gt;&amp;lt; alt-svc: h3=&quot;:443&quot;; ma=2592000,h3-29=&quot;:443&quot;; ma=2592000&lt;br /&gt;&amp;lt;&lt;br /&gt;* TLSv1.2 (IN), TLS header, Unknown (23):&lt;br /&gt;&amp;lt;HTML&amp;gt;&amp;lt;HEAD&amp;gt;&amp;lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html;charset=utf-8&quot;&amp;gt;&lt;br /&gt;&amp;lt;TITLE&amp;gt;301 Moved&amp;lt;/TITLE&amp;gt;&amp;lt;/HEAD&amp;gt;&amp;lt;BODY&amp;gt;&lt;br /&gt;&amp;lt;H1&amp;gt;301 Moved&amp;lt;/H1&amp;gt;&lt;br /&gt;The document has moved&lt;br /&gt;&amp;lt;A HREF=&quot;https://www.google.com/&quot;&amp;gt;here&amp;lt;/A&amp;gt;.&lt;br /&gt;&amp;lt;/BODY&amp;gt;&amp;lt;/HTML&amp;gt;&lt;br /&gt;* TLSv1.2 (IN), TLS header, Unknown (23):&lt;br /&gt;* Connection #0 to host google.com left intact&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp; 위에 보이는 /etc/pki/tls/certs/ca-bundle.crt 파일에 신뢰할 수 있는 인증서 목록이 들어가므로, 이 목록에 문제가 되는 인증서 정보를 끼워 넣으면 된다. (아래 글들에 자세한 방법이 나옴)&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://frankler.tistory.com/43&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;[curl] (60) server certificate verification failed. 문제 해결 방법&lt;/a&gt;&lt;br /&gt;(https://frankler.tistory.com/43)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.lesstif.com/gitbook/https-ssl-curl-web-browser-16744456.html&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;https 연결시 서버의 SSL 인증서 추출하기 (curl 또는 web browser 사용)&lt;/a&gt;&lt;br /&gt;(https://www.lesstif.com/gitbook/https-ssl-curl-web-browser-16744456.html)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;※ 참고한 글&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://www.lesstif.com/gitbook/curl-ca-cert-15892500.html&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;curl 에 신뢰하는 인증기관 인증서(CA Cert) 추가하기&lt;/a&gt;&lt;br /&gt;(https://www.lesstif.com/gitbook/curl-ca-cert-15892500.html)&lt;/li&gt;
&lt;/ul&gt;</summary>
  </entry>
</feed>
