Giter VIP home page Giter VIP logo

arangodb-docker's Introduction

Two stylized avocado halves and the product name.

ArangoDB

ArangoDB is a scalable graph database system to drive value from connected data, faster. Native graphs, an integrated search engine, and JSON support, via a single query language. ArangoDB runs on-prem, in the cloud – anywhere.

ArangoDB Cloud Service

The ArangoGraph Insights Platform is the simplest way to run ArangoDB. You can create deployments on all major cloud providers in many regions with ease.

Getting Started

For the impatient:

  • Test ArangoDB in the cloud with ArangoGraph for free.

  • Alternatively, download and install ArangoDB. Start the server arangod if the installer did not do it for you.

    Or start ArangoDB in a Docker container:

    docker run -e ARANGO_ROOT_PASSWORD=test123 -p 8529:8529 -d arangodb
    

    Then point your browser to http://127.0.0.1:8529/.

Key Features of ArangoDB

Native Graph - Store both data and relationships, for faster queries even with multiple levels of joins and deeper insights that simply aren't possible with traditional relational and document database systems.

Document Store - Every node in your graph is a JSON document: flexible, extensible, and easily imported from your existing document database.

ArangoSearch - Natively integrated cross-platform indexing, text-search and ranking engine for information retrieval, optimized for speed and memory.

ArangoDB is available in a free and open-source Community Edition, as well as a commercial Enterprise Edition with additional features.

Community Edition features

  • Horizontal scalability: Seamlessly shard your data across multiple machines.
  • High availability and resilience: Replicate data to multiple cluster nodes, with automatic failover.
  • Flexible data modeling: Model your data as combination of key-value pairs, documents, and graphs as you see fit for your application.
  • Work schema-free or use schema validation for data consistency. Store any type of data - date/time, geo-spatial, text, nested.
  • Powerful query language (AQL) to retrieve and modify data - from simple CRUD operations, over complex filters and aggregations, all the way to joins, graphs, and ranked full-text search.
  • Transactions: Run queries on multiple documents or collections with optional transactional consistency and isolation.
  • Data-centric microservices: Unify your data storage logic, reduce network overhead, and secure sensitive data with the ArangoDB Foxx JavaScript framework.
  • Fast access to your data: Fine-tune your queries with a variety of index types for optimal performance. ArangoDB is written in C++ and can handle even very large datasets efficiently.
  • Easy to use web interface and command-line tools for interaction with the server.

Enterprise Edition features

Focus on solving enterprise-scale problems for mission critical workloads using secure graph data. The Enterprise Edition has all the features of the Community Edition and offers additional features for performance, compliance, and security, as well as further query capabilities.

  • Smartly shard and replicate graphs and datasets with features like EnterpriseGraphs, SmartGraphs, and SmartJoins for lightning fast query execution.
  • Combine the performance of a single server with the resilience of a cluster setup using OneShard deployments.
  • Increase fault tolerance with Datacenter-to-Datacenter Replication and and create incremental Hot Backups without downtime.
  • Enable highly secure work with Encryption 360, enhanced Data Masking, and detailed Auditing.
  • Perform parallel graph traversals.
  • Use ArangoSearch search highlighting and nested search for advanced information retrieval.

Latest Release

Packages for all supported platforms can be downloaded from https://www.arangodb.com/download/.

For what's new in ArangoDB, see the Release Notes in the Documentation.

Stay in Contact

arangodb-docker's People

Contributors

dothebart avatar ewoutp avatar fceller avatar kvs85 avatar m0ppers avatar neunhoef avatar pmario avatar soualid avatar vpavlin avatar yosifkit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

arangodb-docker's Issues

/init-scripts/install-service.sh is ran to early

My /init-scripts/install-service.sh script fail to connect to the server ...

It only contains one line with foxx install...

Here the log:

arangodb_1  | Initializing database...Hang on...
arangodb_1  | /entrypoint.sh: running /docker-entrypoint-initdb.d/install-service.sh
arangodb_1  | Connection refused: 127.0.0.1:8529

Permission denied in entrypoint.sh

Just a quick note - I've been running locally the Dockerfile so that I can use it as a base image and have dumps and scripts executed and I've been getting this error

ERROR: for arangodb Cannot start service arangodb: b'OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \\"/entrypoint.sh\\": permission denied": unknown'

I have resolved by adding the chmod line under the entrypoint statement as follows

ENTRYPOINT ["/entrypoint.sh"]
RUN ["chmod", "+x", "/entrypoint.sh"]

I can see that you state in the doc that "if you are using the image as a base image please make sure to wrap any CMD in the exec form. Otherwise the default entrypoint will not do its bootstrapping work." but I am not sure that's the issue I've hit, mostly because I do not know what that means due to my.. ignorance. If that's the case please accept my apologies, point me to an example if you please, and do close this issue.

Otherwise, you might want to be aware of this issue..

Document how to run the ArangoDB container in read-only mode

It is a general security recommendation to run containers in read_only mode except for the volumes you need to use. On arangodb:3.3 we could simply mount /var/lib/arangodb3 to a data volume, and set tmpfs to the host's /tmp directory.

It seems that with arangodb:3.4 the foxx-cli are run as root and try to write a .foxxrc file to /root/.foxxrc and failing. The log shows:

Error: EROFS: read-only file system, open '/root/.foxxrc'

Side-note: the way the entrypoint.sh script loads initialization scripts, and specifically when it does so, isn't very clearly documented (we read through the script to figure this out). Since this is very valuable (seems to be one of the best ways to initialize ArangoDB) a little documentation would go a long way!

Error using rocksdb as the storage engine with Kubernetes

Deploying arangodb on kubernetes using the following deployment config file:

apiVersion: v1
kind: Service
metadata:
  name: arangodb-agents
spec:
  ports:
    - port: 8529
      targetPort: 8529
  clusterIP: None
  selector:
    name: arangodb
    role: agent
---
apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
  name: arangodb-agent
spec:
  serviceName: "arangodb-agents"
  replicas: 3
  template:
    metadata:
      labels:
        name: arangodb
        role: agent
    spec:
      containers:
        - name: arangodb
          image: arangodb/arangodb:latest
          env:
            - name: ARANGO_STORAGE_ENGINE
              value: "rocksdb"
            - name: IP
              valueFrom:
                fieldRef:
                  fieldPath: status.podIP
            - name: ARANGO_NO_AUTH
              value: "1"
          ports:
            - containerPort: 8529
          volumeMounts:
            - mountPath: /var/lib/arangodb3
              name: arangodb-agency-data
          args:
            - --server.storage-engine
            - "rocksdb"
            - --server.authentication
            - "false"
            - --server.endpoint
            - tcp://0.0.0.0:8529
            - --agency.activate
            - "true"
            - --agency.size
            - "3"
            - --agency.supervision
            - "true"
            - --agency.my-address
            - tcp://$(IP):8529
            - --agency.endpoint
            - tcp://arangodb-agent-0.arangodb-agents.default.svc.cluster.local:8529
  volumeClaimTemplates:
    - metadata:
        name: arangodb-agency-data
      spec:
        accessModes: ["ReadWriteOnce"]
        resources:
          requests:
            storage: 1Gi
---
apiVersion: v1
kind: Service
metadata:
  name: arangodb-coords
spec:
  ports:
    - port: 8529
      targetPort: 8529
  type: LoadBalancer
  selector:
    name: arangodb
    role: coordinator
---
apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
  name: arangodb-coord
