#author("2024-06-27T00:28:31+00:00","default:hotate","hotate") #author("2024-06-30T00:13:35+00:00","default:hotate","hotate") #contents &tag(Redmine,トラブル); * 目次 [#r2b2e7f4] #taglist(tag=Redmine) * 表示 [#kc4b2ee5] ** チケット表示時にエラー発生 [#ve98a463] - 症状:チケット表示時にHTTPエラー500が発生する。(プレビュー時も同様) I, [2017-03-19T19:46:23.258443 #12441] INFO -- : Completed 500 Internal Server Error in 29ms (ActiveRecord: 3.5ms) F, [2017-03-19T19:46:23.260961 #12441] FATAL -- : ActionView::Template::Error (invalid byte sequence in UTF-8): 1: <% if @notes %> 2: <fieldset class="preview"><legend><%= l(:field_notes) %></legend> 3: <%= textilizable @notes, :attachments => @attachments, :object => @issue %> 4: </fieldset> 5: <% end %> 6: lib/redmine/wiki_formatting/markdown/formatter.rb:62:in `gsub!' lib/redmine/wiki_formatting/markdown/formatter.rb:62:in `to_html' - 原因:データベースに[[utf-8]]以外の不正な文字が入っている為。 - 対処(一時的):上記のスタックトレースにデータのID番号が記載されているので、[[MySQL]]のコマンドで削除すれば良い。 "last_journal_id"=>"4983" mysql> update journals set notes="" where id=4983; - 参考:デフォルトの"utf8"では絵文字を入力出来ない為、データベースを"utf8mb4"に変換する必要がある。変換方法は[[Redmine/システム管理>Redmine/システム管理#rd28a9b9]]を参照。 ** Redmine 4.0 - ActionView::Template::Error [#t9a25ee2] - 症状:下記のエラーが発生して設定画面を開けない。(2019/09/16) ActionView::Template::Error (undefined method `close_duplicate_issues' - 原因:古いバージョンの設定ファイルを流用している為。([[Defect #30234: Redmine 4.0 - ActionView::Template::Error - Redmine>https://www.redmine.org/issues/30234]]) it looks like config/settings.yml is from the old version, did you follow http://www.redmine.org/projects/redmine/wiki/RedmineUpgrade ? - 対処:新しいバージョンの[[Redmine]]に入っている設定ファイルを使う。 * 起動 [#g9c9e4b4] ** [[Nginx]]更新時に起動しない [#j9edd273] - 症状:[[Nginx]]を[[Homebrew]]で更新した際に起動しない。(2019/09/16) - 環境:[[macOS]]([[Monterey]], [[Homebrew]]) - 原因:[[Passenger]]との整合が取れていない為 - 対処:[[Passenger]]も併せて更新(再インストール)する。 - 参考:[[Nginx]]起動時にネットワークアクセスの許可を確認するダイアログが表示されるのが正解。表示されない場合は問題有りの可能性が高い。 ** 起動しない(プラグイン) [#i398b508] - 症状:起動しない。直ぐに落ちてしまう。ログにも出ない。(2021/04/05) - 原因:プラグインの互換性がない為 - 対処:まずは全てのプラグインを外して起動するか確認する。起動するなら、いずれかのプラグインの問題である可能性が高い。 - 参考:特に古い環境の[[バックアップ]]をプラグインと共にインポートした際に起こりやすい。 ** 起動しない([[gem]]) [#tddf0c98] - 症状:起動しない。直ぐに落ちてしまう。ログには下記が出力されていた。(2022/01/22) App 7044 output: Error: The application encountered the following error: superclass mismatch for class StringIO (TypeError) - 環境:[[macOS]]([[Monterey]], [[Homebrew]]) - 原因:不整合なバージョンの[[gem]]が含まれている為 - 対処:不要な[[gem]]をアンインストールした。 $ gem uninstall stringio Gem stringio-0.1.0 cannot be uninstalled because it is a default gem Successfully uninstalled stringio-3.0.1 - 結果:正常に起動することを確認した。 - 参考:[[Gem update後にRedmineが起動不可となったのでその対策 – UbuntuによるEco Linuxサーバ構築記>https://eco.senritu.net/gem-update%E5%BE%8C%E3%81%ABredmine%E3%81%8C%E8%B5%B7%E5%8B%95%E4%B8%8D%E5%8F%AF%E3%81%A8%E3%81%AA%E3%81%A3%E3%81%9F%E3%81%AE%E3%81%A7%E3%81%9D%E3%81%AE%E5%AF%BE%E7%AD%96/]] * バージョンアップ [#fa75726c] ** マイグレーション時にsecret_tokenのエラー発生 [#ub731026] - 症状:下記のエラーが発生する。([[2019]]/09/16) Missing `secret_token` and `secret_key_base` for 'development' environment, set these values in `config/secrets.yml` - 原因:Rails4.1からの変更の為 - 対処:"config/secrets.yml" を作成して "secret_token" を記載する。 - 参考: -- [[【Mac】開発環境にRedmineをインストールして動かす - Qiita>https://qiita.com/y_minowa/items/f12aabbae7b0048cfe64]] -- [[production環境でsecret_tokenをセットする(rails) - Qiita>https://qiita.com/takusemba/items/2ad25d3d0a007757c194]] ** 移行スクリプトにてSQLエラー発生 [#q19626db] - 前提:[[MySQL/8.0]] - 症状:移行スクリプト(自前)にてMySQLのユーザを作成する際にエラー発生。([[2021]]/04/05) ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'identified by 'password'' at line 1 - 原因:以前のバージョンでは問題無かったが、[[MySQL/8.0]]ではユーザ作成と権限設定を別々に行う必要がある為。 - 対処:[[SQL]]を下記に変更した。(ユーザ作成と権限設定を分割) mysql> create user 'user'@'localhost' identified by 'password'; mysql> grant all privileges on db.* to 'user'@'localhost'; - 参考:bitnami Redmine 4.2.0移行時に発生した。([[Redmine v4.2.0>Redmine/情報#p36f38c8]]) ** マイグレーション時に実施済のエラー発生 [#h60328e6] - 症状:マイグレーション実施済のエラーが発生する。([[2021]]/04/11) - 原因:プラグインフォルダに名前の異なる同じプラグインが入っている為 - 対処:同一プラグインを外す。(バックアップのインポート処理を行うスクリプトを修正する) ** v5.0.2へ更新後、起動しない([[gem]]) [#sa02cac5] - 症状:起動しない。[[Nginx]]のログには下記が出力されていた。([[2022]]/08/15) The application encountered the following error: You have already activated strscan 1.0.3, but your Gemfile requires strscan 3.0.4. Since strscan is a default gem, you can either remove your dependency on it or try updating to a newer version of bundler that supports strscan as a default gem. (Gem::LoadError) - 環境:[[macOS]]([[Monterey]], [[Homebrew]]) - 原因:必要なバージョンの[[gem]]がインストールされていない為。 - 対処:必要なバージョンの[[gem]]をインストールした。 $ gem install strscan -v "3.0.4" - 結果:正常に起動することを確認した。 ** [[MySQL]] v8.3.0に更新後、起動しない [#jbd6f295] - 症状:起動しない。[[Nginx]]のログには下記が出力されていた。([[2024]]/02/12) Reason: tried: '/opt/homebrew/opt/mysql/lib/libmysqlclient.22.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/mysql/lib/libmysqlclient.22.dylib' (no such file), '/opt/homebrew/opt/mysql/lib/libmysqlclient.22.dylib' (no such file), '/opt/homebrew/Cellar/mysql/8.3.0/lib/libmysqlclient.22.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/mysql/8.3.0/lib/libmysqlclient.22.dylib' (no such file), '/opt/homebrew/Cellar/mysql/8.3.0/lib/libmysqlclient.22.dylib' (no such file) - /Library/WebServer/share/redmine-5.1.1/vendor/bundle/ruby/3.1.0/gems/mysql2-0.5.5/lib/mysql2/mysql2.bundle (LoadError) - 環境:[[macOS]]([[Sonoma]], [[Homebrew]]) - 原因:既存のmysql2 (v0.5.5) が[[MySQL]] v8.3.0に対応していない為。 - 対処:[[MySQL]] v8.3.0に対応したmysql2 v0.5.6をインストールした。 Successfully installed mysql2-0.5.6 - 結果:正常に起動することを確認した。(2024/02/13) ** v5.1.4へ更新後、起動しない([[gem]]) [#pb6d9464] ** v5.1.3へ更新後、起動しない([[gem]]) [#pb6d9464] - 症状:起動しない。[[Nginx]]のログには下記が出力されていた。([[2024]]/06/27) [ E 2024-06-27 09:20:43.4719 84845/Ts age/Cor/App/Implementation.cpp:221 ]: Could not spawn process for application /Library/WebServer/share/redmine-5.1.3: The application encountered the following error: You have already activated strscan 3.0.6, but your Gemfile requires strscan 3.1.0. Prepending `bundle exec` to your command may solve this. (Gem::LoadError) - 環境:[[macOS]]([[Sonoma]], [[Homebrew]]) - 原因:必要なバージョンの[[gem]]がインストールされていない為。 - 対処:必要なバージョンの[[gem]]をインストールした。 $ gem install strscan -v "3.1.0" - 結果:正常に起動することを確認した。 * [[バックアップ]] [#fa793b28] ** [[MySQL]]のバックアップにてエラー発生 [#sfa46bb4] - 前提:[[MySQL/5.7]] - 症状:下記のエラーが発生する。(2020/09/13) mysqldump: Error: 'Access denied; you need (at least one of) the PROCESS privilege(s) for this operation' when trying to dump tablespaces - 原因:[[MySQL]]のバージョンアップにより、権限が必要になった為 - 対処:必要な権限を付与する。 GRANT PROCESS ON *.* TO "backup-user"@localhost; - 参考:[[mysqldumpでPROCESS権限(PROCESS privilege)を要求される - いっさいがっさい>https://isgs-lab.com/424/]] * インストール [#y442ae42] ** [[Windows11]]にてv5.0.3のインストール失敗 [#heac7b96] - 対象: https://github.com/bitnami/vms/issues/644#issuecomment-1408242646 This is the last Bitnami Redmine installer for Windows we published https://downloads.bitnami.com/files/stacks/redmine/5.0.3-0/bitnami-redmine-5.0.3-0-windows-x64-installer.exe - 症状:[[Windows11]]では[[gem]]のインストールに失敗した。(インストールは最後まで完了したように見えるが、途中でアラートが表示され、実は成功していない) - 原因:不明(同梱の[[Ruby]] 2.6が古い為と予想) -- 参考:[[Ruby 2.6.10 Released>https://www.ruby-lang.org/en/news/2022/04/12/ruby-2-6-10-released/]] After this release, Ruby 2.6 reaches EOL. - 対処:[[Ruby]] 3.1へ入れ替えて、Gemfile.lockを削除した後([[Ruby]] 2.6の記載が残っている為)、[[gem]]を再インストールしたところ、今度は成功した。ただし、mysql2のインストールは下記を参照。(2023/10/05) --- [[Windows10にRedmineをインストールした - Qiita>https://qiita.com/Phinloda/items/58afa1e42a36503bf076#step-4---%E4%BE%9D%E5%AD%98%E3%81%99%E3%82%8B%E3%82%BD%E3%83%95%E3%83%88%E3%82%A6%E3%82%A7%E3%82%A2%E3%81%AE%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB]] /usr/local/mysql-connector-c++-8.0.30-win32 に展開しておき、これを --with-mysql-dir= で指定して、Ruby をインストールしたディレクトリに移動し、mysql2 をインストールする。 gem install mysql2 -- --with-mysql-dir="/usr/local/mysql-connector-c++-8.0.30-win32" --- なお、64bit版ではエラーが発生する為、libフォルダへ[[シンボリックリンク]]を作っておくと問題を回避出来る。 mklink /d lib64 lib --- bundle installでオプションを指定するには、configオプションを利用すれば良い。 bundle config build.mysql2 --with-mysql-dir="/usr/local/mysql-connector-c++-8.0.30-win32" --- 参考:[[bundlerでもオプションを指定したい - tumblr>https://shim0mura.hatenadiary.jp/entry/20140117/1389971784]] bundlerを使う時は以下のように行う bundle config build.charlock_holmes --with-icu-dir=/path/to/installed/icu4c - 参考: [[Bundler]] * 設定 [#p14a8204] - 環境:[[macOS]] ** [[Nginx]] [#s1245409] *** Intel [#r1d17cfa] - ログ -- /usr/local/var/nginx/log/error.log - 設定 -- /usr/local/etc/nginx/nginx.conf *** [[M1]] [#y203955d] - ログ -- /opt/homebrew/var/log/nginx/error.log - 設定 -- /opt/homebrew/etc/nginx/nginx.conf ** [[Apache]] [#n83d5a54] - ログ -- /private/var/log/apache2/error_log - 設定 -- /private/etc/apache2/httpd.conf * 関連 [#b1f193f5] #related