orientechnologies / orientdb-docker

OrientDB running in a docker container
MIT License
63 stars 63 forks source link

empty response when upgrading from v2.2.3 to v2.2.4 #17

Closed damoiser closed 7 years ago

damoiser commented 8 years ago

I have upgraded the orientdb from v2.2.3 to v2.2.4 from our gitlab-ci-multi-runner, but I see a strange behaviour.

With v2.2.3 all the tests cases work properly, but with v2.2.4 I receive at the first request to orientdb of the tests an empty response => EOF but http status is 200 OK

The query is a simple select, something like this:

SELECT FROM class_name WHERE some_id = '1'

Some information about the CI:

Any idea?

wolf4ood commented 8 years ago

Hi @damoiser

can you try to add this parameter and tell me if it fixes your tests ?

in the server startup

-Dnetwork.http.streaming=false

or in orientdb-server-xml

http://orientdb.com/docs/2.2/Configuration.html

Thanks

damoiser commented 8 years ago

Thanks for your feedback @maggiolo00

Can I pass this as a environment variable similar to the ORIENTDB_ROOT_PASSWORD?

I use this docker image as a service ( services on gitlab-ci-multi-runner ) and I can "actually" pass only configs as environment variable.

Otherwise I should fork your project, create a new docker-image with the changes you suggest and test with it.

robfrank commented 8 years ago

Take a look at doc about orientdb container: https://hub.docker.com/_/orientdb/ You can pass java options this way:

$ docker run -d --name orientdb -p 2424:2424 -p 2480:2480 \
    -e ORIENTDB_ROOT_PASSWORD=rootpwd \
    orientdb:latest /orientdb/bin/server.sh -Xmx8g -Dnetwork.http.streaming=false

If it works, please close the issue

damoiser commented 8 years ago

Thanks @robfrank - Yep, I know how can I pass a variable to a docker container "IF" I run the docker run command. Unfortunately, this is not the case.

With gitlab-ci-multi-runner the services containers are "implicit" started (the docker run happens in the background) - the only way that I can pass a "configuration flag" to the container is using an environment variable like the ORIENTDB_ROOT_PASSWORD.

...or forking your repo and creating a new docker image with the changes you suggest.

robfrank commented 8 years ago

I don't know gitlab-ci, but in Jenkins pipeline we are able to pass configuration and even volumes to containers. Are you sure you can't customise the container env?

damoiser commented 8 years ago

Unluckily is not so with gitlab-ci. You can configure as you want the main container, but the services (like orientdb in this case) of the main container are limited.

=> configuring services => postgresql example or mysql example uses env variables only

damoiser commented 8 years ago

If you don't have another way to fast-testing this (I understand that could be hard, seen that your pre-requisites could not be the sames with mine), I will back to this in another moment doing like I said (forking, new docker image,...).

For the moment I will simply use v2.2.3 for our gitlab-ci tests

robfrank commented 8 years ago

More notes. if you can't pass variables, building a custom image with a Dockerfile it's very easy:

FROM orientdb:2.2.4

CMD ["server.sh -D...."]

(I din't check, maybe you should split cmd : CMD ["server.sh", "-D...."] )

damoiser commented 8 years ago

yep, I think that I will do in that way

robfrank commented 8 years ago

Following link and fast reading gitlab docs, I landed on this page https://gitlab.com/gitlab-examples/postgres/blob/master/.gitlab-ci.yml

services:
  - postgres

variables:
  # Configure postgres service (https://hub.docker.com/_/postgres/)
  POSTGRES_DB: custom_db
  POSTGRES_USER: custom_user
  POSTGRES_PASSWORD: custom_pass

connect:
  image: postgres
  script:
  # official way to provide password to psql: http://www.postgresql.org/docs/9.3/static/libpq-envars.html
  - export PGPASSWORD=$POSTGRES_PASSWORD
  - psql -h "postgres" -U "$POSTGRES_USER" -d "$POSTGRES_DB" -c "SELECT 'OK' AS status;"

Maybe can be useful

damoiser commented 8 years ago

I have tried today ( with Dockerfile in github and docker hub ) and with that flag the tests works properly again.

I am not sure, but probably that flag is needed as default for the docker container. Maybe has docker some troubles to manage http-streams? What do you think?

As an advice for the next releases, it could probably be useful to spend some words on the changelogs when integrating some new features/enhancements between version. Without your feedback I would be never landed on changing the flag to -Dnetwork.http.streaming=false ;-)

damoiser commented 7 years ago

Is this fixed or is this become the new standard?

An update would be really appreciated.

robfrank commented 7 years ago

You're right, here's the fix: https://github.com/orientechnologies/orientdb/commit/7ce0407385a37b39881c78bd3e4c84ffaa3b802f

so it will be included in 2.2.14

damoiser commented 7 years ago

perfect, thanks for the update 👍