next-l / enju_leaf

Next-L Enju Leaf 統合図書館管理システム / integrated library system https://enju.next-l.jp/
https://www.next-l.jp
MIT License
118 stars 24 forks source link

EnjuはOpenJDK 11で動作するか #1889

Closed miyatatk closed 1 month ago

miyatatk commented 1 month ago

@nabeta ご無沙汰しております。だいぶ時間が経ってしまいました。

標準のDockerインストールでは自宅のDebianサーバー環境にどうしても合わないため、改めて開発者向けインストールを実行しています。

その際、openjdk-8-jre-headless パッケージがDebian Bullseyeでは入手できないないため、代わりに、openjdk-11-jre-headlessパッケージを使うことを考えています。

しかし、以前サーバーにインストールしたときはOpenJDK 11ではEnjuは動かず、やむを得ず削除してOpenJDK 8にダウングレードした記憶があります。

その後、EnjuはOpenJDK 11 でも動作するようになったのでしょうか。もし動かないのであれば、この点だけでも改良して頂けたらと思います。

miyatatk commented 1 month ago

【追伸】 java-1.8.0-amazon-corretto-jdk でも動作するでしょうか?

nabeta commented 1 month ago

@miyatatk 以下にあるschema.xmlsolrconfig.xmlで、Solr 8を使ったことがあります。これらのファイルを、Solrの設定ファイル(/var/solr/data/コア名/conf)にコピーしてみてください。
https://github.com/sunspot/sunspot/tree/master/examples/solr7_core/conf

nabeta commented 1 month ago

java-1.8.0-amazon-corretto-jdk でも動作するでしょうか?

@miyatatk 特別な機能は使用していないので、おそらく動作するはずです。

miyatatk commented 1 month ago

Solr と OpenJDKの話が両方出ていますが、Solr 8 でも動作し、OpenJDKは11でなく8で、ということでしょうか?

miyatatk commented 1 month ago

@nabeta Enju Leaf 1.4.7の構成ファイル(Dockerfile, docker-compose.yml, Gemfile など)を確認したところ、このバージョンではOpenJDKは使われていないようですね。「開発者向けインストール」に書いてあることは少し情報が古いようなので、改めて1.4.7のソースコードをよく見てみます。

nabeta commented 1 month ago

@miyatatk 説明が抜けていてすみません。動作対象にJava11が明記されているのがSolr8になるので、Solr8にアップデートしていただくつもりで書いていました。 https://solr.apache.org/guide/8_11/solr-system-requirements.html

miyatatk commented 1 month ago

@nabeta お返事ありがとうございます。Solr8は構成ファイルにありますが、Solrに伴って自動的にJava11もインストールされるのですか?

nabeta commented 1 month ago

@miyatatk 申し訳ありません、1.4系はSolr6を使っていると思っていましたが、Solr8を使用していました。ですので、OpenJDK 11でも動作します。寝ぼけたコメントをしていました。

Enju Leaf 1.4.7の構成ファイル(Dockerfile, docker-compose.yml, Gemfile など)を確認したところ、このバージョンではOpenJDKは使われていないようですね。

1.4系以降、Dockerでの構成が前提になっているので、ソースコード内には直接Java(OpenJDK)のインストールの記述はありません。

Solr8は構成ファイルにありますが、Solrに伴って自動的にJava11もインストールされるのですか?

Dockerで動作させる場合、Solrのコンテナに入っているJava(OpenJDK 11)が使われますので、別途インストールする必要はありません。Dockerを使用しない場合は、別途インストールする必要があります。

$ docker compose exec solr bash
solr@7e8c2274642b:/opt/solr-8.11.3$ java -version
openjdk version "11.0.24" 2024-07-16
OpenJDK Runtime Environment Temurin-11.0.24+8 (build 11.0.24+8)
OpenJDK 64-Bit Server VM Temurin-11.0.24+8 (build 11.0.24+8, mixed mode, sharing)
miyatatk commented 1 month ago

@nabeta よく分かりました。ありがとうございます。

ところで、新しい1.4.7に移行する前の作業として、現在Debian 10.13 で動いているEnju 1.3.5 を1.3.6にアップグレードしたところ、起動しなくなりました。foreman start するとSolrの起動で止まります。 15:47:51 resque.1 | Tasks: TOP => environment 15:47:51 resque.1 | (See full trace by running task with --trace) 15:47:51 solr.1 | rake aborted! 15:47:51 solr.1 | Could not find cache store adapter for redis_store (cannot load such file -- active_support/cache/redis_store)

