2022年2月26日土曜日

【100】iRODSのiCommandsを試す

じゃじゃん~ 久々にブログ担当に復帰しました。
iRODSの本格的な動作の確認が出来ず、時間が経っているのですが、この問題を解決できるだろうかと不安になってきました。若干諦めモードになっていますが、今日も素直にマニュアルに沿って進めてみます。

まず、マニュアルはここ↓
iRODS Beginner Training with iRODS 4.2
https://github.com/irods/irods_training/blob/main/beginner/irods_beginner_training_2019.pdf

今日は5章あたりをやってみます。

今日は、Aliceでログインして、Githubから練習のためのtraining_jpgs.zipをダウンロードしている状態で始めます。(~5.4)

irm, imv
iCommandをいくつか動かしてみる作業です。
前回(?)以下でpeanuts.jpgを削除してみましたので
$ irm /tempZone/home/alice/training_jpgs/peanuts.jpg

以下のコマンドで、もとに戻せるかを試します。

しかし、なぜかエラーが出ました。(もしかしたら前回ゴミ箱(trash)を捨てたかのかしら)そこで、別のファイルを削除して、戻してみます。


今度はうまくできました。

irepl
次は、レプリカを作ってみます。レプリカは同一の物理的コピーを意味します。



ここでエラーが出ました。
irepl -R newResc training_jpgs/waffle.jpg
remote addresses: 192.168.56.2 ERROR: replUtil: repl error for /tempZone/home/alice/training_jpgs/waffle.jpg, status = -347000 status = -347000 USER_SOCK_CONNECT_TIMEDOUT

USER_SOCK_CONNECT_TIMEDOUT -347000 
良く分かりませんが、以前からずっと出ている上記のエラーについて何とか調べることに。
Trouble shootingの文書から、このエラーに対する対策があったのでやってみます。


iRODS Server is down

1.ienv
  • The ienv command displays the iRODS environment in use. This may help debug the obvious error of trying to connect to the wrong machine or to the wrong Zone name.


やってみたところで、何も解決のヒントがありません。説明を読んでもなんの役にも立ちません。( ノД`)シクシク…

2.Networking issues
  • Verify that a firewall is not blocking the connection on the iRODS ports in use (default 1247 and 1248) (or the higher ports for parallel transfer).

    スクショ忘れましたが、以下のコマンドで1247, 1248のポートがLISTENの状態であることを確認しました。

    netstat -lntp

  • Check for network connectivity problems by pinging the server in question.
    これについても、以下のようにpingで動いていることは確認しましたが、だからなに?という感じです。笑


3.iRODS server logs
  • If the iRODS environment issues and networking issues have been ruled out, the iRODS server/client logs may provide additional information with regards to the specifics of the error in question.

    サーバーログは、rodsLogで確認できます。 https://docs.irods.org/master/system_overview/troubleshooting/#the-server-log-rodslog からの説明↓
    The Server Log (rodsLog)
    The iRODS server log (rodsLog) is the best place to find a history of what has happened and any error codes and file paths that may explain unexpected behavior. The rodsLog is found at /var/lib/irods/log/rodsLog*. The rodsLog is rotated every few days, so make sure you're looking at the latest file for recent error messages. The debugging level (below) affects how many messages are written to the rodsLog. 
    実際は、/var/lib/irods/log/に入ると、以下のようなファイルが見えます。 














    そこで、一番最新のログファイルを、以下のコマンドで開いてみました。

    vim rodsServerLog.2022.02.21

    その結果がこれです。

    Feb 25 20:04:51 pid:13044 remote addresses: 127.0.0.1, 192.168.56.2 ERROR: _rcConnect: connectToRhost error, server on 192.168.56.1:1247 is probably down status = -347000 USER_SOCK_CONNECT_TIMEDOUT
    Feb 25 20:04:51 pid:13044 remote addresses: 127.0.0.1, 192.168.56.2 ERROR: [create_physical_file_for_replica:115] - rsFileCreate failed [error_code=[-347000], path=[/tempZone/home/alice/training_jpgs/waffle.jpg], hierarchy=[newResc]]
    Feb 25 20:04:51 pid:13044 remote addresses: 127.0.0.1, 192.168.56.2 ERROR: [create_new_replica:505] - l3Create failed [error_code=[-347000], path=[/tempZone/home/alice/training_jpgs/waffle.jpg], hierarchy=[newResc], physical_path=[/var/lib/irods/new_vault/home/alice/training_jpgs/waffle.jpg]]
    Feb 25 20:04:51 pid:13044 WARNING: [unlock_impl:214] - failed to restore status for replica because no original status found in data_status column. Setting replica status to stale. [data_id=[10028], repl_num=[1]]
    Feb 25 20:04:51 pid:13044 remote addresses: 127.0.0.1, 192.168.56.2 ERROR: [restore_replica_statuses:122] - failed to restore status for replica; original status not found in data_status column [data_id=[10028], repl_num=[0]]
    Feb 25 20:04:51 pid:13044 remote addresses: 127.0.0.1, 192.168.56.2 ERROR: [replicate_data_object:748] - failed to replicate [/tempZone/home/alice/training_jpgs/waffle.jpg]
    Feb 25 20:04:51 pid:13044 NOTICE: rsDataObjRepl - Failed to replicate data object. status:[-347000]

ここで、また-347000を発見。あれ?最初に戻った?なんだか、説明を読んでも説明になってないお見事な説明です。役所に電話してたらいまわしにされた感じです。たらいまわしになったら、一旦やめるべきですね。(笑)

とういう事で今日はここまでです!

※今日必要となったサイト

====================
次回は3/18です~




最近の投稿

【108】Archives in the Digital Age: The use of AI and machine learning in the Swedish archival sectorを読む

 Gijs Aangenendt氏の修士論文、Archives in the Digital Age: The use of AI and machine learning in the Swedish archival sectorを半分読みました。 前半は、AIを扱ったアーカ...

人気の投稿