Skip to content

Commit

Permalink
fix: downloading remote files gives HTTP 500 (#4112)
Browse files Browse the repository at this point in the history
* fix: downloading remote files gives HTTP 500

related to sciencemesh/nc-sciencemesh#34

* add: changelog for the pull request

* remove punctuation from title
  • Loading branch information
MahdiBaghbani authored Aug 15, 2023
1 parent f61ff09 commit a74498a
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 29 deletions.
6 changes: 6 additions & 0 deletions changelog/unreleased/fix-example-sciencemesh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Fix downloading remote files gives HTTP 500 error in owncloud

I've fixed the problem when ownCloud attempts to download a file from the remote site with reva in between, the download operation fails with HTTP 500.

https://github.com/cs3org/reva/pull/4112
https://github.com/cs3org/reva/issues/4068
62 changes: 33 additions & 29 deletions examples/sciencemesh/scripts/testing-sciencemesh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,25 +55,25 @@ docker run --detach --name=wopi.docker --network=testnet -p 8880:8880 -t cs
#docker run --detach --name=rclone.docker --network=testnet rclone/rclone rcd -vv --rc-user=rcloneuser --rc-pass=eilohtho9oTahsuongeeTh7reedahPo1Ohwi3aek --rc-addr=0.0.0.0:5572 --server-side-across-configs=true --log-file=/dev/stdout

# EFSS1
docker run --detach --network=testnet \
--name=maria1.docker \
-e MARIADB_ROOT_PASSWORD=eilohtho9oTahsuongeeTh7reedahPo1Ohwi3aek \
mariadb \
--transaction-isolation=READ-COMMITTED \
--binlog-format=ROW \
--innodb-file-per-table=1 \
docker run --detach --network=testnet \
--name=maria1.docker \
-e MARIADB_ROOT_PASSWORD=eilohtho9oTahsuongeeTh7reedahPo1Ohwi3aek \
mariadb \
--transaction-isolation=READ-COMMITTED \
--binlog-format=ROW \
--innodb-file-per-table=1 \
--skip-innodb-read-only-compressed

docker run --detach --network=testnet \
--name="${EFSS1}1.docker" \
--add-host "host.docker.internal:host-gateway" \
-e HOST="${EFSS1}1" \
-e DBHOST="maria1.docker" \
-e USER="einstein" \
-e PASS="relativity" \
-v "${ENV_ROOT}/temp/${EFSS1}.sh:/${EFSS1}-init.sh" \
-v "${ENV_ROOT}/$EFSS1-sciencemesh:/var/www/html/apps/sciencemesh" \
-v "${ENV_ROOT}/temp/${EFSS1}-1-tls:/tls" \
docker run --detach --network=testnet \
--name="${EFSS1}1.docker" \
--add-host "host.docker.internal:host-gateway" \
-e HOST="${EFSS1}1" \
-e DBHOST="maria1.docker" \
-e USER="einstein" \
-e PASS="relativity" \
-v "${ENV_ROOT}/temp/${EFSS1}.sh:/${EFSS1}-init.sh" \
-v "${ENV_ROOT}/$EFSS1-sciencemesh:/var/www/html/apps/sciencemesh" \
-v "${ENV_ROOT}/temp/${EFSS1}-1-tls:/tls" \
"pondersource/dev-stock-${EFSS1}-sciencemesh"

# EFSS2
Expand All @@ -94,8 +94,8 @@ docker run --detach --network=testnet \
-e USER="marie" \
-e PASS="radioactivity" \
-v "${ENV_ROOT}/temp/${EFSS2}.sh:/${EFSS2}-init.sh" \
-v "${ENV_ROOT}/${EFSS2}-sciencemesh:/var/www/html/apps/sciencemesh" \
-v "${ENV_ROOT}/temp/${EFSS2}-2-tls:/tls" \
-v "${ENV_ROOT}/${EFSS2}-sciencemesh:/var/www/html/apps/sciencemesh" \
-v "${ENV_ROOT}/temp/${EFSS2}-2-tls:/tls" \
"pondersource/dev-stock-${EFSS2}-sciencemesh"

# EFSS1
Expand All @@ -104,6 +104,7 @@ waitForPort "${EFSS1}1.docker" 443

docker exec "${EFSS1}1.docker" bash -c "cp /tls/*.crt /usr/local/share/ca-certificates/"
docker exec "${EFSS1}1.docker" update-ca-certificates
docker exec "${EFSS1}1.docker" bash -c "cat /etc/ssl/certs/ca-certificates.crt >> /var/www/html/resources/config/ca-bundle.crt"

docker exec -u www-data "${EFSS1}1.docker" sh "/${EFSS1}-init.sh"

Expand All @@ -126,6 +127,7 @@ waitForPort "${EFSS2}2.docker" 443

docker exec "${EFSS2}2.docker" bash -c "cp /tls/*.crt /usr/local/share/ca-certificates/"
docker exec "${EFSS2}2.docker" update-ca-certificates
docker exec "${EFSS2}2.docker" bash -c "cat /etc/ssl/certs/ca-certificates.crt >> /var/www/html/resources/config/ca-bundle.crt"

docker exec -u www-data "${EFSS2}2.docker" sh "/${EFSS2}-init.sh"

Expand All @@ -143,21 +145,23 @@ docker exec maria2.docker mariadb -u root -peilohtho9oTahsuongeeTh7reedahPo1Ohwi

# reva
waitForCollabora
docker run --detach --network=testnet \
--name="reva${EFSS1}1.docker" \
-e HOST="reva${EFSS1}1" \
-v "${ENV_ROOT}/../..:/reva" \
-v "${ENV_ROOT}/revad:/etc/revad" \
-v "${ENV_ROOT}/tls:/etc/revad/tls" \
-v "${ENV_ROOT}/scripts/reva-run.sh:/usr/bin/reva-run.sh" \
-v "${ENV_ROOT}/scripts/reva-kill.sh:/usr/bin/reva-kill.sh" \
-v "${ENV_ROOT}/scripts/reva-entrypoint.sh:/entrypoint.sh" \
docker run --detach --network=testnet \
--name="reva${EFSS1}1.docker" \
-e HOST="reva${EFSS1}1" \
-p 8080:80 \
-v "${ENV_ROOT}/../..:/reva" \
-v "${ENV_ROOT}/revad:/etc/revad" \
-v "${ENV_ROOT}/tls:/etc/revad/tls" \
-v "${ENV_ROOT}/scripts/reva-run.sh:/usr/bin/reva-run.sh" \
-v "${ENV_ROOT}/scripts/reva-kill.sh:/usr/bin/reva-kill.sh" \
-v "${ENV_ROOT}/scripts/reva-entrypoint.sh:/entrypoint.sh" \
pondersource/dev-stock-revad

docker run --detach --network=testnet \
--name="reva${EFSS2}2.docker" \
-e HOST="reva${EFSS2}2" \
-v "${ENV_ROOT}/../..:/reva" \
-p 8180:80 \
-v "${ENV_ROOT}/../..:/reva" \
-v "${ENV_ROOT}/revad:/etc/revad" \
-v "${ENV_ROOT}/tls:/etc/revad/tls" \
-v "${ENV_ROOT}/scripts/reva-run.sh:/usr/bin/reva-run.sh" \
Expand Down

0 comments on commit a74498a

Please sign in to comment.