orientechnologies/orientdb-docker

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

damoiser opened this issue · 14 comments

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:

  • as said, running a ci test in Gitlab with gitlab-ci-multi-runner (v1.2.0) using Docker
  • with orientdb-docker v2.2.3 works properly, with v2.2.4 fails
  • the ci runs on a Centos 7 env

Any idea?

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

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.

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

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.

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?

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

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

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...."] )

yep, I think that I will do in that way

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

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 ;-)

Is this fixed or is this become the new standard?

An update would be really appreciated.

You're right, here's the fix:
orientechnologies/orientdb@7ce0407

so it will be included in 2.2.14

perfect, thanks for the update 👍