spec:
  serviceName: "arangodb-coords"
  replicas: 2
  template:
    metadata:
      labels:
        name: arangodb
        role: coordinator
    spec:
      containers:
        - name: arangodb
          image: arangodb/arangodb:latest
          env:
            - name: ARANGO_STORAGE_ENGINE
              value: "rocksdb"
            - name: IP
              valueFrom:
                fieldRef:
                  fieldPath: status.podIP
            - name: ARANGO_NO_AUTH
              value: "1"
          ports:
            - containerPort: 8529
          volumeMounts:
            - mountPath: /var/lib/arangodb3
              name: arangodb-coords-data
          args:
            - --server.storage-engine
            - "rocksdb"
            - --server.authentication
            - "false"
            - --server.endpoint
            - tcp://0.0.0.0:8529
            - --cluster.my-role
            - COORDINATOR
            - --cluster.my-local-info
            - "$(IP)"
            - --cluster.my-address
            - tcp://$(IP):8529
            - --cluster.agency-endpoint
            - tcp://arangodb-agent-0.arangodb-agents.default.svc.cluster.local:8529
  volumeClaimTemplates:
    - metadata:
        name: arangodb-coords-data
      spec:
        accessModes: ["ReadWriteOnce"]
        resources:
          requests:
            storage: 1Gi
---
apiVersion: v1
kind: Service
metadata:
  name: arangodb-dbs
spec:
  ports:
    - port: 8529
      targetPort: 8529
  type: LoadBalancer
  selector:
    name: arangodb
    role: dbserver
---
apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
  name: arangodb-db
spec:
  serviceName: "arangodb-dbs"
  replicas: 3
  template:
    metadata:
      labels:
        name: arangodb
        role: dbserver
    spec:
      containers:
        - name: arangodb
          image: arangodb/arangodb:latest
          env:
            - name: ARANGO_STORAGE_ENGINE
              value: "rocksdb"
            - name: IP
              valueFrom:
                fieldRef:
                  fieldPath: status.podIP
            - name: ARANGO_NO_AUTH
              value: "1"
          ports:
            - containerPort: 8529
          volumeMounts:
            - mountPath: /var/lib/arangodb3
              name: arangodb-db-data
            - mountPath: /var/lib/arangodb3-apps
              name: arangodb-db-apps
          args:
            - --server.storage-engine
            - "rocksdb"
            - --server.authentication
            - "false"
            - --server.endpoint
            - tcp://0.0.0.0:8529
            - --cluster.my-role
            - PRIMARY
            - --cluster.my-local-info
            - "$(IP)"
            - --cluster.my-address
            - tcp://$(IP):8529
            - --cluster.agency-endpoint
            - tcp://arangodb-agent-0.arangodb-agents.default.svc.cluster.local:8529
  volumeClaimTemplates:
    - metadata:
        name: arangodb-db-data
      spec:
        accessModes: ["ReadWriteOnce"]
        resources:
          requests:
            storage: 50Gi
    - metadata:
        name: arangodb-db-apps
      spec:
        accessModes: ["ReadWriteOnce"]
        resources:
          requests:
            storage: 1Gi

The following error appears when the container starts:

choosing Rocksdb storage engine
2017-11-23T20:51:27Z [1] INFO ArangoDB 3.2.8 [linux] 64bit, using jemalloc, VPack 0.1.30, RocksDB 5.6.0, ICU 58.1, V8 5.7.492.77, OpenSSL 1.1.0f  25 May 2017
2017-11-23T20:51:27Z [1] WARNING {memory} /sys/kernel/mm/transparent_hugepage/defrag is set to 'always'. It is recommended to set it to a value of 'never' or 'madvise'
2017-11-23T20:51:27Z [1] WARNING {memory} execute 'sudo bash -c "echo madvise > /sys/kernel/mm/transparent_hugepage/enabled"'
2017-11-23T20:51:27Z [1] WARNING {memory} execute 'sudo bash -c "echo madvise > /sys/kernel/mm/transparent_hugepage/defrag"'
2017-11-23T20:51:27Z [1] FATAL {startup} content of 'ENGINE' file '/var/lib/arangodb3/ENGINE' and command-line/configuration option value do not match: 'mmfiles' != 'rocksdb'. please validate the command-line/configuration option value of '--server.storage-engine' or use a different database directory if the change is intentional

Installing Foxx service from GitHub fails

Installing a service from GitHub using the web interface fails silently.

The log says:

Failed to update Foxx store: ArangoError: service download failed: Github download from 
'https://github.com/arangodb/foxx-apps/archive/master.zip' failed with error code 500

Perhaps a problem with certificates, because this (d9b609c73057 being the id of the arangodb container):

$ docker exec -it d9b609c73057 curl https://github.com/arangodb/foxx-apps/archive/master.zip

Results in this:

curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.

Persistent data docs are wrong!

You write that the data dir is /data while it seems to be /var/lib/arangodb.
Well this is a MAJOR issue, I almost lost production data due to that!

Also there is no docker image for 2.6.7.

Here are the logs:

2015-08-30T11:23:26Z [1] INFO ArangoDB 2.6.5 64bit -- ICU 54.1, V8 4.1.0.27, OpenSSL 1.0.1k 8 Jan 2015
2015-08-30T11:23:26Z [1] INFO using default language 'en'
2015-08-30T11:23:26Z [1] INFO WAL directory '/var/lib/arangodb/journals' does not exist. creating it...
2015-08-30T11:23:26Z [1] INFO created base application directory '/var/lib/arangodb-apps/_db'
2015-08-30T11:23:26Z [1] INFO loaded database '_system' from '/var/lib/arangodb/databases/database-127268'
2015-08-30T11:23:26Z [1] INFO collection '_users' does not exist, no authentication available
2015-08-30T11:23:26Z [1] INFO using endpoint 'tcp://0.0.0.0:8529' for non-encrypted requests
2015-08-30T11:23:26Z [1] INFO using default API compatibility: 20600
2015-08-30T11:23:26Z [1] INFO JavaScript using startup '/usr/share/arangodb/js', application '/var/lib/arangodb-apps'
2015-08-30T11:23:29Z [1] INFO In database '_system': No version information file found in database directory.
2015-08-30T11:23:29Z [1] INFO In database '_system': Found 24 defined task(s), 19 task(s) to run
2015-08-30T11:23:29Z [1] INFO In database '_system': state prod/standalone/init, tasks setupUsers, createUsersIndex, addDefaultUser, updateUserModel, setupGraphs, createModules, createRouting, createKickstarterConfiguration, insertRedirectionsAll, setupAal, createAalIndex, setupAqlFunctions, createStatistics, createConfiguration, systemAppEndpoints, setupQueues, setupJobs, moveFoxxApps, dropAal
2015-08-30T11:23:29Z [1] INFO In database '_system': init successfully finished                                                                                                                                                              
2015-08-30T11:23:29Z [1] INFO Please note that a new bugfix version '2.6.7' is available                                                                                                                                                     
2015-08-30T11:23:30Z [1] INFO Authentication is turned off                                                                                                                                                                                   
2015-08-30T11:23:30Z [1] INFO ArangoDB (version 2.6.5 [linux]) is ready for business. Have fun!                               

Permission denied on /var/lib/arangodb3-apps/ when running in OpenShift

Hi,

I am working on deploying ArangoDB on our OpenShift cluster and everything looks great up to the point where I try to create a database at which point I get:

2018-11-21T09:38:54Z [1] ERROR unable to create application directory '/var/lib/arangodb3-apps/_db/test' for database 'test': failed to create directory '/var/lib/arangodb3-apps/_db/test': Permission denied

I tracked the issue down to missing -R in https://github.com/vpavlin/arangodb-docker/blob/official/Dockerfile34.templ#L46-L47

Steps to reproduce:

$ docker run --name tmp0 -it --rm -u 1001:0 docker.io/arangodb/arangodb:3.3.17 bash
I have no name!@23d6912163fc:/$ ls -la /var/lib/arangodb3-apps/
total 12
drwxrwxr-x. 3 arangodb root     4096 Nov 21 12:47 .
drwxr-xr-x. 1 root     root     4096 Oct  8 13:26 ..
drwxr-xr-x. 3 arangodb arangodb 4096 Oct  8 13:26 _db
I have no name!@23d6912163fc:/$ id
uid=1001 gid=0(root) groups=0(root)
I have no name!@23d6912163fc:/$ touch /var/lib/arangodb3-apps/_db/aaa
touch: cannot touch '/var/lib/arangodb3-apps/_db/aaa': Permission denied

