V-antena and Tanimoto's page

谷本の備忘録・雑記帳・work

>

カテゴリー: Troubles errors

CATEGORY ARCHIVE

WEBサーバーの異常をメールで知るためにLan内専用のメールサーバーを構築する事にした。

いろんなサイトを参考にしたが、"Job for dovecot.socket failed." が発生して手こずったので記録として残す。

環境・前提条件

OS   : Raspberry pi OS (Buster)
SSL   : letsencrypt
protocol : とりあえずエラーにならなかったもの 

lan内に限るので、認証やsslは取り合えず行わない。また、当面メールボックスで行う

参考にしたサイト

Job for dovecot.socket failed. が発生することが多く、最終的に下記サイトを参考にした。
'https://qiita.com/bzy/items/6edc8cfe48cba3eacb18'

パラーメタの説明は、下記サイトが参考になる
' https://w.atwiki.jp/sanosoft/pages/155.html '

ユーザーの追加

sudo useradd user-name -s /sbin/nologin
sudo passwd user-name

パスワードを入れ間違えたときは
sudo passwd -d user-name    でパスワード消去して登録しなおす

sudo mkdir /home/user-name
sudo chown user-name:user-name /home/user-name

postfixのインストール

ほとんど設定は上記サイトに従った。それゆえ詳細は上記サイトの方が詳しいです。
なお、aptでのインストール中の質問に対しては、 'http://memorandum.cloud/2020/09/22/メールサーバー構築postfixdovecot-raspberry-pi%EF%BC%88ラズベリーパイ/' を参考にした。

sudo apt install postfix
sudo nano /etc/postfix/main.cf
myhostname = mydomain.com
mydomain = mydomain.com
mydestination = $myhostname, localhost.$mydomain, localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 192.168.0.0/24
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = ipv4

ポート番号を25から587に変更する

sudo nano /etc/postfix/master.cf
587      inet  n       -       y       -       -       smtpd

dovecotのインストール

sudo apt install dovecot-pop3d
sudo nano /etc/dovecot/dovecot.conf
disable_plaintext_auth = no
# Enable installed protocols
protocols=pop3
listen = *
sudo nano /etc/dovecot/conf.d/10-auth.conf
disable_plaintext_auth = no
auth_mechanisms = plain
sudo nano /etc/dovecot/conf.d/10-mail.conf
mail_location = mbox:~/mail:INBOX=/var/mail/%u
sudo nano /etc/dovecot/conf.d/10-master.conf
unix_listener /var/spool/postfix/private/auth {
    mode = 0666
    user = postfix
    group = postfix
}

service pop3-login {
  inet_listener pop3 {
    port = 110
  }
  inet_listener pop3s {
  #  port = 995
  #  ssl = yes
  }
}
sudo nano /etc/dovecot/conf.d/15-mailboxes.conf
# NOTE: Assumes "namespace inbox" has been defined in 10-mail.conf.
namespace inbox {
  inbox = yes           #  <-   この部分を追加

再起動

sudo systemctl restart postfix
sudo systemctl restart dovecot

一応、これでようやく動いた  (いろいろ行ったので一部記入もれあるかも)

昨日まで出来ていたのに段落ブロックや整形済みブロックにテキストの貼り付けができなくなった。

朝、function.phpを少し変更したので、元に戻してみたり再起動も試したがそれでも同じ。ネットで検索しても該当するものが見当たらない。IEからChoromeに変えたらできたという記事があったので、Microsoft EdgeからFirefoxに変えてみたところコピペ機能復活。 理由は不明。

WordPressをインストールし、新規投稿をしようとすると、「更新に失敗しました。 返答が正しい json レスポンスではありません。」と表示されるトラブルが起こった。 その際に行った対応策を備忘録として残す。

私の場合、2つの原因があった。

原因1: Apacheにrewriteを登録するのを忘れていた。

対応1: 以下のコマンドを実行しApache再起動
sudo a2enmod rewrite

原因2: Apacheにoverrideを許可していなかった

対応2: 下記の様にConfigファイルを修正してoverrideを許可した。その後Apache再起動。
sudo nano /etc/apache2/apache2.conf
以下のところを変更 (AllowOverrideの値をNoneからAllへ変更)

<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
</Directory>

WordPressで画面を遷移しようとした時に、「サイトに重大なエラーがありました」と表示されたので、原因を調べる際に行った事。

対応方針:デバッグモードにして問題個所を調べた。

sudo nano /var/www/html/wordpress/wp-config.php
にて、configファイル内容を変更してデバッグモードにして調べた。

変更前: define( 'WP_DEBUG', false );

変更後: define( 'WP_DEBUG', true );

恵安の2inタブレット(32GB)でのwindows10 update

恵安の2inタブレット(KBM100K windows10 64bit emmc 32GB)を使っているが、容量が少なくてどうしても大型のwindows updateが出来なかった。それで、windows10のクリーンインストールしたところwifi用のデバイスBroadcom 802.11ac WDI SDIO Adapterがcode 10で開始しない。
 いろいろネットで調べたがなかなかわからなかったが、最終的に対処できたので、記録として残す。

I have a Keian's tablet PC KBM100K (windows 10 64bit ,emmc 32GB). And it had encounterd a difficulty of majar windows update by shortage of storage capacity of C drive. So I did clean installtion of windows 10 into my tablet.

But unfortunately a code 10 error occured at the wifi device driver for Broadcom 802.11ac WDI SDIO Adapter.

After many struggles, I could fix that problem. So Irecord the measures.

1.タブレット
  KEIAN KBM100K windows10 64bit 64bit emmc 32GB

