ラベル troubleshoot の投稿を表示しています。 すべての投稿を表示
ラベル troubleshoot の投稿を表示しています。 すべての投稿を表示

2022年2月18日金曜日

「AWS Glueをローカル環境で実行してみた」をやったときのメモ

クラスメソッドのAWS Glueをローカル環境で実行してみた をやってみましたが、バージョン違いの設定で大変でした。二年半くらい経っているから当然なのかも。以下、エラー回避のメモ。

うまく行ったときのバージョン

  • Ubuntu 20.04
  • Python 3.7
  • aws-cli/2.4.11
  • Apach maven 3.6.3
  • Java java-8-openjdk-amd64
  • Apach Spark spark-2.4.3-bin-hadoop2.8
  • LocalStack 0.14.0
  • docker-compose version 1.29.2


https://github.com/localstack/localstack

https://github.com/awslabs/aws-glue-libs

https://docs.aws.amazon.com/ja_jp/glue/latest/dg/aws-glue-programming-etl-libraries.html#develop-local-python


SPARK

対応するバージョンをダウンロードして、SPARK_HOMEを設定するだけでよい。

SPARK_HOME=自分のフォルダ.../spark-2.4.3-bin-spark-2.4.3-bin-hadoop2.8

aws-glue-libs

glueのバージョンに合わせてブランチを選んでclone

https://github.com/awslabs/aws-glue-libs


ここでは、フォルダ名を変えている。/aws-glue-libs-2.0/


LocalStack

こちらを参考にした。

https://zenn.dev/s_ryuuki/articles/412b5f004595b7


awslocalを使う

endpointを解決してくれるので便利

--endpoint-url http://localhost:45xx という指定を省いてよい。

https://github.com/localstack/awscli-local



--profile localstack を使って以下のようなコマンドで操作


awslocal dynamodb create-table \

    --table-name aws-glue-local-test-table \

    --attribute-definitions \

        AttributeName=Id,AttributeType=S \

    --key-schema AttributeName=Id,KeyType=HASH \

    --provisioned-throughput ReadCapacityUnits=1,WriteCapacityUnits=1 \

    --profile localstack



awslocal dynamodb put-item \

    --table-name aws-glue-local-test-table  \

    --item \

        '{"Id": {"S": "test"}, "Column1": {"S": "test1"}, "Column2": {"S": "test2"}, "Column3": {"S": "test3"}}' \

    --profile localstack



awslocal s3api create-bucket \

    --bucket aws-glue-local-test-bucket \

    --profile localstack



awslocal s3api list-buckets \

    --profile localstack



awslocal s3api list-objects \

    --bucket aws-glue-local-test-bucket \

    --profile localstack

エンドポイントが合っていないというエラー

あとでも出てくる

Connection was closed before we received a valid response from endpoint URL: "http://localhost:4572/aws-glue-local-test-bucket".


    ports:

      - "4566:4566"

      - "4571:4571"

にするとできた。

4566は全てのサービスのポート?TODO


OKのとき

docker container ls

CONTAINER ID        IMAGE                   COMMAND                  CREATED             STATUS              PORTS                                                                     NAMES

89b2de708a51        localstack/localstack   "docker-entrypoint.sh"   2 minutes ago       Up 2 minutes        0.0.0.0:4566->4566/tcp, 4510-4559/tcp, 5678/tcp, 0.0.0.0:4571->4571/tcp   localstack


NGのとき

CONTAINER ID        IMAGE                   COMMAND                  CREATED             STATUS              PORTS              											NAMES

b7a6a3bf62f6        localstack/localstack   "docker-entrypoint.sh"   53 seconds ago      Up 49 seconds       4510-4559/tcp, 0.0.0.0:4569->4569/tcp, 4566/tcp, 0.0.0.0:4572->4572/tcp, 5678/tcp, 0.0.0.0:8080->8080/tcp   localstack


実行

./bin/gluesparksubmit ./src/sample.py --JOB_NAME='dummy'


最初はGlue ETLライブラリのバイナリをダウンロードするので時間かかる。

37分だった。

logが多数でるが、INFO、WARNは軽く読んでERRORに対処する。

WARNだとこういうのもあったが無視した。

https://aws.amazon.com/jp/premiumsupport/knowledge-center/ec2-expired-token/


JDKが入っていないので、/jre/tools.jarがないというエラー

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time:  37:51 min