I have built an image from fixed Dockerfile
https://quay.io/repository/vpavlin/arangodb?tab=tags which works fine:

$ docker run --name tmp0 -it --rm -u 1001:0 quay.io/vpavlin/arangodb:bug_fix-3.3.17 bash
I have no name!@1f79c56dbc63:/$ ls -la /var/lib/arangodb3-apps/
total 12
drwxrwxr-x. 3 arangodb root 4096 Nov 21 12:48 .
drwxr-xr-x. 1 root     root 4096 Nov 21 11:28 ..
drwxrwxr-x. 3 arangodb root 4096 Nov 21 11:28 _db
I have no name!@1f79c56dbc63:/$ id
uid=1001 gid=0(root) groups=0(root)
I have no name!@1f79c56dbc63:/$ touch /var/lib/arangodb3-apps/_db/aaa
I have no name!@1f79c56dbc63:/$ 

Docker-compose not executing scripts in /docker-entrypoint-initdb.d

We run a few scripts inside /docker-entrypoint-initdb.d
When using docker to run the container, the scripts run fine:

$ docker run -it -p 8529:8529 -e ARANGO_NO_AUTH=1 my.registry.net/my-arangodb
automaticaly choosing storage engine
Initializing database...Hang on...
/entrypoint.sh: running /docker-entrypoint-initdb.d/1_init-objectstore-db.js
/entrypoint.sh: running /docker-entrypoint-initdb.d/2_deploy-foxx.js
Database initialized...Starting System...
2018-05-23T21:56:42Z [1] INFO ArangoDB 3.3.8 [linux] 64bit, using jemalloc, build tags/v3.3.8-0-g50ef880b25, VPack 0.1.30, RocksDB 5.6.0, ICU 58.1, V8 5.7.492.77, OpenSSL 1.1.0f  25 May 2017
2018-05-23T21:56:42Z [1] INFO {authentication} Jwt secret not specified, generating...
2018-05-23T21:56:42Z [1] INFO detected operating system: Linux version 4.9.87-linuxkit-aufs (root@70f48253c8b4) (gcc version 6.4.0 (Alpine 6.4.0) ) #1 SMP Fri Mar 16 18:16:33 UTC 2018
2018-05-23T21:56:42Z [1] INFO using storage engine mmfiles
2018-05-23T21:56:42Z [1] INFO {cluster} Starting up with role SINGLE

But when using docker-compose, the scripts are skipped

$ docker-compose up arangodb
Starting my-service_arangodb_1 ... done
Attaching to my-service_arangodb_1
arangodb_1              | automaticaly choosing storage engine
arangodb_1              | 2018-05-23T22:45:01Z [1] INFO ArangoDB 3.3.8 [linux] 64bit, using jemalloc, build tags/v3.3.8-0-g50ef880b25, VPack 0.1.30, RocksDB 5.6.0, ICU 58.1, V8 5.7.492.77, OpenSSL 1.1.0f  25 May 2017
arangodb_1              | 2018-05-23T22:45:01Z [1] INFO {authentication} Jwt secret not specified, generating...
arangodb_1              | 2018-05-23T22:45:01Z [1] INFO detected operating system: Linux version 4.9.87-linuxkit-aufs (root@70f48253c8b4) (gcc version 6.4.0 (Alpine 6.4.0) ) #1 SMP Fri Mar 16 18:16:33 UTC 2018
arangodb_1              | 2018-05-23T22:45:01Z [1] INFO using storage engine mmfiles
arangodb_1              | 2018-05-23T22:45:01Z [1] INFO {cluster} Starting up with role SINGLE
arangodb_1              | 2018-05-23T22:45:01Z [1] INFO {syscall} file-descriptors (nofiles) hard limit is 1048576, soft limit is 1048576
arangodb_1              | 2018-05-23T22:45:01Z [1] INFO {authentication} Authentication is turned off, authentication for unix sockets is turned on
arangodb_1              | 2018-05-23T22:45:01Z [1] WARNING {memory} /proc/sys/vm/overcommit_memory is set to '1'. It is recommended to set it to a value of 0 or 2
arangodb_1              | 2018-05-23T22:45:01Z [1] WARNING {memory} execute 'sudo bash -c "echo 2 > /proc/sys/vm/overcommit_memory"'
arangodb_1              | 2018-05-23T22:45:02Z [1] INFO using endpoint 'http+tcp://0.0.0.0:8529' for non-encrypted requests

Part of my compose file:

version: '3'
services:
  arangodb:
    build:
    image: my.registry.net/my-arangodb
    ports:
      - "8529:8529"
    environment:
      - ARANGO_NO_AUTH=1

Is there anything I am missing here? Why the inconsistency?

Comes with old version

I copy/pasted the command including the version number (2.3.3) from the docs, but that version said it's not available. I then used it without specifying a version and got 2.3.2.

You might want to add "update docker image" somewhere in your release checklist. ;)

File Permissions (2.8.4)

When running with sudo docker run -e ARANGO_RANDOM_ROOT_PASSWORD=1 --name arango -d -p 80:8529 -v ${PWD}/db:/var/lib/arangodb -v ${PWD}/foxx:/var/lib/arangodb-apps arangodb:2.8.4 on CentOS 7 I get some sed-related error:

[pgue@svrsoleng arango]$ sudo docker logs -f arango
Initializing database...Hang on...
===========================================
GENERATED ROOT PASSWORD: M4UEWuHAXGy6qBYn
===========================================
sed: couldn't open temporary file /etc/arangodb/sedqrNrYj: Permission denied

Strange thing is, /etc/arangodb is not even a volume but on the container fs... I don't really get it, since from reading the Dockerfile I understand it runs as the arangodb user only after applying sed to the config, so before it should be using root (and have correct permissions for /etc/arango). Host volume permissions have been set with chmod 0777 / chown 999:999.

Also even when crashing it initializes the database, so starting the container again all goes well and it boots up (but with authorization disabled-- probably due to sed not having applied the config changes).

Am I overlooking something or is it bugged? Thanks in advance, having an officially maintained docker image is a great thing for a database.

location of Foxx apps

Looks like arangodb is actually putting its Foxx apps at /var/lib/arangodb3-apps, not /var/lib/arangodb-apps3 -- and the dir they are actually in is not shared to the host OS. (Makes working on Foxx apps pretty annoying -- have to manually zip and then upload through the web UI after each change.

Here's my Kitematic screen:

screen shot 2016-07-09 at 12 36 13 pm
.)

In the dir listing of /var/lib you can see both dirs, but when I install a Foxx it goes to /var/lib/arangodb3-apps.

# ls -l /var/lib
total 41
drwxr-xr-x  7 root     root     4096 Jul  1 17:13 apt
drwxr-xr-x  2 root     root       68 Jul  8 22:30 arangodb-apps3
drwxr-xr-x  8 arangodb root      272 Jul  8 22:30 arangodb3
drwxr-xr-x  4 arangodb arangodb 4096 Jul  8 22:30 arangodb3-apps
drwxr-xr-x 13 root     root     4096 Jul  1 17:13 dpkg
drwxr-xr-x  2 root     root     4096 Apr  6  2015 initscripts
drwxr-xr-x  2 root     root     4096 Apr  6  2015 insert
drwxr-xr-x  2 root     root     4096 May 30 04:18 misc
drwxr-xr-x  2 root     root     4096 Jun  8 16:29 pam
drwxr-xr-x  3 root     root     4096 Jun  8 16:29 systems
drwxr-xr-x  2 root     root     4096 Nov 23  2012 update-rc.d
drwxr-xr-x  2 root     root     4096 Apr  6  2015 urandom

Error when specifying a storage engine (rocksdb)

I'm trying to use another storage engine, RocksDB. I'm passing:
--server.storage-engine rocksdb

Which results in:

FATAL {startup} content of 'ENGINE' file '/var/lib/arangodb3/ENGINE' and command-line/configuration option value do not match: 'mmfiles' != 'rocksdb'. please validate the command-line/configuration option value of '--server.storage-engine' or use a different database directory if the change is intentional

Which is I believe because that argument is not passed through when the database is initialised:

echo "Initializing database...Hang on..."
arangod --server.endpoint unix:///tmp/arangodb-tmp.sock \
--server.authentication false \
--log.file /tmp/init-log \
--log.foreground-tty false &

ARM64 support

I am trying to use ArangoDB over arm64v8 architecture.
Do you have any such guidelines, which I can follow to achieve resultant output?

I am open to trying any kind of experimental changes too as my goal to achieve success over arm64v8.

Or is there any plan from community to add support for ARM in near future?

Regards,

2.4.0b1 no longer exposes 8529?

I think 2.4 changed the port from 0.0.0.0:8529 to localhost:8529. I just tried to run the docker image for 2.4.0b1 and wasn't able to connect to the exposed port anymore.

docker-compose + persistent data volume (2.8.2+)

The following docker-compose.yml works just fine with 2.8.1:

# docker-compose.yml
app:
  image: arangodb:2.8.1
  volumes:
    - ./apps:/var/lib/arangodb-apps/_db
  volumes_from:
    - arangodb_data
  ports:
    - 8529:8529
  environment:
    - ARANGO_NO_AUTH=1

arangodb_data:
  image: tianon/true
  volumes:
    - /var/lib/arangodb
$ docker-compose up
Starting arangodb_arangodb_data_1
Starting arangodb_app_1
Attaching to arangodb_arangodb_data_1, arangodb_app_1
app_1           | 2016-02-22T16:02:25Z [1] INFO ArangoDB 2.8.1 [linux] 64bit, using tcmalloc, ICU 54.1, V8 4.3.61, OpenSSL 1.0.1k 8 Jan 2015
app_1           | 2016-02-22T16:02:25Z [1] INFO using default language 'en'
app_1           | 2016-02-22T16:02:25Z [1] INFO loaded database '_system' from '/var/lib/arangodb/databases/database-127711'
app_1           | 2016-02-22T16:02:25Z [1] INFO running WAL recovery (1 logfiles)
app_1           | 2016-02-22T16:02:25Z [1] INFO replaying WAL logfile '/var/lib/arangodb/journals/logfile-19994569107.db' (1 of 1)
app_1           | 2016-02-22T16:02:25Z [1] INFO WAL recovery finished successfully
app_1           | 2016-02-22T16:02:25Z [1] INFO using endpoint 'tcp://0.0.0.0:8529' for non-encrypted requests
app_1           | 2016-02-22T16:02:25Z [1] INFO using default API compatibility: 20800
app_1           | 2016-02-22T16:02:25Z [1] INFO JavaScript using startup '/usr/share/arangodb/js', application '/var/lib/arangodb-apps'
arangodb_arangodb_data_1 exited with code 0
app_1           | 2016-02-22T16:02:27Z [1] INFO In database '_system': Database is up-to-date (20801/prod/standalone/existing)
app_1           | 2016-02-22T16:02:29Z [1] INFO Please note that a new bugfix version '2.8.2' is available
app_1           | 2016-02-22T16:02:29Z [1] INFO file-descriptors (nofiles) hard limit is 1048576, soft limit is 1048576
app_1           | 2016-02-22T16:02:29Z [1] INFO Authentication is turned off
app_1           | 2016-02-22T16:02:29Z [1] INFO ArangoDB (version 2.8.1 [linux]) is ready for business. Have fun!

However, the same docker-compose.yml file (changed to point to 2.8.2) does not work:

# docker-compose.yml
app:
  image: arangodb:2.8.2
  volumes:
    - ./apps:/var/lib/arangodb-apps/_db
  volumes_from:
    - arangodb_data
  ports:
    - 8529:8529
  environment:
    - ARANGO_NO_AUTH=1

arangodb_data:
  image: tianon/true
  volumes:
    - /var/lib/arangodb
$ docker-compose up
Creating arangodb_arangodb_data_1
Creating arangodb_app_1
Attaching to arangodb_arangodb_data_1, arangodb_app_1
arangodb_arangodb_data_1 exited with code 0
app_1           | chown: changing ownership of '/var/lib/arangodb-apps/_db': Operation not permitted
arangodb_app_1 exited with code 1

I am using the latest docker, docker-compose and docker-machine on OSX Yosemite with VMWare Fusion.

$ docker --version
Docker version 1.10.1, build 9e83765
$ docker-compose --version
docker-compose version 1.6.0, build unknown
$ docker-machine --version
docker-machine version 0.6.0, build e27fb87

bundled chai module fails due to missing file

version 3.2.9 (and 3.2.8) have this issue. I haven't tried other versions.

If you require('chai') in a foxx test file you will get this error in the arango logs

at Object. (/usr/share/arangodb3/js/node/node_modules/chai/index.js:1:272)
at require (/usr/share/arangodb3/js/common/bootstrap/modules.js:95:21)
at Function.Module._load (/usr/share/arangodb3/js/common/bootstrap/modules.js:484:16)
at Module.load (/usr/share/arangodb3/js/common/bootstrap/modules.js:539:36)
at Object.Module._extensions..js (/usr/share/arangodb3/js/common/bootstrap/modules.js:616:12)
at Module._compile (/usr/share/arangodb3/js/common/bootstrap/modules.js:598:8)
at Object. (/usr/share/arangodb3/js/node/node_modules/chai/lib/chai.js:78:14)
at require (/usr/share/arangodb3/js/common/bootstrap/modules.js:95:21)
at Function.Module._load (/usr/share/arangodb3/js/common/bootstrap/modules.js:439:27)
at Function.Module._resolveFilename (/usr/share/arangodb3/js/common/bootstrap/modules.js:520:13)

File: ./chai/interface/expect

The file referenced in chai/lib/chai.js:78 (./chai/interface/expect) is missing:

root@404a36229e10:/usr/share/arangodb3/js/node/node_modules/chai/lib/chai/interface# ls
assert.js  should.js

there is no expect.js

Failed to build local version of container for testing

Hi,
I've hit the same issue as report in #48, but also seems to be an issue when running under Docker Swarm. To try and investigate, I tried downloading this project and following the instructions for "Building your own ArangoDB image".

I want to build a container for ArangoDB 3.3.11 but the contents of DockerFile.templ appear to be pointing at an ArangoDB version 2 download binary.

Please advise as I believe the documentation may be out of date.

Thanks
Andrew

Authentication is always disabled, how to enable it?

I am starting arangodb docker image with docker-compose on my mac:

    arangodb:
      image: arangodb/arangodb
      volumes:
        - ./data/arangodb:/var/lib/arangodb3
      ports:
        - 8529:8529
      environment:
        - ARANGO_NO_AUTH=0
        - ARANGO_ROOT_PASSWORD=password

Arangodb starts properly:

arangodb_1       | automaticaly choosing storage engine
arangodb_1       | 2018-01-18T13:38:00Z [1] INFO ArangoDB 3.3.2 [linux] 64bit, using jemalloc, VPack 0.1.30, RocksDB 5.6.0, ICU 58.1, V8 5.7.492.77, OpenSSL 1.1.0f  25 May 2017
arangodb_1       | 2018-01-18T13:38:00Z [1] INFO detected operating system: Linux version 4.9.60-linuxkit-aufs (root@4a42478ffb9a) (gcc version 6.3.0 (Alpine 6.3.0) ) #1 SMP Mon Nov 6 16:00:12 UTC 2017
arangodb_1       | 2018-01-18T13:38:00Z [1] INFO using storage engine mmfiles
arangodb_1       | 2018-01-18T13:38:00Z [1] INFO {cluster} Starting up with role SINGLE
arangodb_1       | 2018-01-18T13:38:00Z [1] INFO {syscall} file-descriptors (nofiles) hard limit is 1048576, soft limit is 1048576
arangodb_1       | 2018-01-18T13:38:00Z [1] INFO {authentication} Authentication is turned off, authentication for unix sockets is turned on
arangodb_1       | 2018-01-18T13:38:00Z [1] WARNING {memory} /proc/sys/vm/overcommit_memory is set to '1'. It is recommended to set it to a value of 0 or 2
arangodb_1       | 2018-01-18T13:38:00Z [1] WARNING {memory} execute 'sudo bash -c "echo 2 > /proc/sys/vm/overcommit_memory"'
arangodb_1       | 2018-01-18T13:38:00Z [1] INFO running WAL recovery (1 logfiles)
arangodb_1       | 2018-01-18T13:38:00Z [1] INFO replaying WAL logfile '/var/lib/arangodb3/journals/logfile-124.db' (1 of 1)
arangodb_1       | 2018-01-18T13:38:00Z [1] INFO WAL recovery finished successfully
arangodb_1       | 2018-01-18T13:38:01Z [1] INFO using endpoint 'http+tcp://0.0.0.0:8529' for non-encrypted requests
arangodb_1       | 2018-01-18T13:38:04Z [1] INFO ArangoDB (version 3.3.2 [linux]) is ready for business. Have fun!

The docker image is working fine for my dev and CI environments.
My problem is regarding the authentication. I enabled the authentication by setting "ARANGO_NO_AUTH=0" in my docker-compose. The logs (see above) are saying it is still not enabled and when accessing the Arangodb Web UI (on localhost:8529), a banner is displayed saying that "Warning: Authentication is disabled. Do not use this setup in production mode.".

What am I doing wrong?

Thanks for any help!

Thx
PS:

**Mac OS Version**:
ProductName:	Mac OS X
ProductVersion:	10.13.2
BuildVersion:	17C205

**Docker-compose version**:
Docker-compose version 1.18.0, build 8dd22a9
docker-py version: 2.6.1
CPython version: 2.7.12
OpenSSL version: OpenSSL 1.0.2j  26 Sep 2016

**Docker version**:
Client:
 Version:	17.12.0-ce
 API version:	1.35
 Go version:	go1.9.2
 Git commit:	c97c6d6
 Built:	Wed Dec 27 20:03:51 2017
 OS/Arch:	darwin/amd64

Server:
 Engine:
  Version:	17.12.0-ce
  API version:	1.35 (minimum version 1.12)
  Go version:	go1.9.2
  Git commit:	c97c6d6
  Built:	Wed Dec 27 20:12:29 2017
  OS/Arch:	linux/amd64
  Experimental:	true

Allow password from file

Feature request: Add a new variable ARANGO_ROOT_PASSWORD_FILE that allows for the password to be passed in as a file.

Reason: Enables better secrets management by orchestration tools.

Example of others doing it: The official MySQL docker image.

The change should be as simple as adding

		if [ -f "$ARANGO_ROOT_PASSWORD_FILE" ]; then
			ARANGO_ROOT_PASSWORD="$(cat $ARANGO_ROOT_PASSWORD_FILE)"
		fi

immediately before: https://github.com/arangodb/arangodb-docker/blob/official/docker-entrypoint.sh#L41

The docker image does not seem to work on Kubernetes / GCE as currently specified

Hi Guys

I have been trying to run the Docker image on Google Container Engine and i have had a bunch of problems.

  1. It seems impossible to run the stock image on GCE (and i presume any Kubernetes powered environment) when you attach a long-term storage to it - example on GCE would be starting a container like this:

- image: arangodb/arangodb:2.8.9
  name: arango
  env:
    - name: ARANGO_ROOT_PASSWORD
      value: "some-pass"
  ports:
    - containerPort: 8529
      name: arango
  volumeMounts:
    - name: arango-persistent-storage
      mountPath: /var/lib/arangodb

with the volumes defined as

volumes:
- name: arango-persistent-storage
  gcePersistentDisk:
    pdName: arango-dev-disk
    fsType: ext4

Trying to start a container like this seems to fail - with permission errors - it breaks on line 22 (docker-entrypoint.sh)

I believe the reason this happens is because the docker file at build time, sets some permissions on /var/lib/arangodb, which are then completely ignored when the Kubernetes runtime sticks a new directory on-top of that at runtime.

The problem is made worse because of the forced user in the Dockerfile (to arangodb) - as a result, the docker-entrypoint.sh can not fix the issue at run-time.

I have previously cited the Postgres docker file as a great example of database docker files - and I will do so again now.

In order to fix this and get it deployed to GCE - I had to create my own Dockerfile as follows (note, the only reason i install GOSU is to switch back to arangodb user at run-time, it is possible to run this without all that, and just run the DB as root, which i am sure is bad):

Dockerfile.zip

and my own docker-entrypoint.sh as follows - ignore 66-94 - thats to implement initial data population as per this other issue here and point 3 below.

entry.sh.zip

ends up with a container running something like this:

root@backend-deployment-2274667476-83t1w:/# ps aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0   4336   728 ?        Ss   22:02   0:00 /bin/sh -c /opt
arangodb     7  3.2  7.1 3531816 271028 ?      Sl   22:02   0:03 arangod --datab
root        11  0.0  0.0      0     0 ?        Z    22:02   0:00 [entry.sh] <def
root        44  0.0  0.0  20236  3232 ?        Ss   22:03   0:00 bash
root        53  0.0  0.0  17500  2096 ?        R+   22:04   0:00 ps aux

now - I am not saying this is the perfect entrypoint, I have just shoved the gosu command in front of all of the calls to arangod to make sure the user is correct, but it runs!

  1. because we can't specify via the environment variables the core database storeage location (or the foxx app location), and the default locations for each are in /var/lib - we come across the following problems
  • there is no way to mount a volume and not use its root - we always have to mount a volume as /var/lib/arangodb or /var/lib/arangodb-apps - we always have to mount at least two volumes - instead we could mount one, simplify backups etc.
  • If we want to share our storage volume (for instance, on my live-like dev environment in GCE im completely happy to have postgres, arango, and anything else dump stuff into a shared volume) arango will always write to the root for both foxx and data - unlike, (sorry) Postgres - which lets you specify a data directory, and we can make sure this is not the root of the mounted volume this way.
  1. an absolute must for me is the ability to specify some database initialisation state / date, in the case of ArangoDB i think that is probably arangodump output - and for that stuff to only execute if there is no existing database in the data store (Specified by the variable discussed in point 2)

TLD - i have spent more time reworking the docker file and startup for Arango than is reasonable given the promise of Docker, I am bogged down with configuration issues which should not be the case if this docker stuff was reworked slightly.

it appears to really struggle on Kubernetes, yet have had no problems with the Postgres file at all on any platform - I know I keep banging on about Postgres, but it just works, and I can see why someone new to Arango might throw it away as a result - which is super unahppy times!

ps, I still love Arango :)

Building default Docker.local fails

�getting a 404 when running hooks on ca-certificates

Resolving www.arangodb.com (www.arangodb.com)... 85.214.140.94
Connecting to www.arangodb.com (www.arangodb.com)|85.214.140.94|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2017-04-03 16:45:02 ERROR 404: Not Found.

The command '/bin/sh -c apt-get update && apt-get install -y --no-install-recommends libgoogle-perftools4 ca-certificates pwgen wget && rm -rf /var/lib/apt/lists/* && wget ${ARANGO_SIGNATURE_URL} && wget ${ARANGO_PACKAGE_URL} && gpg --verify ${ARANGO_PACKAGE}.asc && dpkg -i ${ARANGO_PACKAGE} && sed -ri -e 's!127.0.0.1!0.0.0.0!g' -e 's!^(file\s*=).!\1 -!' -e 's!^#\suid\s*=.!uid = arangodb!' -e 's!^#\sgid\s*=.!gid = arangodb!' /etc/arangodb/arangod.conf && apt-get purge -y --auto-remove ca-certificates wget && rm -f ${ARANGO_PACKAGE}' returned a non-zero code: 8