  1. My tablet PC
    KEIAN KBM100K windows10 64bit 64bit emmc 32GB
  1. トラブルの内容
    Broadcom 802.11ac WDI SDIO Adapte (code 10)
    ※This Device Cannot start (Code 10)
  1. Description of the trouble.
    Broadcom 802.11ac WDI SDIO Adapte (code 10)
    ※This Device Cannot start (Code 10)
  1. 対処
    3.1 Fix of problem 3.1 デバイスドライバーを1.596.12.1にするMicrosoft Update カタログ(*1)から Broadcom 802.11ac WDI SDIO Adapterで検索し、 「Windows 10 and Later Servicing Drivers for testing, Windows 10 Anniversary Update and Later Servicing Drivers 」 バージョン 1.596.12.1 をダウンロードし、デバイスマネージャーを 使ってドライバを更新する。 (*1) https://www.catalog.update.microsoft.com/Home.aspx

3.1 Update the device driver to version 1.596.12.1
Access the Microsoft Update catalog(*1) and search the corresponding drivers with 'Broadcom 802.11ac WDI SDIO Adapter'. Then download the driver ( Windows 10 and Later Servicing Drivers for testing, Windows 10 Anniversary Update and Later Servicing Drivers) version 1.596.12.1 and update the device driver with the downloaded driver by using Device Manager.
(*1) https://www.catalog.update.microsoft.com/Home.aspx

3.2 4345r6nvram.txtを入手し、c:\windows/system32/drivers フォルダーに入れ、windowsを再起動する
もしかしたら、元のマシンにあったかも知れないが、クリーンインストール後であったので、私の場合、恵安のwebサイトから入手した。

https://www.keian.co.jp/support/download/ にアクセスし、windows製品, KBM100K, ドライバーを選択し、KBM100K、KBM85B WiFi,Bluetooth ドライバーをダウンロードすると、KBM100K-KBM85B-WIFI-BT-driver.zip が、得られるので、その中にある 4345r6nvram.txt をコピペで c:\windows/system32/drivers に入れる事で対処した。 再起動したらwifiが繋がるようになった

3.2 Get 4345r6nvram.txt, insert it into the c:\windows/system32/drivers folder and restart the windows.

I forgot to check the file in the tablet. So I got it from KEIAN's web site.
Access https://www.keian.co.jp/support/download/ and select windows製品, KBM100K, ドライバー.
(Only Japanese languaage available )
Then download KBM100K、KBM85B WiFi,Bluetooth ドライバー.
At this point, You got the KBM100K-KBM85B-WIFI-BT-driver.zip file, and You can take the '4345r6nvram.txt' file from the zip.file.

Finally insert it into the 'c:\windows/system32/drivers' folder, and restart the windows.
In my case, the my tablet works well. Success!!

  1. 参考 windows 10のクリーンインストール (USBメモリを使用)
    4. for ref. Clean installation of windows 10 (by USB memory)

4.1 タブレット中のデバイスドライバーを退避する。これは、デバイスドライバーが簡単に手に入らないことや、デバイスとドライバーの対応付けが難しいことから行う。

'4.1 Save device drivers inside of the tablet PC in backup. This will be helpful for recovery the device drivers,
because it might be difficult that these drivers will be got from another places.

   例: windowsにあるdismコマンドで退避
   e.g. Save them by using windows' 'dism' command.

   mkdir D:\DriversBackup
   dism /online /export-driver /destination:"D:\DriversBackup"

   ※ https://news.mynavi.jp/article/win10tips-137/ の記事を参考にした。

'4.2 windowsをmicrosoftのサイト(*2)の手順通りにツールを使ってクリーンインストールする。なお、この時、購入時と構成が変わっているとproduct keyが必要になったりするので、SDHCカードを入れてあれば、抜いて行う。
(*2) https://www.microsoft.com/ja-jp/software-download/windows10
このツールを使用して、別のPCにwindows 10 をインストールするためにインストールメディアを作成するのところの手順に従う。

'4.2 Clean installation of windows 10 according to the instructions on the microsoft website(*2). You may remove a SDHC card to prevent a mismatch between the original configuration and the current configuration, especially storage configration.
(*2) https://www.microsoft.com/ja-jp/software-download/windows10
follow the part of "Using the tool to create installation media to install Windows 10 on a different PC".

'4.3 windows をインストールし起動後、4.1で退避したドラバーを、デバイスマネージャーからインストールする。 デバイスマネージャーから、エラーになっているデバイスのところをデバイスマネージャーの更新を使ってインストールする。Broadcom 802.11ac WDI SDIO Adapter のところともう一ケ所はエラーになるかも知れない。

'4.3 After restart the installed Windows 10, restore the device drivers from the media that you have saved by 4.1.
Restore the drivers on error marked drivers by the device manager.
You may encouter the error on Broadcom 802.11ac WDI SDIO Adpter and another one error. You can fix these with 3.1 and 3.2

以上は、終わったあと記憶に基づいて記述しているので、細部の表現等で正確でない部分があるかもしれません。 そこは容赦ねがいます。

yy_buffer_state, yy_current_bufferやyy_scan_bufferなどは、flexの第3セクションでしか使えないとの事なので、これらを扱う関数をflexの第3セクションで定義し、他のところからこの関数を呼び出しする様にしたところエラーは消えた。

V-antena and Tanimoto's page

あなたはIPv4でアクセスしています