[INFO] Finished at: 2022-02-17T11:07:06+09:00

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal on project AWSGlueETLPython: Could not resolve dependencies for project com.amazonaws:AWSGlueETLPython:jar:3.0.0: Could not find artifact jdk.tools:jdk.tools:jar:1.8 at specified path /usr/lib/jvm/java-8-openjdk-amd64/jre/../lib/tools.jar -> [Help 1]

[ERROR]

[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.

[ERROR] Re-run Maven using the -X switch to enable full debug logging.

[ERROR]

[ERROR] For more information about the errors and possible solutions, please read the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

インストールする

sudo apt-get install openjdk-8-jdk

確認 

/usr/lib/jvm/java-8-openjdk-amd64$ find ./ -type f | grep tools 

./lib/tools.jar が出るはず


BUILDは成功するがその後でエラー

再実行。同じコマンド(./bin/gluesparksubmit ./src/sample.py --JOB_NAME='dummy')で

2分くらいでできた。


sample.pyでjob.initがおかしいらしい

22/02/17 12:58:57 INFO BlockManagerMaster: Registered BlockManager BlockManagerId(driver, 192.168.10.105, 41321, None)

22/02/17 12:58:57 INFO BlockManager: Initialized BlockManager: BlockManagerId(driver, 192.168.10.105, 41321, None)

22/02/17 12:58:57 INFO GlueContext: GlueMetrics not configured

22/02/17 12:58:57 INFO GlueContext: fs.s3.impl hadoop configuration is not set. Setting fs.s3.impl to org.apache.hadoop.fs.s3a.S3AFileSystem

Traceback (most recent call last):

  File ".../aws-glue-libs/./src/sample.py", line 19, in <module>

    job.init(JOB_NAME, args)

  File ".../aws-glue-libs/PyGlue.zip/awsglue/job.py", line 42, in init

  File "/home/shimo/Desktop/app/spark-2.2.1-bin-hadoop2.7/python/lib/py4j-0.10.4-src.zip/py4j/java_gateway.py", line 1133, in __call__

  File "/home/shimo/Desktop/app/spark-2.2.1-bin-hadoop2.7/python/lib/pyspark.zip/pyspark/sql/utils.py", line 63, in deco

  File "/home/shimo/Desktop/app/spark-2.2.1-bin-hadoop2.7/python/lib/py4j-0.10.4-src.zip/py4j/protocol.py", line 319, in get_return_value

py4j.protocol.Py4JJavaError: An error occurred while calling z:com.amazonaws.services.glue.util.Job.init.

: java.lang.NoSuchMethodError: scala.Product.$init$(Lscala/Product;)V


tokenがエラー( The security token included in the request is invalid)

An error occurred (UnrecognizedClientException) when calling the CreateTable operation: The security token included in the request is invalid.

これは認証というよりエンドポイントの問題だった


Python2.7, glue 0.9にしたがNG

sudo pip2 install pyspark


Python2.7用にしようかとglue0.9を入れたりしたが、submit実行してもうまく行かず。このエラーのdynamicframeが見つからないというのは、モジュールのルートの選択がおかしいようですが、いまいち進めず。


rm: cannot remove '.../aws-glue-libs-0.9/conf/spark-defaults.conf': No such file or directory

.../aws-glue-libs-0.9

SLF4J: Class path contains multiple SLF4J bindings.

SLF4J: Found binding in [jar:file:.../aws-glue-libs-0.9/jars/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]

SLF4J: Found binding in [jar:file:/home/shimo/Desktop/app/spark-2.2.1-bin-hadoop2.7/jars/slf4j-log4j12-1.7.16.jar!/org/slf4j/impl/StaticLoggerBinder.class]

SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.

SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]

Using Spark's default log4j profile: org/apache/spark/log4j-defaults.properties

22/02/17 14:06:58 WARN Utils: Your hostname, v3268 resolves to a loopback address: 127.0.1.1; using 192.168.10.105 instead (on interface enp2s0)

22/02/17 14:06:58 WARN Utils: Set SPARK_LOCAL_IP if you need to bind to another address

Traceback (most recent call last):

  File ".../aws-glue-libs-0.9/./src/sample.py", line 2, in <module>

    from awsglue.transforms import ApplyMapping

  File ".../aws-glue-libs-0.9/PyGlue.zip/awsglue/__init__.py", line 13, in <module>

ModuleNotFoundError: No module named 'dynamicframe'


awsglue2.0, Python3.7にする

改めてやり直して実行してエラー。

22/02/17 15:30:31 WARN EC2MetadataUtils: Unable to retrieve the requested metadata (/latest/dynamic/instance-identity/document). Failed to connect to service endpoint:

com.amazonaws.SdkClientException: Failed to connect to service endpoint:


22/02/17 15:49:35 ERROR Executor: Exception in task 0.0 in stage 0.0 (TID 0)

java.lang.RuntimeException: Could not lookup table aws-glue-local-test-table in DynamoDB.


この一文によると、us-east-1にアクセスしている→これはエンドポイントの指定ができていないときのデフォルトだった

22/02/17 15:49:34 INFO DynamoDBUtil: Using endpoint for DynamoDB: dynamodb.us-east-1.amazonaws.com


spark-defaults.confを正しく設定すると動いた

あれこれエラーが出ていたけど、これで直った。(他にも効いているかもしれないけど)

confにポートの情報を入れているけど、上書きされて消えている

.../aws-glue-libs-2.0/conf/spark-defaults.conf


bin/glue-setup.shがconfファイルをいじっているようなので、ここらへんをコメントアウト

mkdir $SPARK_CONF_DIR

rm $SPARK_CONF_DIR/spark-defaults.conf

Generate spark-defaults.conf

echo "spark.driver.extraClassPath $GLUE_JARS_DIR/*" >>$SPARK_CONF_DIR/spark-defaults.conf

echo "spark.executor.extraClassPath $GLUE_JARS_DIR/*" >>$SPARK_CONF_DIR/spark-defaults.conf


docker-compose.ymlのポート部分を変えている

version: "3.3"


services:

  localstack:

    container_name: localstack

    image: localstack/localstack

    ports:

      - "4566:4566"

      - "4571:4571"

    environment:

      - DOCKER_HOST=unix:///var/run/docker.sock

      - DEFAULT_REGION=ap-northeast-1

      - SERVICES=dynamodb,s3


 

spark-defaults.conf 

はこうしておく


spark.hadoop.dynamodb.endpoint http://localhost:4566

spark.hadoop.fs.s3a.endpoint http://localhost:4566

spark.hadoop.fs.s3a.path.style.access true

spark.hadoop.fs.s3a.signing-algorithm S3SignerType


どちらもlocalhost:4566 にした。他のポートでもできるのかもTODO

2022年2月16日水曜日

docker Tips、エラーのメモ

初心者のメモです。Ubuntuメイン。


コマンド参照


初心者ハンズオン

https://qiita.com/shiro01/items/04ca672a93384b463701

チートシート

https://pyteyon.hatenablog.com/entry/2021/07/07/021704

公式チートシートPDF。あまり載っていない。
https://www.docker.com/sites/default/files/d8/2019-09/docker-cheat-sheet.pdf

ヘルプ--helpが詳しい

docker --help とすると、docker と打った次で使えるコマンド、オプションが出る。

docker run --help とすると docker run と打った次で使えるコマンド、オプションが出る。

例えば docker run --help だと

-d, --detach                         Run container in background and print container ID

-i, --interactive                    Keep STDIN open even if not attached

 -t, --tty                            Allocate a pseudo-TTY

とかが書いてあるので便利。


エイリアスにする

groupに入れてもsudoが回避できないので、

alias docker='sudo docker'

としています。

docker container って打ちまくっていると指がつるので

alias dc='sudo docker container'

alias di='sudo docker image'

としています。

名前がコンフリクトのエラー

docker: Error response from daemon: Conflict. The container name "/aaaaaaaaaa" is already in use by container "xxxxxxxxxx". You have to remove (or rename) that container to be able to reuse that name.
See 'docker run --help'.

停止しているものも含めて、名前が既に使われている。 

docker container ls -a  

というように-aをつけて確認する。

docker container start NAME/ID

で再起動できる。


portを既に使っているエラー

Error starting userland proxy: listen tcp 0.0.0.0:3306: bind: address already in use.

これはUbuntuでmysqlが別に動いていたということでした。


確認する

sudo netstat -tulpn | grep 3306

tcp        0      0 127.0.0.1:33060         0.0.0.0:*               LISTEN      1824/mysqld

tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      1824/mysqld

停める

/etc/init.d/mysql stop 


DockerfileからのBuildでエラー

https://docs.docker.jp/get-started/part3.htmlunknown instruction: YUM

VSCODEの自動フォーマットを使っていたら、Dockerfile内の \ $$ の\が消されていたのが問題。このunknownというエラーは改行が失敗しているという事例が出ていました。

→Ctrl +P →save without formatting で保存する。


REPOSITORY、TAGがnone

