🔑 管理者ログイン
⚙️ Cloud Relay 管理
⚙️ 現在の設定
📡 トンネル管理
| ポート | 転送先 | 用途 | 状態 |
|---|---|---|---|
| 読込中... | |||
🛡️ アクセス制御(IP ホワイトリスト)
| IP / CIDR | ラベル |
|---|---|
| 読込中... | |
※ この一覧は config.yaml の access_control.allowed_ips から表示しています。
変更は config.yaml を編集してください。
📜 運用イベント履歴 -
| 時刻 | 種別 | 重要度 | メッセージ |
|---|
📖 運用コマンド早見表
現象ごとの確認手順とコマンドをまとめています。コマンドはクリックでコピーできます。
確認:systemd サービス状態
systemctl status cloud-relay-api
📋
再起動 (onprem / z240sff):
sudo systemctl restart cloud-relay-api
📋
再起動 (cloud / fatty6):
sudo systemctl restart cloud-relay-api
📋
ログ確認(journald):
journalctl -u cloud-relay-api -n 50 --no-pager
📋
※ systemd (Restart=always) により、クラッシュ時は5秒後に自動再起動されます。
※ 2ワーカー構成(--workers 2)で冗長化されています。
確認 (z240sff):autossh プロセス
pgrep -fa autossh
📋
確認 (fatty6):全トンネルポート
ss -tlnp | grep -E '8888|8889|2222'
📋
再接続 — API メイン (8888):
autossh -M 0 -f -N -R 8888:localhost:8080 fatty6.fatty.or.jp -o ServerAliveInterval=10 -o ServerAliveCountMax=3 -o ExitOnForwardFailure=yes
📋
再接続 — API バックアップ (8889):
autossh -M 0 -f -N -R 8889:localhost:8080 fatty6.fatty.or.jp -o ServerAliveInterval=30 -o ServerAliveCountMax=3 -o ExitOnForwardFailure=yes
📋
再接続 — SSH リモートアクセス (2222):
autossh -M 0 -f -N -R 0.0.0.0:2222:localhost:22 fatty6.fatty.or.jp -o ServerAliveInterval=30 -o ServerAliveCountMax=3 -o ExitOnForwardFailure=yes
📋
再接続 — RDP リモートデスクトップ (13389→3389):
autossh -M 0 -f -N -R 0.0.0.0:13389:localhost:3389 fatty6.fatty.or.jp -o ServerAliveInterval=30 -o ServerAliveCountMax=3 -o ExitOnForwardFailure=yes
📋
確認:retry 回数が上限に達していないか
cd ~/Documents/cloud-relay && .venv/bin/python3 -c "
import sqlite3; conn = sqlite3.connect('app/onprem.db')
for r in conn.execute('SELECT id, sync_status, retry_count FROM relay_messages WHERE sync_status=\"failed\"'):
print(f'id={r[0]} retry={r[2]}')
"
📋
対処:上のボタン「🔄 Failed リセット」を押す
retry 上限超過の場合(強制 synced):
cd ~/Documents/cloud-relay && .venv/bin/python3 -c "
import sqlite3; conn = sqlite3.connect('app/onprem.db')
conn.execute(\"UPDATE relay_messages SET sync_status='synced' WHERE sync_status='failed'\")
conn.commit(); print('Done')
"
📋
z240sff から確認:
curl -s http://192.168.11.6:6032/api/health | python3 -m json.tool
📋
fatty6 上で確認:
curl -s http://localhost:6032/api/health
📋
ls -lh ~/Documents/cloud-relay/app/*.db
📋
レコード数確認:
cd ~/Documents/cloud-relay && .venv/bin/python3 -c "
import sqlite3; conn = sqlite3.connect('app/onprem.db')
print(conn.execute('SELECT COUNT(*) FROM relay_messages').fetchone()[0], 'records')
"
📋
対処:上のボタン「🗑️ DB 初期化」(全データ削除)
テスト:上の「📧 テストメール」ボタン
Postfix ログ (fatty4):
ssh fatty4 'sudo tail -20 /var/log/mail.log | grep cloud-relay'
📋
SMTP 直接テスト:
python3 -c "
import smtplib
s = smtplib.SMTP('fatty4.fatty.or.jp', 25)
print(s.ehlo())
s.quit()
"
📋
コンテナ確認:
docker ps | grep cloud-relay
📋
再起動:
cd ~/Documents/cloud-relay && docker compose up -d
📋
ファイル更新・デプロイ:
cd ~/Documents/cloud-relay/web/public && for f in *.html *.js *.css; do docker cp "$f" cloud-relay-web:/usr/share/nginx/html/"$f"; done && docker exec cloud-relay-web nginx -s reload
📋
z240sff / fatty6 共通:
cd ~/Documents/cloud-relay && git pull origin main
📋
API 再起動 (systemd):
sudo systemctl restart cloud-relay-api
📋