weixin_39800112
weixin_39800112
2020-12-02 01:49

run-h-dev-in-docker cannot work correctly, needing more configuration?

using the helper of https://groups.google.com/a/list.hypothes.is/forum/#!searchin/dev/docker/dev/mbPxRWF2Ax4/79l5kgvTAwAJ it almost succeed, but some functions cannot be enabled. Such as error example1: image press create button: image error example2: image

What I want to ask

So, I want to ask if there's some steps lost in run-h-dev-in-docker? It works correctly when following the install.rst using "make dev" (I want ask in:https://groups.google.com/a/list.hypothes.is/forum/#!forum/dev but when I submitted, all posts are deleted... image)

Steps to reproduce

step1: checkout to master:0fe368f(maybe any of recent version) step2: root:/home/of/h docker-compose up -d (h_elasticsearchold_1,h_postgres_1,h_rabbit_1,h_elasticsearch_1) step3: pull image git pull hypothesis/hypothesis //image id is a9f6f23d2d62(maybe any of recent version) step4:modify run-h-dev-in-docker: ES_CONTAINER=h_elasticsearchold_1 //using h_elasticsearch_1 will result in more errors. PG_CONTAINER=h_postgres_1 RABBITMQ_CONTAINER=h_rabbit_1

docker run \ --link $RABBITMQ_CONTAINER --net h_default \ --link $PG_CONTAINER \ --link $ES_CONTAINER \ -e "APP_URL=http://0.0.0.0:5000" \ -e "BROKER_URL=amqp://guest:guest@$RABBITMQ_CONTAINER:5672//" \ -e "DATABASE_URL=postgresql://postgres@$PG_CONTAINER/postgres" \ -e "ELASTICSEARCH_HOST=http://$ES_CONTAINER:9200" \ -e "CLIENT_OAUTH_ID=8454a690-5501-11e8-a100-5b656af29c7c" \ -e "CLIENT_URL=https://abc.example.com/hypothesis" \ -p 5000:5000 \ hypothesis/hypothesis

step5: root:./run-h-dev-in-docker log: 2018-05-12 02:29:30,888 INFO supervisord started with pid 1 2018-05-12 02:29:31,890 INFO spawned: 'logger' with pid 13 2018-05-12 02:29:31,892 INFO spawned: 'web' with pid 14 2018-05-12 02:29:31,894 INFO spawned: 'websocket' with pid 15 2018-05-12 02:29:31,896 INFO spawned: 'worker' with pid 16 2018-05-12 02:29:31,897 INFO spawned: 'collectd' with pid 17 2018-05-12 02:29:31,899 INFO spawned: 'nginx' with pid 18 2018-05-12 02:29:31,922 INFO success: collectd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs) 2018-05-12 02:29:31,924 INFO exited: collectd (exit status 0; expected) 2018-05-12 02:29:33,346 INFO success: logger entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2018-05-12 02:29:33,347 INFO success: web entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2018-05-12 02:29:33,347 INFO success: websocket entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2018-05-12 02:29:33,347 INFO success: worker entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2018-05-12 02:29:33,347 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) collectd | INFO: GRAPHITE_HOST not provided so collectd will not be started websocket (stderr) | 2018-05-12 02:29:32,652 [15] [gunicorn.error:INFO] Starting gunicorn 19.6.0 websocket (stderr) | 2018-05-12 02:29:32,653 [15] [gunicorn.error:INFO] Listening at: unix:/tmp/gunicorn-websocket.sock (15) websocket (stderr) | 2018-05-12 02:29:32,653 [15] [gunicorn.error:INFO] Using worker: h.websocket.Worker websocket (stderr) | 2018-05-12 02:29:32,657 [26] [gunicorn.error:INFO] Booting worker with pid: 26 websocket (stderr) | 2018-05-12 02:29:32,667 [26] [gunicorn.error:INFO] Made psycopg green websocket (stderr) | 2018-05-12 02:29:32,717 [26] [h.config:WARNING] No secret key provided: using transient key. Please configure the secret_key setting or the SECRET_KEY environment variable! web (stderr) | 2018-05-12 02:29:33,346 [14] [gunicorn.error:INFO] Starting gunicorn 19.6.0 web (stderr) | 2018-05-12 02:29:33,347 [14] [gunicorn.error:INFO] Listening at: unix:/tmp/gunicorn-web.sock (14) web (stderr) | 2018-05-12 02:29:33,347 [14] [gunicorn.error:INFO] Using worker: sync web (stderr) | 2018-05-12 02:29:33,351 [31] [gunicorn.error:INFO] Booting worker with pid: 31 web (stderr) | 2018-05-12 02:29:33,648 [31] [h.config:WARNING] No secret key provided: using transient key. Please configure the secret_key setting or the SECRET_KEY environment variable! worker (stderr) | 2018-05-12 02:29:34,578 [16] [h.config:WARNING] No secret key provided: using transient key. Please configure the secret_key setting or the SECRET_KEY environment variable! worker |
worker | -------------- celery v4.1.0 (latentcall) worker | ---- * ----- worker | --- * * -- Linux-4.4.0-105-generic-x86_64-with 2018-05-12 02:29:35 worker | -- * - * --- worker | - * ---------- [config] worker | - ---------- .> app: h:0x7faf18269350 worker | - ---------- .> transport: amqp://guest::5672// worker | - ---------- .> results: disabled:// worker | - --- * --- .> concurrency: 2 (prefork) worker | -- ** ---- .> task events: OFF (enable -E to monitor tasks in this worker) worker | --- *** ----- worker | -------------- [queues] worker | .> celery exchange=celery(direct) key=celery worker | .> indexer exchange=indexer(direct) key=indexer worker |