イマイチよくわからないけど例えばこんな感じで。alpineをベースにビルドしようと思ってこんなのができている・・・。あとから気が付きましたが、中のyumインストールがエラーで終了していたようでした。それでも何かしらのイメージができているようです。


REPOSITORY                TAG                 IMAGE ID            CREATED             SIZE

<none>                    <none>              aaaaaaaaaa        21 seconds ago      5.61MB

alpine                    3.14                bbbbbbbbbbb        3 months ago        5.61MB 


DockerHubへのPushでエラー

チュートリアルをやっていてエラー。https://docs.docker.jp/get-started/part3.html

denied: requested access to the resource is denied

cli からDockerHubにログインできていなかったのが問題だった

一度Privateにしてから戻す?という回答もあるがこちらは不明

https://stackoverflow.com/questions/41984399/denied-requested-access-to-the-resource-is-denied-docker


docker composeのバージョンが合っていないので上げる

ERROR: Version in "./docker-compose.yml" is unsupported. You might be seeing this error because you're using the wrong Compose file version. Either specify a supported version (e.g "2.2" or "3.3") and place your service definitions under the `services` key, or omit the `version` key and place your service definitions at the root of the file to use version 1.

For more on the Compose file format versions, see https://docs.docker.com/compose/compose-file/


docker-compose 1.25 でymlのバージョン3.8のものを動かそうとしたときにこのエラー。

一回削除して新しく入れ直しました。1.29.2にしたらOKでした。

https://phoenixnap.com/kb/install-docker-compose-on-ubuntu-20-04

[解決]ERROR: Couldn't connect to Docker daemon at http+docker://localhost - is it running?

docker-composeが動かなくてこのエラー 

docker-compose up -d

ERROR: Couldn't connect to Docker daemon at http+docker://localhost - is it running?


If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.


リブートしたりするのが効いたりする、らしいですが。

https://forums.docker.com/t/couldnt-connect-to-docker-daemon-at-http-docker-localhost-is-it-running/87257/2

sudo忘れだった


sudo docker-compose up -d

で動きました。エラーメッセージが分かりにくかったですね。

[解決]The JAVA_HOME environment variable is not defined correctly

mavenを使おうとして、

mvn --version

とやるとこのエラー

 

 The JAVA_HOME environment variable is not defined correctly

This environment variable is needed to run this program

NB: JAVA_HOME should point to a JDK not a JRE


echo $JAVA_HOME


/usr/lib/jvm/open-jdk

となるのでjdKですが?と思ったがそういうことでもないらしい。


こちらを参考にして、

$ sudo update-alternatives --config java

をやって、ここから2を選びました。(java-8-openjdk-amd64)

There are 2 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                            Priority   Status
------------------------------------------------------------
* 0            /usr/lib/jvm/java-11-openjdk-amd64/bin/java      1111      auto mode
  1            /usr/lib/jvm/java-11-openjdk-amd64/bin/java      1111      manual mode
  2            /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java   1081      manual mode


エクスポートします。

export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export PATH=$JAVA_HOME/bin:$PATH


できました。

mvn --version

Apache Maven 3.6.3
Maven home: /usr/share/maven
Java version: 1.8.0_312, vendor: Private Build, runtime: /usr/lib/jvm/java-8-openjdk-amd64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.4.0-97-generic", arch: "amd64", family: "unix"

設定ができていなかったということですね。


2022年2月15日火曜日

Vagrant error

vagrant 2.2.6
Ubuntu20.04


box centos/7 のダウンロードエラー

時間のかかるダウンロードだったので放置していたらこのエラー。やり直したらレジュームしてくれて完了しました。

An error occurred while downloading the remote file. The error                                                                       
message, if any, is reproduced below. Please fix this error and try                                                                  
again.                                                            
transfer closed with 329134080 bytes remaining to read 

ネットワーク衝突してますエラー

借り物のVagrantfileで設定されていたBridged Network Address(config.vm.network "private_network", ip: "192.168.10.10")と自分のPCのネットワークが衝突していた。Vagrantfile側を192.168.20.10というように変えた。


The specified host network collides with a non-hostonly network!                                                                     

This will cause your specified IP to be inaccessible. Please change                                                                  

the IP or name of your host only network so that it no longer matches that of                                                        

a bridged or non-hostonly network.                                


Bridged Network Address: '192.168.10.0'                           

Host-only Network 'enp2s0': '192.168.10.0'   

Shared folderがないですよというエラー

借り物のVagrantfileで設定されていたのが合っていなかったのでその部分コメントアウト した。

 Vagrant was unable to mount VirtualBox shared folders. This is usually                                                               