Rubyのバージョンが2.5.5と古いことが原因かもしれないので、これを2.7.8に上げても大丈夫でしょうか。 ruby '2.5.5'

Procfile の内容を1行だけ実行したときのエラーは以下のとおりです。

$ bundle exec rake sunspot:solr:run
rake aborted!
ArgumentError: invalid value for Integer(): "enju_leaf"
/home/user/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/redis-client-0.19.1/lib/redis_client/url_config.rb:26:in `Integer'
/home/user/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/redis-client-0.19.1/lib/redis_client/url_config.rb:26:in `db'
/home/user/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/redis-client-0.19.1/lib/redis_client/config.rb:175:in `initialize'
/home/user/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/redis-client-0.19.1/lib/redis_client.rb:144:in `new'
/home/user/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/redis-client-0.19.1/lib/redis_client.rb:144:in `config'
/home/user/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/redis-5.1.0/lib/redis/client.rb:23:in `config'
/home/user/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/redis-5.1.0/lib/redis.rb:142:in `initialize_client'
/home/user/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/redis-5.1.0/lib/redis.rb:73:in `initialize'
/home/user/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/enju_leaf-1.3.6/config/initializers/redis.rb:2:in `new'
/home/user/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/enju_leaf-1.3.6/config/initializers/redis.rb:2:in `<top (required)>'
/home/user/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.8.1/lib/active_support/dependencies.rb:285:in `load'
/home/user/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.8.1/lib/active_support/dependencies.rb:285:in `block in load'
/home/user/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.8.1/lib/active_support/dependencies.rb:257:in `load_dependency'
/home/user/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.8.1/lib/active_support/dependencies.rb:285:in `load'
/home/user/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/railties-5.2.8.1/lib/rails/engine.rb:663:in `block in load_config_initializer'
/home/user/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.8.1/lib/active_support/notifications.rb:170:in `instrument'
/home/user/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/railties-5.2.8.1/lib/rails/engine.rb:662:in `load_config_initializer'
/home/user/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/railties-5.2.8.1/lib/rails/engine.rb:620:in `block (2 levels) in <class:Engine>'
/home/user/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/railties-5.2.8.1/lib/rails/engine.rb:619:in `each'
/home/user/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/railties-5.2.8.1/lib/rails/engine.rb:619:in `block in <class:Engine>'
/home/user/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/railties-5.2.8.1/lib/rails/initializable.rb:32:in `instance_exec'
/home/user/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/railties-5.2.8.1/lib/rails/initializable.rb:32:in `run'
/home/user/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/railties-5.2.8.1/lib/rails/initializable.rb:61:in `block in run_initializers'
/home/user/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/railties-5.2.8.1/lib/rails/initializable.rb:50:in `each'
/home/user/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/railties-5.2.8.1/lib/rails/initializable.rb:50:in `tsort_each_child'
/home/user/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/railties-5.2.8.1/lib/rails/initializable.rb:60:in `run_initializers'
/home/user/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/railties-5.2.8.1/lib/rails/application.rb:361:in `initialize!'
/home/user/enju_leaf_13/config/environment.rb:5:in `<top (required)>'
/home/user/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
/home/user/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
/home/user/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.8.1/lib/active_support/dependencies.rb:291:in `block in require'
/home/user/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.8.1/lib/active_support/dependencies.rb:257:in `load_dependency'
/home/user/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.8.1/lib/active_support/dependencies.rb:291:in `require'
/home/user/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/railties-5.2.8.1/lib/rails/application.rb:337:in `require_environment!'
/home/user/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/railties-5.2.8.1/lib/rails/application.rb:520:in `block in run_tasks_blocks'
/home/user/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/rake-13.2.1/exe/rake:27:in `<top (required)>'
Tasks: TOP => sunspot:solr:run => environment
(See full trace by running task with --trace)
nabeta commented 1 month ago

@miyatatk .envでREDIS_URLが以下のようになっていたら、

REDIS_URL=redis://127.0.0.1:6379/enju_leaf/1

以下のように変更していただけますか。