docker image needs a way to upgrade a database

If I am not missing anything, I think, the docker image needs to provide some way to upgrade a database. :)

I stumbled on this when I upgraded my docker image from Arango 2.5.x to 2.6.x

docker run -it --volumes-from arangodb-persist --name arangodb-instance -p 8529:8529 arangodb/arangodb:2.6.2

starting ArangoDB in stand-alone mode
creating initial user, please wait ...
2015-07-20T14:08:10Z [13] FATAL Database '_system' needs upgrade. Please start the server with the --upgrade option
More error details may be provided in the logfile '/tmp/arangodb.log'

Docker build of Arango 3.1.7 don't provide graph preview toolbars (left and top)

Using docker builds of arango 3.1 left and top bar utitlities are missing.
See http://i.imgur.com/g3JlN96.png

Installed both 3.1.1 and 3.1.7 (latest) with same effect using:
docker run --name arangodb311 -p 8529:8529 -e ARANGO_ROOT_PASSWORD=root arangodb/arangodb:3.1.1

Graph modeling UI is significantly different in 3.1.* builds.
Documentation doesn't include any mention of this new UI and details os it's usage.

When installed any version of 3.0 tree I was able to see and use all toolbars as visible in Docs

In both cases I used Social Graph Example using fresh build.
Host OS is MacOS X 10.12.1.

Connection refused when running JavaScript files on server init

I'm using Docker 1.13.1 on Mac OS X 10.11.6.

I have a Dockerfile that derives from the arangodb 3.1.11 image and COPYs a JavaScript file into /docker-entrypoint-initdb.d so it'll be run when the database is initialized. However, I get the following error when the script runs:

arango_1  | 2017-02-22T07:20:58Z [109] ERROR JavaScript exception in file '/usr/share/arangodb3/js/client/modules/@arangodb/arangosh.js' at 97,7: ArangoError 2001: Could not connect to 'http+tcp://127.0.0.1:8529' 'connect() failed with #111 - Connection refused'
arango_1  | 2017-02-22T07:20:58Z [109] ERROR !      throw error;
arango_1  | 2017-02-22T07:20:58Z [109] ERROR !      ^

The error is thrown from the first function call that tries to talk to the database, in my case db._createDatabase(...).

I did find a workaround for this, which was to put the following shell script into /docker-entrypoint-initdb.d instead of the js file:

#!/usr/bin/bash

/usr/bin/arangosh --server.authentication false --server.endpoint unix:///tmp/arangodb-tmp.sock \
    --javascript.execute /path/to/my/init/script.js

The initial --server.* arguments are taken from the arangosh invocations in docker-entrypoint3.sh.

So my question is, shouldn't the arangosh call on line 73 also have those same two arguments?

using on windows with volume definition

I would like to use arangodb-docker on an Win7-64 machine. e.g. with the following command

docker -e ARANGO_NO_AUTH=1 run -p 8529:8529 -v /DB/arangodb:/var/lib/arangodb arangodb

But I get the following error:

We seem to not have proper rw access to /var/lib/arangodb. Please make sure that every mounted volume has full rw access for user arangodb (uid=999(arangodb) gid=999(arangodb) groups=999(arangodb))

Is there a way how to handle this error?

Startup an arangod container with initial data

suggestion by @iamacup on the community channel

useful for application bootstrapping (initial data). import data from a mounted directory.

postgres is doing that:

https://github.com/docker-library/postgres/blob/8e867c8ba0fc8fd347e43ae53ddeba8e67242a53/9.5/docker-entrypoint.sh#L79

downside: more complexity in the dockerfile (while it could easily be implemented in a derived docker image)
upside: very convenient and very beginner friendly

needs discussion

#!/bin/bash
set -eo pipefail
​
DISABLE_AUTHENTICATION="true"
​
function rwfail {
  echo "We seem to not have proper rw access to $1. Please make sure that every mounted volume has full rw access for user arangodb ($(id arangodb))"
  exit 55
}
​
# if command starts with an option, prepend arangod
if [ "${1:0:1}" = '-' ]; then
  set -- arangod "$@"
fi
​
​
if [ "$1" = 'arangod' ]; then
  DATADIR=/var/lib/arangodb

        # ensure proper uid and gid (for example when volume is mounted from the outside)
        # do NOT chown or stuff like that. when using shared folders on the mac chown is VERY likely to fail due to docker => vm => host issues
        touch "$DATADIR"/_rwcheck_$HOSTNAME || rwfail $DATADIR
        rm "$DATADIR"/_rwcheck_"$HOSTNAME"
        touch /var/lib/arangodb-apps/_rwcheck_"$HOSTNAME" || rwfail /var/lib/arangodb-apps/
        rm /var/lib/arangodb-apps/_rwcheck_"$HOSTNAME"
  if [ ! -f "$DATADIR"/SERVER ]; then
    if [ -z "$ARANGO_ROOT_PASSWORD" -a -z "$ARANGO_NO_AUTH" -a -z "$ARANGO_RANDOM_ROOT_PASSWORD" ]; then
      echo >&2 'error: database is uninitialized and password option is not specified '
      echo >&2 '  You need to specify one of $ARANGO_ROOT_PASSWORD, $ARANGO_NO_AUTH and $ARANGO_RANDOM_ROOT_PASSWORD'
      exit 1
    fi

                echo "Initializing database...Hang on..."
                if [ ! -z "$ARANGO_RANDOM_ROOT_PASSWORD" ]; then
                  ARANGO_ROOT_PASSWORD=$(pwgen -s -1 16)
                  echo "==========================================="
                  echo "GENERATED ROOT PASSWORD: $ARANGO_ROOT_PASSWORD"
                  echo "==========================================="
                fi

                if [ ! -z "$ARANGO_ROOT_PASSWORD" ]; then
                  (
                    echo "require(\"org/arangodb/users\").replace(\"root\", \"$ARANGO_ROOT_PASSWORD\");"
                  ) |
                  /usr/sbin/arangod --console --log.tty "" &> /dev/null
                  DISABLE_AUTHENTICATION="false"
                fi
                # Initialize if not already done
                /usr/sbin/arangod --console --upgrade
  fi
fi
​
if [ "$1" == "arangod" ]; then
  # if we really want to start arangod and not bash or any other thing
  # prepend --disable-authentication as the FIRST argument
  # (so it is overridable via command line as well)
  shift
  set -- arangod --server.disable-authentication="$DISABLE_AUTHENTICATION" "$@"