because the filesystem "vboxsf" is not available. This filesystem is                                                                 

made available via the VirtualBox Guest Additions and kernel module.                                                                 

Please verify that these guest additions are properly installed in the                                                               

guest. This is not a bug in Vagrant and is usually caused by a faulty                                                                

Vagrant box. For context, the command attempted was:  


shareできない

(runningにはなります)

Vagrant was unable to mount VirtualBox shared folders. This is usually

because the filesystem "vboxsf" is not available. This filesystem is

made available via the VirtualBox Guest Additions and kernel module.

Please verify that these guest additions are properly installed in the

guest. This is not a bug in Vagrant and is usually caused by a faulty

Vagrant box. For context, the command attempted was:


mount -t vboxsf -o dmode=755,fmode=644,uid=1000,gid=1000 home_vagrant_ws____________________________________________________________________________________________________________________________________________________________________________________________________ /home/vagrant/ws\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 


The error output from the command was:


mount: unknown filesystem type 'vboxsf'

 

2022年2月8日火曜日

Ubuntu20.04でtracker が邪魔

ファイルの検索のためにtrackerを入れたのですがあまり効果が感じられず、CPUが1,2個100%まで上がることが頻繁に起こります。

https://askubuntu.com/questions/1258757/tracker-miner-fs-is-taking-90-of-cpu

にある

tracker reset --hard ; tracker daemon --start

を使ってその場でリスタートしていたのですが、あまり意味なし。


最終的に

https://www.linuxquestions.org/questions/ubuntu-63/how-to-disable-tracker-globally-in-ubuntu-20-04-a-4175678847/

にあるコマンドを参考に

systemctl --user mask tracker-{miner-apps,miner-fs,store,miner-f.service,miner-f}

で停めることにしました。


http://equj65.net/tech/systemd-manage/


時間がたつと復活している気がする。これならOK?

systemctl status tracker-{miner-apps,miner-fs,store,miner-f.service,miner-f}

Unit tracker-miner-apps.service could not be found.

Unit tracker-miner-fs.service could not be found.

Unit tracker-store.service could not be found.

Unit tracker-miner-f.service could not be found.

Unit tracker-miner-f.service could not be found.


以下は残骸

---

cron_tracker.sh をいうshell scriptを作って、毎分cronして 記録していました

#!/bin/bash


ps aux | grep '[t]racker' | awk -v time="$(date +"%F %H:%M:%S")""    " '{print time, $0}' >>cron_tracker.log

 

こんな感じで出力されます。

2022-02-05 08:01:01     user       7644  1.7  1.5 1516128 123536 ?      SNsl 07:37   0:24 /usr/libexec/tracker-extract

2022-02-05 08:01:01     user       7645 43.2  2.2 707804 180848 ?       RNsl 07:37  10:02 /usr/libexec/tracker-miner-fs

2022-02-05 08:01:01     user       7897  1.1  0.2 359596 19852 ?        Dsl  07:38   0:15 /usr/libexec/tracker-store

2022-02-05 08:02:01     user       7644  1.6  1.5 1516128 123220 ?      SNsl 07:37   0:24 /usr/libexec/tracker-extract

2022-02-05 08:02:01     user       7645 45.0  2.2 709916 183712 ?       RNsl 07:37  10:54 /usr/libexec/tracker-miner-fs

2022-02-05 08:02:01     user       7897  1.1  0.2 359596 19832 ?        Dsl  07:38   0:16 /usr/libexec/tracker-store

2022-02-05 08:03:01     user       7644  1.6  1.5 1516128 122324 ?      SNsl 07:37   0:24 /usr/libexec/tracker-extract

2022-02-05 08:03:01     user       7645 46.5  2.3 711900 185760 ?       RNsl 07:37  11:43 /usr/libexec/tracker-miner-fs

2022-02-05 08:03:01     user       7897  1.4  0.2 359596 19848 ?        Dsl  07:38   0:21 /usr/libexec/tracker-store

2022-02-05 08:04:01     user       7644  1.5  1.5 1516128 121704 ?      SNsl 07:37   0:24 /usr/libexec/tracker-extract

2022-02-05 08:04:01     user       7645 48.3  2.3 714276 188608 ?       RNsl 07:37  12:41 /usr/libexec/tracker-miner-fs

2022-02-05 08:04:01     user       7897  3.6  0.2 359596 19632 ?        Rsl  07:38   0:57 /usr/libexec/tracker-store