REDIS_URL=redis://127.0.0.1:6379
miyatatk commented 1 month ago

@nabeta 変更しましたが、だめです。

$ foreman start
17:39:39 solr.1   | started with pid 16060
17:39:39 resque.1 | started with pid 16061
17:39:39 web.1    | started with pid 16062
17:39:49 solr.1   | rake aborted!
17:39:49 solr.1   | Could not find cache store adapter for redis_store (cannot load such file -- active_support/cache/redis_store)
17:39:49 solr.1   | /home/user/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.8.1/lib/active_support/cache.rb:109:in `rescue in retrieve_store_class'
17:39:49 solr.1   | /home/user/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.8.1/lib/active_support/cache.rb:104:in `retrieve_store_class'
17:39:49 solr.1   | /home/user/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.8.1/lib/active_support/cache.rb:60:in `lookup_store'
17:39:49 solr.1   | /home/user/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/railties-5.2.8.1/lib/rails/application/bootstrap.rb:67:in `block in <module:Bootstrap>'
17:39:49 solr.1   | /home/user/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/railties-5.2.8.1/lib/rails/initializable.rb:32:in `instance_exec'
17:39:49 solr.1   | /home/user/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/railties-5.2.8.1/lib/rails/initializable.rb:32:in `run'
17:39:49 solr.1   | /home/user/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/railties-5.2.8.1/lib/rails/initializable.rb:61:in `block in run_initializers'
17:39:49 solr.1   | /home/user/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/railties-5.2.8.1/lib/rails/initializable.rb:60:in `run_initializers'
17:39:49 solr.1   | /home/user/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/railties-5.2.8.1/lib/rails/application.rb:361:in `initialize!'
17:39:49 solr.1   | /home/user/enju_leaf_13/config/environment.rb:5:in `<top (required)>'
17:39:49 solr.1   | /home/user/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
17:39:49 solr.1   | /home/user/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
17:39:49 solr.1   | /home/user/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.8.1/lib/active_support/dependencies.rb:291:in `block in require'
17:39:49 solr.1   | /home/user/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.8.1/lib/active_support/dependencies.rb:257:in `load_dependency'
17:39:49 solr.1   | /home/user/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.8.1/lib/active_support/dependencies.rb:291:in `require'
17:39:49 solr.1   | /home/user/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/railties-5.2.8.1/lib/rails/application.rb:337:in `require_environment!'
17:39:49 solr.1   | /home/user/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/railties-5.2.8.1/lib/rails/application.rb:520:in `block in run_tasks_blocks'
17:39:49 solr.1   | /home/user/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/rake-13.2.1/exe/rake:27:in `<top (required)>'
17:39:49 solr.1   | 
17:39:49 solr.1   | Caused by:
17:39:49 solr.1   | LoadError: cannot load such file -- active_support/cache/redis_store
nabeta commented 1 month ago

@miyatatk 以下の行はGemfileにありますでしょうか。なければ追加してbundle installを実行してください。

gem 'redis-rails'
miyatatk commented 1 month ago

@nabeta redis-rails はなかったのでインストールしました。foreman start で先ほどのように止まらなくなりましたが、依然としてブラウザーにはページが表示されません。

コマンドラインのエラーメッセージは以下のとおりです。

18:08:06 web.1    | 2024-08-16 18:08:06 +0900: HTTP parse error, malformed request (): #<Puma::HttpParserError: Invalid HTTP format, parsing fails.>
18:08:06 web.1    | ---
18:08:06 web.1    | 2024-08-16 18:08:06 +0900: HTTP parse error, malformed request (): #<Puma::HttpParserError: Invalid HTTP format, parsing fails.>
18:08:06 web.1    | ---
nabeta commented 1 month ago

@miyatatk config/environments/production.rbの以下の部分を変更するとどうなりますでしょうか。

# httpでアクセスする場合はfalseに変更する
config.force_ssl = false
miyatatk commented 1 month ago

NGINXで http://127.0.0.1:3000 にリダイレクトしていたので、これを止めました。しかし、アクセスできません。

同一マシン内でcurlすると次のようにエラーします。

$ curl -I http://127.0.0.1:3000
HTTP/1.1 301 Moved Permanently
Content-Type: text/html
Location: https://127.0.0.1:3000/
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
miyatatk commented 1 month ago

