Category Archives: Programming

Apollo GraphQL – Private (Authentication)/Public API using Schema Directives/Annotation

Apollo GraphQL – Private (Authentication)/Public API using Schema Directives/Annotation

This is one of the most common use case where we need to disable authentication for APIs such as Login API (Generate Access Token). Basically we will have all our APIs hosted in single instance of Apollo GraphQL server (We did not use any of the middleware such as Express). There are number of ways to solve this problem.… Read More »

Solved – mount: wrong fs type, bad option, bad superblock on Linux (AWS EBS EC2)

Solved – mount: wrong fs type, bad option, bad superblock on Linux (AWS EBS EC2)

The problem is that we need to create a file system after which we can mount the block device in the required directory. Error mount: wrong fs type, bad option, bad superblock on /dev/xvdf, missing codepage or helper program, or other error In some cases useful info is found in syslog – try dmesg |… Read More »

Docker RabbitMQ – Default Username/Password Environment Variable Not Working – Solved

Docker RabbitMQ – Default Username/Password Environment Variable Not Working – Solved

I was playing around with the official Docker image of RabbitMQ and I was trying to use RABBITMQ_DEFAULT_USER/RABBITMQ_DEFAULT_PASS environment variable to override the default username/password (guest/guest). I noticed that the username/password provided via the environment variables were set in the rabbitmq.conf file. Still I was neither able to access the queues using the API nor the management console. But I… Read More »

Docker DataStax DSE Volume Mount Not Working – Solved

Docker DataStax DSE Volume Mount Not Working – Solved

I was playing around with DataStax DSE Docker image using Docker Compose and noticed that the Docker volumes were not mounted. I was able to solve the issue by using named volume mounts (Docker Compose v3). Not Working Docker Compose YAML version: “2” services: dse01: volumes: – /mnt/dse/data/cassandra:/var/lib/cassandra – /mnt/dse/data/spark:/var/lib/spark Working Docker Compose YAML version: “3.2” services: dse01: volumes:… Read More »

Elasticsearch Geo-Shape Slow Indexing Performance – Solved

Elasticsearch Geo-Shape Slow Indexing Performance - Solved

Elasticsearch Geo-Shape Slow Indexing Performance – Solved

Elasticsearch Geo-Shape Slow Indexing Performance - Solved

           We were using Hosted Elasticsearch 1.4.4 to index geo-shape data with the following field mapping. { “geoShapeField”: {     “type”: “geo_shape”,        “tree”: “quadtree”,        “tree_levels”: 26 //Or use precision: “1m”,        “distance_error_pct”: 0.025 // Optional, 0.025 is default } }      … Read More »