2022-02-05 08:05:01     user       7644  1.5  1.3 1501232 112364 ?      RNsl 07:37   0:24 /usr/libexec/tracker-extract

2022-02-05 08:05:01     user       7645 50.2  2.3 716284 190536 ?       RNsl 07:37  13:40 /usr/libexec/tracker-miner-fs

2022-02-05 08:05:01     user      12871 89.5  0.7 418108 62296 ?        Rsl  08:04   0:46 /usr/libexec/tracker-store

2021年7月22日木曜日

[解決済み]ubuntu mozcで日本語入力が変になる

1文字の入力が変になるものと、入力途中でアルファベットが確定されるものがあります。


その1 解決済み

  • Google Chromeをアップデートしたらブラウザ上での日本語入力が変になった
    • 一文字での入力ができない。一文字入力して、変換してエンターするとキャンセルされる
  • 解決しなかったのでバージョンを戻した
  • 半年くらい待ったアップデートしたら、直っていました

環境 Ubuntu 20.04, fcitx-mozc (環境は関係なさそう。Firefoxでは問題なし)

バージョン
google-chrome-stable amd64 
OK 90.0.4430.93-1
NG 91.0.4472.164-1
NG 92.0.4515.107-1

91からおかしくなった。90のままだとセキュリティの問題が・・と通知が出ていて困っている。

ググってみると、同じではないが似たような報告がちらほら出ていて、そのうちアップデートして直っているようです。


その後、ずいぶん待ってからアップデートしたら直っていました。

Version 96.0.4664.110 (Official Build) (64-bit)


こちらによるとfcitx5にすると改善されるとのことでした。


その2 解決済み

  • 入力中に1文字のアルファベットだけが確定されて前に出てしまう。「確定」→「aっくてい」 「低くなるかもしれません」→「低くeなるかもしれまsん」などとなる。
  • fcitx5やChrome 96でも改善されず
  • Chrome、VSCodeでも起きているー>VscodeはChromeのdependency
  • gvimでは起らない。ターミナルでも起らない。
  • 最終的にxkbを再インストールして直りました。

やってみたこと


ゆっくり入力すると、バグる可能性はやや低いのかも?→関係なかった
英字キーボードが悪い? → 他の日本語キーボードでも再現。関係なかった
Mistel 770  有線だけど、分離型の左右でずれている? → 他のキーボードでも再現。関係なかった 

fcitx, fcitx5をpurgeしてから再インストール → 起こる。ただ頻度は減った?

fcitx5でInput Method Panelを組み合わせる → 起こる。頻度は減った??
https://gihyo.jp/admin/serial/01/ubuntu-recipe/0689

MozcのIM setting -> Fcitx Configurationのページを開く。Current Input Methodで他のKeyboardを消して、Mozcだけにする。

→ これが効果あったかも??-> ゼロにはならないが減った気がする?

ちなみに英字キーボードなので、ZenkakuHankakuを別途アサインしています。




別のubuntu20.04 機では問題なかった
- ibus-mozc
- Chrome 97.0.4692.99
- mozc 2.23.2815.102

問題あるものは、
mozc 2.26.4220.102

切り分けができません。。



こちらを参考にして、fcitx5にしてExtensionsー>Input Method Panelをしてみましたが、うまくいきません。特に、GoogleDocなどで日本語入力が見えなくなりました( 確定すると見える)

https://gihyo.jp/admin/serial/01/ubuntu-recipe/0689?page=1

どうやらibusとfcitxが混在しているようです。システムの文字(superキーを押したときの検索とか)はibusになっているような・・・。


xkb を再インストールするのが効果あり


https://askubuntu.com/questions/846702/how-to-reset-xkb

にあるように、

dpkg -S /usr/share/X11/xkb/symbols/pc

とやって

xkb-data: /usr/share/X11/xkb/symbols/pc

と出るので

sudo apt reinstall xkb-data

として完了。



Reading package lists... Done
Building dependency tree       
Reading state information... Done

0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 10 not upgraded.
Need to get 349 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://jp.archive.ubuntu.com/ubuntu focal/main amd64 xkb-data all 2.29-2 [349 kB]
Fetched 349 kB in 0s (1,514 kB/s)
(Reading database ... 467702 files and directories currently installed.)
Preparing to unpack .../xkb-data_2.29-2_all.deb ...
Unpacking xkb-data (2.29-2) over (2.29-2) ...
Setting up xkb-data (2.29-2) ...
Processing triggers for man-db (2.9.1-1) ...