念のため、Gemfile の中身は以下のようになっています。バージョンは合っているでしょうか。

source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby '2.5.5'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.2.6'
# Use postgresql as the database for Active Record
gem 'pg', '>= 0.18', '< 2.0'
# Use Puma as the app server
gem 'puma', '~> 3.11'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'mini_racer', platforms: :ruby

# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 4.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use ActiveStorage variant
# gem 'mini_magick', '~> 4.8'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.1.0', require: false

group :development, :test do
  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
  gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
end

group :development do
  # Access an interactive console on exception pages or by calling 'console' anywhere in the code.
  gem 'web-console', '>= 3.3.0'
  gem 'listen', '>= 3.0.5', '< 3.2'
  # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
  gem 'spring'
  gem 'spring-watcher-listen', '~> 2.0.0'
end

group :test do
  # Adds support for Capybara system testing and selenium driver
  gem 'capybara', '>= 2.15'
  gem 'selenium-webdriver'
  # Easy installation and use of chromedriver to run system tests with Chrome
  gem 'chromedriver-helper'
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

gem 'enju_leaf', '~> 1.3.6'
gem 'enju_manifestation_viewer', '~> 0.3.4'
gem 'enju_circulation', '~> 0.3.8'
gem 'enju_subject', '~> 0.3.3'
gem 'enju_ndl', '~> 0.3.2'
gem 'enju_nii', '~> 0.3.1'
gem 'enju_loc', '~> 0.3.0'
gem 'enju_inventory', '~> 0.3.1'
gem 'jquery-rails'
gem 'charlock_holmes', platforms: :mri
gem 'resque', require: 'resque/server'
gem 'exception_notification', '~> 4.4'
gem 'sunspot_solr', '~> 2.5.0'
gem 'progress_bar'
gem 'non-stupid-digest-assets'
gem 'dotenv-rails', '~> 2.5'
gem 'fix_microsoft_links'
gem 'responders'
gem 'rails-i18n'
gem 'redis-rails'

# cron
gem 'whenever', require: false

gem "redis-store", "~> 1.11"
nabeta commented 1 month ago

@miyatatk config.force_ssl = falseになっていることを確認した上で、Webブラウザの履歴とキャッシュを削除してみてください。

miyatatk commented 1 month ago

@miyatatk config.force_ssl = falseになっていることを確認した上で、Webブラウザの履歴とキャッシュを削除してみてください。

はい、上記で config.force_ssl = false も試しましたがだめでした。ブラウザだけでなく、同一ホスト内のcurlでもだめなので、そもそもページが生成されていないと思います。

nabeta commented 1 month ago

@miyatatk Enjuの再起動はしていますでしょうか。また、それを行っても、引き続き https://127.0.0.1:3000/ にリダイレクトされる状態でしょうか。

miyatatk commented 1 month ago

@nabeta 再起動しています。というより、Enjuは起動しないためホストマシンの再起動を繰り返しています。

http://lib.example.com ---> https://lib.example.com ---> http://127.0.0.1:3000 にリダイレクトするのはNGINXの設定なので、これを止めてあります。したがって、Enjuが動いていれば http://lib.example.com:3000 でアクセスできるはずです。

nabeta commented 1 month ago

@miyatatk foreman startはエラーなく起動できていますでしょうか。

miyatatk commented 1 month ago

@nabeta いいえ、上記のように foreman start がエラーしてEnju 1.3.6 が起動しないというのが、お伝えしている問題です。

nabeta commented 1 month ago

@miyatatk 以下を教えてください。

miyatatk commented 1 month ago

@nabeta

$ cat Procfile 
solr: bundle exec rake sunspot:solr:run
resque: bundle exec rake environment resque:work QUEUE=enju_leaf,mailers TERM_CHILD=1
web: bundle exec rails s -p 3000

です。

miyatatk commented 1 month ago

Webサーバーを起動しようとすると、