step6: I logged in, and press "Create new group", after filling the name of group and press "Create a new group" button, error is returned:

Expected behaviour

group created page should show correctly. client can displayed correctly.

Actual behaviour

get error page, says: Uh-oh, something went wrong! We’re very sorry, our application wasn’t able to load this page. The team has been notified and we’ll fix it shortly. If the problem persists or you'd like more information please contact support.is

Browser/system information

client:browser is chrome, firefox, edge, windows 10 server:ubuntu 16.04

该提问来源于开源项目:hypothesis/h

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

8条回答

  • weixin_39800112 weixin_39800112 5月前

    Hoping you can give me some suggestion! It seems that list_groups is disabled in docker.

    点赞 评论 复制链接分享
  • weixin_39800112 weixin_39800112 5月前

    It seems that there are some differences between "make dev" and "run in docker" We can follow the "make dev" steps to fill the gap between them. The error of my project is: new user doesn't belong to any group beside world.

    点赞 评论 复制链接分享
  • weixin_39800112 weixin_39800112 5月前

    don't forget to run "./bin/hypothesis --app-url xxx init" in container of h to init db and search.

    点赞 评论 复制链接分享
  • weixin_39552037 weixin_39552037 5月前

    I came across the same issue and resolve it with " ./bin/hypothesis init" inside the h container. It will be interesting to prepare a user guide of the installation steps on a VM and how to serve it on https.

    点赞 评论 复制链接分享
  • weixin_39800112 weixin_39800112 5月前

    Checking docs and issues and google mailing list can find what you want.

    点赞 评论 复制链接分享
  • weixin_39552037 weixin_39552037 5月前

    I have already served the app in dev version on https but I'm facing difficulties doing it with docker image. I have tried firstly to run the deserve command inside the container. I have used this command : unicorn --name web --reload --paste conf/app.ini --certfile=.tlscert.pem --keyfile=.tlskey.pem. But since I'm unable to stop nginx service inside the container. I get the error address in use. So I tried to change in the nginx conf file and add the ssl_certificate and key. Unfortunalty I have a permission denied error in binding with 0.0.0.0:443. Have you encountred this or tried it on your docker image.

    点赞 评论 复制链接分享
  • weixin_39800112 weixin_39800112 5月前

    I use another nginx to set https in front of docker.

    点赞 评论 复制链接分享
  • weixin_39552037 weixin_39552037 5月前

    Thanks for your reply. I've changed the configuration of nginx to accept https and it worked.

    点赞 评论 复制链接分享