From f757c867e6e5027e7ada44e3efef2e6bf97988dd Mon Sep 17 00:00:00 2001 From: Doug Emery Date: Fri, 9 Sep 2022 13:46:54 -0400 Subject: [PATCH 1/2] WIP: changing all SOLR ports to 8983 for testing on SDBMDEV --- config/SolrMarc/config.properties | 2 +- config/sunspot.yml | 2 +- docker-compose-dev.yml | 2 +- docker-compose.yml | 2 +- lib/sdbmss/util.rb | 2 +- run_tests.sh | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) mode change 100755 => 100644 run_tests.sh diff --git a/config/SolrMarc/config.properties b/config/SolrMarc/config.properties index 262ec72d..59f9a695 100644 --- a/config/SolrMarc/config.properties +++ b/config/SolrMarc/config.properties @@ -28,7 +28,7 @@ solr.indexer.properties = index.properties # NOTE: # When using the solr:marc:index rake task, this value will be automatically # looked up from your solr.yml, and the value here will NOT be used. -solr.hosturl = http://localhost:8982/solr/update +solr.hosturl = http://localhost:8983/solr/update # MARC handling parameters marc.to_utf_8 = true diff --git a/config/sunspot.yml b/config/sunspot.yml index 7a745da3..eb42c972 100644 --- a/config/sunspot.yml +++ b/config/sunspot.yml @@ -6,7 +6,7 @@ production: solr: # hostname: localhost - port: 8982 + port: 8983 log_level: WARNING # path: /solr/production # read_timeout: 2 diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml index e7a9b43d..216b0538 100644 --- a/docker-compose-dev.yml +++ b/docker-compose-dev.yml @@ -42,7 +42,7 @@ services: context: . dockerfile: Dockerfile ports: - - "8982:8982" + - "8983:8983" # logging: # driver: "journald" links: diff --git a/docker-compose.yml b/docker-compose.yml index 0c016498..b0024076 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -63,7 +63,7 @@ services: image: 'gitlab.library.upenn.edu/sdbm/sdbmss/sdbmss_web:${SDBMSS_IMAGE_TAG}' restart: always ports: - - "8982:8982" + - "8983:8983" # env_file: .docker-environment # logging: # driver: "journald" diff --git a/lib/sdbmss/util.rb b/lib/sdbmss/util.rb index 49ec17d4..1b464537 100644 --- a/lib/sdbmss/util.rb +++ b/lib/sdbmss/util.rb @@ -507,7 +507,7 @@ def int? s # really can take 5 secs, if not more. def wait_for_solr_to_be_current host = ENV['SOLR_URL'].present? ? URI(ENV['SOLR_URL']).host : 'localhost' - uri = "http://#{host}:8982/solr/admin/cores?action=STATUS&core=test" + uri = "http://#{host}:8983/solr/admin/cores?action=STATUS&core=test" current = false count = 0 diff --git a/run_tests.sh b/run_tests.sh old mode 100755 new mode 100644 index 34e1d581..eda1a4d1 --- a/run_tests.sh +++ b/run_tests.sh @@ -5,7 +5,7 @@ # Do NOT use this when running in a Docker container! export RAILS_ENV=test -export SOLR_URL="http://127.0.0.1:8982/solr/test" +export SOLR_URL="http://127.0.0.1:8983/solr/test" bundle exec god -c sdbmss_test.god -l log/god_test.log From 65279ce0ad7169610b9e5a537553c83a75e51aeb Mon Sep 17 00:00:00 2001 From: Doug Emery Date: Fri, 9 Sep 2022 16:42:23 -0400 Subject: [PATCH 2/2] Add SOLR port note to READMEs --- README-development.md | 5 +++++ README.md | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/README-development.md b/README-development.md index 8151143a..df98e185 100644 --- a/README-development.md +++ b/README-development.md @@ -50,6 +50,11 @@ Generate separate keys (for each) by running rails task secret. URL for SOLR server, using relative location of docker service (using name 'solr' from docker-compose.yml) +NB: The SOLR port here and everywhere else in the code is `8983`. Previous versions +of the code had `8982` in some cases. This was wrong and created a conflict +between Jetty (which was set to `8983` and the docker-compose values, which +had `8982`). + SOLR_URL=http://solr:8983/solr/development **3. Build and Run (First Time)** diff --git a/README.md b/README.md index 8d2abde2..c509b411 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,11 @@ DEPRECATED -- USING ANSIBLE URL for SOLR server, using relative location of docker service (using name 'solr' from docker-compose.yml) +NB: The SOLR port here and everywhere else in the code is `8983`. Previous versions +of the code had `8982` in some cases. This was wrong and created a conflict +between Jetty (which was set to `8983` and the docker-compose values, which +had `8982`). + SOLR_URL=http://solr:8983/solr/development **3. (Optional) Create a file VERSION in the root folder of the cloned repository.**