$ bin/rails s -e production
=> Booting Puma
=> Rails 5.2.8.1 application starting in production 
=> Run `rails server -h` for more startup options
~/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/sinatra-2.2.4/lib/sinatra/base.rb:938: warning: constant Tilt::Cache is deprecated
~/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/net-protocol-0.1.2/lib/net/protocol.rb:68: warning: already initialized constant Net::ProtocRetryError
/usr/lib/ruby/2.5.0/net/protocol.rb:66: warning: previous definition of ProtocRetryError was here
~/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/net-protocol-0.1.2/lib/net/protocol.rb:208: warning: already initialized constant Net::BufferedIO::BUFSIZE
/usr/lib/ruby/2.5.0/net/protocol.rb:172: warning: previous definition of BUFSIZE was here
~/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/net-protocol-0.1.2/lib/net/protocol.rb:504: warning: already initialized constant Net::NetPrivate::Socket
/usr/lib/ruby/2.5.0/net/protocol.rb:439: warning: previous definition of Socket was here
'include Pundit' is deprecated. Please use 'include Pundit::Authorization' instead.
 (called from include at ~/enju_leaf_13/app/controllers/application_controller.rb:8)
~/enju_leaf_13/vendor/bundle/ruby/2.5.0/gems/sinatra-2.2.4/lib/sinatra/base.rb:938: warning: constant Tilt::Cache is deprecated
Puma starting in single mode...
* Version 3.12.6 (ruby 2.5.5-p157), codename: Llamas in Pajamas
* Min threads: 5, max threads: 5
* Environment: production
* Listening on tcp://0.0.0.0:3000
Use Ctrl-C to stop

この状態で別のシェルからアクセスすると、

 $ curl -I http://127.0.0.1:3000
HTTP/1.1 301 Moved Permanently
Content-Type: text/html
Location: https://127.0.0.1:3000/
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN

となります。

nabeta commented 1 month ago

@miyatatk ありがとうございます。アプリケーションとしては起動している状態のようですね。
config.force_sslの設定をもう一度見ていただけますか。設定ファイル内に2つ書いていませんか。

miyatatk commented 1 month ago

@nabeta 先ほどはconfig/environments/production.rbconfig.force_ssl = trueとした状態でした。

config.force_ssl = false

に変えると少しレスポンスが変わります。

$ curl -I http://127.0.0.1:3000
HTTP/1.1 500 Internal Server Error
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Permitted-Cross-Domain-Policies: none
Referrer-Policy: strict-origin-when-cross-origin
Content-Type: text/html; charset=utf-8
Cache-Control: no-cache
Set-Cookie: _enju_leaf13_session=9TSWVHNr6vpHPpTdx%2FF7V4ULSwajTg54hRWYWH1SzSp1O%2FYSkG%2FGbYYT4Pw5nXYkg%2FMQgbtZRTg6c55Z3zlS--OqgdJiVy8KpFMsU1--OwzQD1bhZnzCHuUZyYhtPg%3D%3D; path=/; HttpOnly
X-Request-Id: 948861e9-079b-43f2-a9fa-3866dfa259ce
X-Runtime: 0.256285

これまでずっとconfig.force_ssl = trueで運用してきましたが、NGINXを通じてhttps:// でアクセスする場合でも、

config.force_ssl = false

の設定でよいのでしょうか?

nabeta commented 1 month ago

@miyatatk まずconfig.force_ssl = falseの状態でEnjuをforeman経由で起動し、nginxを通してhttpsでアクセスできることを確認してください。

config.force_ssl = trueで動作させるには、nginxの設定が必要です。

proxy_set_header X-Forwarded-Proto $scheme;

全体の設定例は以下をご覧ください。 https://github.com/next-l/enju_leaf/wiki/Production

miyatatk commented 1 month ago

@nabeta 現在はconfig.force_ssl = false になっています。そもそも、1.3.6にアップグレードしてから、foreman経由でEnjuが起動できていません。

1.3.5の間は問題なくnginx経由でssl接続できていました。設定も概ね「設定例」と同じです。

nabeta commented 1 month ago

@miyatatk config.force_ssl = falseにしてforemanで起動した状態でも、引き続き以下のエラーが出ているということでしょうか。 https://github.com/next-l/enju_leaf/issues/1889#issuecomment-2293143271

miyatatk commented 1 month ago

@miyatatk config.force_ssl = falseにしてforemanで起動した状態でも、引き続き以下のエラーが出ているということでしょうか。

https://github.com/next-l/enju_leaf/issues/1889#issuecomment-2293143271

そうです。

nabeta commented 1 month ago

1.4系に移行済みのため、クローズします。 https://github.com/next-l/enju_leaf/issues/1892#issuecomment-2304570252