fi
​
#this overrides the file here: https://github.com/arangodb/arangodb-docker/blob/official/jessie/2.8.7/docker-entrypoint.sh and is an exact copy apart from this block - Added to load initial data from /opt/arango-bare into the database
( { 
    function runner 
    { 
        echo "Checking to see if db is up..."; 

        STR="use strict; 
        use warnings; 
        use IO::Socket; 

        my \$socket = IO::Socket::INET->new( 
            PeerAddr => \"127.0.0.1:8529\", 
            PeerPort => \"http(8529)\", 
            Proto => \"tcp\") or print \"not ok\"; 
        print \"ok\""; 

        OUTVAR=$(/usr/bin/perl -e "$STR"); 

        if [ "$OUTVAR" == "ok" ]; then 
          echo "Database is up. Running startup scrips." && arangorestore --server.password $ARANGO_ROOT_PASSWORD --server.username 'root' --input-directory '/opt/arango-bare'; 
        else 
          sleep 2 && runner;
        fi 
    }; 

    runner; 
} )&
​
exec "$@"

Optionally disable auth?

Is there a straightforward way to run the container without authentication? I'm using docker for development and having to add auth headers to all requests in development gets tedious.

Coordinator container crashing

We have an arangodb cluster deployed using kubernetes. One of the coordinator container is crashing upon startup with only the following logs:
automatically choosing storage engine {startup} obsolete option '--cluster.my-local-info' used in configuration. setting this option will not have any effect.

Unable to mount volumes using both Docker and Docker-Compose

Tryed to run the arangodb using both docker and docker-compose and only docker. But i got this message:

FATAL unable to initialize RocksDB engine for persistent indexes: IO error: directory: Invalid argument

The command that i used to run the docker directly was:

docker run -e ARANGO_ROOT_PASSWORD=somepass -p 8529:8529 -v my-absolute-path/db:/var/lib/arangodb3 -v my-absolute-path/apps:/var/lib/arangodb3-apps arangodb:3.2

If i don't bind the volume the container start just fine. But, if i specify that i want to bind/mount some volume the container just give-me this message and after some time it exit with error code 1. Anyone know how to solve this problem ?

Further information:
Windows 10
Docker version 17.06.1-ce, build 874a737
docker-compose version 1.14.0, build c7bdf9e3

PS: "my-absolute-path" : i didn't use this as the actual absolute path, i just used this cause i think there's no need to put the absolute real path in a possible bug report.

Updating while preserving data

I'm trying to update from image 5aa989580ba8 (four weeks ago) to image 665c17ea4dfd (two days ago).

In the previous image, I had these mappings:

  • /var/lib/arangodb3/var/lib/docker/volumes/c3adfff834557674644bcd0f96fe9e5d2d69cf2a78074a6c2cc980ecaa53b906
  • /var/lib/arangodb3-apps/var/lib/docker/volumes/2862a7bfcd63b03c8cdc6bef41fa446656b32ab323868d74270e7a8eb09d0307

Do I need to do something other than the following to run the new image with existing data?

docker run \
  -v /var/lib/docker/volumes/c3adfff834557674644bcd0f96fe9e5d2d69cf2a78074a6c2cc980ecaa53b906/:/var/lib/arangodb3 \
  -v /var/lib/docker/volumes/2862a7bfcd63b03c8cdc6bef41fa446656b32ab323868d74270e7a8eb09d0307/:/var/lib/arangodb3-apps \
  --name arangodb -p 127.0.0.1:8529:8529 arangodb

I can see the volumes are mounted correctly inside the container but hitting any of the databases at http://localhost:8529/_db/... yields a 404.

RocksDB Host Directory folder appears with mmfiles engine

After starting arangodb from the docker image, with a host directory configured on the command line (directory did not exist), and confirming that Community Edition is running with mmfiles as the engine (Web Interface) - this is the contents of my host directory on OSX:

screen shot 2017-09-14 at 11 22 05 am

It probably is nothing other than a nuisance but did result in some wasted time and some restarts. So far deleting the RocksDB folder doesn't seem to impact anything.

David

1478 - ERROR_CLUSTER_BACKEND_UNAVAILABLE

I am running arangodb cluster on kubernetes on AWS. One error frequently occurs in the cluster that does not get solved unless all of the pods are restarted. The error message is 1478 - ERROR_CLUSTER_BACKEND_UNAVAILABLE . We have not been able to reproduce the error to get to the cause of the error.

Documentation about default username and password

Hi,

after 2.6.0, I found arangodb has a default username and password after container run. There is no documentation about that in any arangodb repositories. In the end, after docker logs, I found the root user and auto generated password in the console.
I think it's not pretty clear to users. The better the documentation should be improved about that later.

Best regards,
Kevin

Disable the port redirection on /

I'm currently using ArangoDB in my Docker system and I expose the admin interface to the world through Nginx/Docker-gen (eg. http://arangodb.foobar.com).

The problem is that when ArangoDB is hit on /, it returns a 301 http://arangodb.foobar.com:8529/_db/_system/_admin/aardvark/index.html, and I get obviously no response as nothing is listening on the port :8529.

Would it be possible for ArangoDB to keep the port on which it was hit when sending a redirection ?
Or at least, would it be possible to override the listening port to set it manually to :80 ?

RocksDB Storage option broken since 3.3.10 when starting a new database image

I believe the Docker image post version 3.3.9 (so 3.3.10 and 3.3.11) is broken when you elect to initialise a new database using storage option "rocksdb".

Here is my test case:-

Base O/S = Ubuntu 18.04 or OSX 10.13.5
Docker version = 18.03.1-ce
Docker Compose version = 1.21.1

I am using Docker Compose, but I see the same results if I use the basic "docker run" style command to pull and start the containers.

Create a Docker compose file referencing version 3.3.9 as follows:-

# Docker Composition for test ArangoDB single node cluster.
#
version : '3.3'
services:
  arangodb:
    image: arangodb/arangodb:3.3.9
    environment:
      - ARANGO_ROOT_PASSWORD=password
      - ARANGO_STORAGE_ENGINE=rocksdb
    ports:
      - 8529:8529
    volumes:
      - /Users/me/arangodb/data339/arangodb:/var/lib/arangodb3
      - /Users/me/arangodb/data339/arangoapps:/var/lib/arangodb3-apps
    networks:
      - arangodb
networks:
  arangodb:
    external: true

Ensure that the volume directories mapped do not exist prior to the test.
Start up the container with "docker-compose up"
This works as expected.

Change the version of ArangoDB to 3.3.10 or 3.3.11.
Change the volume directories to point to a new set of empty directories to avoid any confusion.
Here is the revised test:-

# Docker Composition for test ArangoDB single node cluster.
#
version : '3.3'
services:
  arangodb:
    image: arangodb/arangodb:3.3.11
    environment:
      - ARANGO_ROOT_PASSWORD=password
      - ARANGO_STORAGE_ENGINE=rocksdb
    ports:
      - 8529:8529
    volumes:
      - /Users/me/arangodb/data3311/arangodb:/var/lib/arangodb3
      - /Users/me/arangodb/data3311/arangoapps:/var/lib/arangodb3-apps
    networks:
      - arangodb
networks:
  arangodb:
    external: true

Start up the container with "docker-compose up"
This fails.

Here is output from my working 3.3.9 test:-

docker-compose up
Pulling arangodb (arangodb/arangodb:3.3.9)...
3.3.9: Pulling from arangodb/arangodb
3e17c6eae66c: Already exists
4c7a4cfddc95: Pull complete
9aea8aa9f599: Pull complete
e5ccb1595c6c: Pull complete
188056ffcdae: Pull complete
14b4d1c645d8: Pull complete
5aeb82f8c285: Pull complete
Digest: sha256:7e0769fe46ace61726461c0c156b53a5836117f8f06fdf9d759cfe37e597ee13
Status: Downloaded newer image for arangodb/arangodb:3.3.9
Creating arangodb_arangodb_1 ... done
Attaching to arangodb_arangodb_1
arangodb_1  | choosing Rocksdb storage engine
arangodb_1  | Initializing root user...Hang on...
arangodb_1  | 2018-07-02T09:49:23Z [12] INFO {syscall} file-descriptors (nofiles) hard limit is 1048576, soft limit is 1048576
arangodb_1  | 2018-07-02T09:49:23Z [12] WARNING {memory} /proc/sys/vm/overcommit_memory is set to '1'. It is recommended to set it to a value of 2
arangodb_1  | 2018-07-02T09:49:23Z [12] WARNING {memory} execute 'sudo bash -c "echo 2 > /proc/sys/vm/overcommit_memory"'
arangodb_1  | 2018-07-02T09:49:24Z [12] INFO {startup} Server will now shutdown due to upgrade, database init or admin restoration.
arangodb_1  | Initializing database...Hang on...
arangodb_1  | Database initialized...Starting System...
arangodb_1  | 2018-07-02T09:49:28Z [1] INFO ArangoDB 3.3.9 [linux] 64bit, using jemalloc, build tags/v3.3.9-0-g8b8476c77e, VPack 0.1.30, RocksDB 5.6.0, ICU 58.1, V8 5.7.492.77, OpenSSL 1.1.0f  25 May 2017
arangodb_1  | 2018-07-02T09:49:28Z [1] INFO {authentication} Jwt secret not specified, generating...
arangodb_1  | 2018-07-02T09:49:28Z [1] INFO detected operating system: Linux version 4.9.87-linuxkit-aufs (root@95fa5ec30613) (gcc version 6.4.0 (Alpine 6.4.0) ) #1 SMP Wed Mar 14 15:12:16 UTC 2018
arangodb_1  | 2018-07-02T09:49:28Z [1] INFO using storage engine rocksdb
arangodb_1  | 2018-07-02T09:49:28Z [1] INFO {cluster} Starting up with role SINGLE
arangodb_1  | 2018-07-02T09:49:28Z [1] INFO {syscall} file-descriptors (nofiles) hard limit is 1048576, soft limit is 1048576
arangodb_1  | 2018-07-02T09:49:28Z [1] INFO {authentication} Authentication is turned on (system only), authentication for unix sockets is turned on
arangodb_1  | 2018-07-02T09:49:28Z [1] WARNING {memory} /proc/sys/vm/overcommit_memory is set to '1'. It is recommended to set it to a value of 2
arangodb_1  | 2018-07-02T09:49:28Z [1] WARNING {memory} execute 'sudo bash -c "echo 2 > /proc/sys/vm/overcommit_memory"'
arangodb_1  | 2018-07-02T09:49:28Z [1] INFO using endpoint 'http+tcp://0.0.0.0:8529' for non-encrypted requests
arangodb_1  | 2018-07-02T09:49:28Z [1] INFO Please note that a new bugfix version '3.3.11' is available
arangodb_1  | 2018-07-02T09:49:28Z [1] INFO ArangoDB (version 3.3.9 [linux]) is ready for business. Have fun!

And here is the output from my failing 3.3.11 test:-

docker-compose up
Pulling arangodb (arangodb/arangodb:3.3.11)...
3.3.11: Pulling from arangodb/arangodb
3e17c6eae66c: Pull complete
dc8136269288: Pull complete
e9b0ef755caf: Pull complete
1e1f508032aa: Pull complete
3599dcb0cd3d: Pull complete
9b084f31df5c: Pull complete
89b493964223: Pull complete
Digest: sha256:43e6edb340c98fb47e8bc39a524b8668e75fe19195957af085c9610708290fc4
Status: Downloaded newer image for arangodb/arangodb:3.3.11
Creating arangodb_arangodb_1 ... done
Attaching to arangodb_arangodb_1
arangodb_1  | choosing Rocksdb storage engine
arangodb_1  | Initializing root user...Hang on...
arangodb_1  | 2018-07-02T10:00:06Z [9] INFO {syscall} file-descriptors (nofiles) hard limit is 1048576, soft limit is 1048576
arangodb_1  | 2018-07-02T10:00:06Z [9] WARNING {memory} /proc/sys/vm/overcommit_memory is set to '1'. It is recommended to set it to a value of 0 or 2
arangodb_1  | 2018-07-02T10:00:06Z [9] WARNING {memory} execute 'sudo bash -c "echo 2 > /proc/sys/vm/overcommit_memory"'
arangodb_1  | 2018-07-02T10:00:09Z [9] INFO {startup} Server will now shutdown due to upgrade, database init or admin restoration.
arangodb_1  | Initializing database...Hang on...
arangodb_1  | ArangoDB didn't start correctly during init
arangodb_1  | 2018-07-02T10:00:16Z [52] INFO ArangoDB 3.3.11 [linux] 64bit, using jemalloc, build tags/v3.3.11-0-gbe3795a25a, VPack 0.1.30, RocksDB 5.6.0, ICU 58.1, V8 5.7.492.77, OpenSSL 1.1.0f  25 May 2017
arangodb_1  | 2018-07-02T10:00:16Z [52] INFO {authentication} Jwt secret not specified, generating...
arangodb_1  | 2018-07-02T10:00:16Z [52] INFO detected operating system: Linux version 4.9.87-linuxkit-aufs (root@95fa5ec30613) (gcc version 6.4.0 (Alpine 6.4.0) ) #1 SMP Wed Mar 14 15:12:16 UTC 2018
arangodb_1  | 2018-07-02T10:00:16Z [52] FATAL {startup} content of 'ENGINE' file '/var/lib/arangodb3/ENGINE' and command-line/configuration option value do not match: 'mmfiles' != 'rocksdb'. please validate the command-line/configuration option value of '--server.storage-engine' or use a different database directory if the change is intentional
arangodb_arangodb_1 exited with code 1

Error when starting container with rocksdb

Environment: Kubernetes
Running as a cluster, the following error is thrown and the container fails to start.
FATAL {startup} unable to initialize RocksDB engine: IO error: No space left on device/var/lib/arangodb3/engine-rocksdb/000304.sst: No space left on device; Maybe your filesystem doesn't provide required features? (Cifs? NFS?)

FATAL cannot start server: system error when trying to use host directories

If I try and specify the host directories in my docker-compose.yml I just get the error.

starting ArangoDB in stand-alone mode
creating initial user, please wait ...
2015-10-07T05:11:17Z [15] FATAL cannot start server: system error
More error details may be provided in the logfile '/tmp/arangodb.log'

Without them specified everything runs fine. I'm just using latest.

These are the volume lines from .yml

  • ../arangodb/data/database:/var/lib/arangodb:rw
  • ../arangodb/data/apps:/var/lib/arangodb-apps:rw
  • ../arangodb/data/logs:/var/log/arangodb:rw

I've also tried each line individually too, but no different. I can confirm it is definitely using the directories as files and folders are created. arangodb.log is created in my logs dir, but it's empty.

I've also ran a chown -R 999 on my local /arangodb/data dir

Any assistance would be greatly appreciated.

Cheers
Paul

Arango cluster in docker

Hi guys,

Bit of help please. I'm wanting to build an arrango cluster in docker. 10 data nodes and 3 coordinators. Firstly, is this possible? Or I'm I doing something wrong... (Must be the elasticsearch within me)

Thanks in advance

host directories, data container - volume access permission denied

I'm using boot2docker. Default user there is: docker ... UID:1000 GID:50

arangodb is set to UID:999 GID:999 ... so your "Using host directories" and "Using a data container" examples don't work. They don't start without any error message.

IMO the info for: "Using host directories" should be like this:

unix> mkdir /tmp/arangodb
unix> sudo chown 999 /tmp/arangodb
unix> docker run -p 8529:8529 -d -v /tmp/arangodb:/data arangodb

IMO the info for: "Using a data container" should be like this:

unix> docker run -d --name arangodb-persist -v /data -v /apps  ubuntu:14.04 chown 999 /data /apps
unix> docker run --volumes-from arangodb-persist -p 8529:8529 arangodb

I personally would use tianon/true or progrium/busybox to create the volume containers, because of size.

How to Run ArangoDB Container on Openshift Container Platform

I am trying to run the ArangoDB container on Openshift platform. It throws the following error:

chown: changing ownership of '/var/lib/arangodb3': Operation not permitted

I know it is not your problem and Openshift guys should provide it, but have you guys thought about providing a container that can also run on Openshift platform?

FYI. I also wrote about this request on stackoverflow (https://stackoverflow.com/questions/44756008/how-to-run-arangodb-on-openshift)

docker image couldn't run entrypoint.sh

Hi,

i tried to build a arangodb image using dockefile33.local and couldn't run the image after building it.

I realize you need to update the execution rights to make it work in the dockerfile after copying the entrypoint.sh with: chmod +x /entrypoint.sh

version 3.1.1 not starting

The following error occurs if I run docker run -e ARANGO_RANDOM_ROOT_PASSWORD=1 -d --name arangodb-instance arangodb:3.1.1:

Initializing root user...Hang on...
Initializing database...Hang on...
/entrypoint.sh: line 74:    46 Terminated              arangod --server.endpoint unix:///tmp/arangodb-tmp.sock --server.authentication false --log.file /tmp/init-log --log.foreground-tty false
ArangoDB Init failed.

Version 3.0 and 3.1.0 are working. Any ideas?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.