Tag: postgresql

why different output from zabbix_get and zabbix_agentd command?

I am trying to monitor psql container through zabbix. My zabbix-server is not allowed to gather data. I am getting different output for zabbix_get and zabbix_agentd command. output of zabbix_agentd is- [root@ip-]# zabbix_agentd -t psql.running[/usr/local/bin,/usr/local/etc] psql.running[/usr/local/bin,/usr/local/etc] [t|1] output from zabbix_get is as- [root@ip]# zabbix_get -s127.0.0.1 -p10050 -k psql.running[/usr/local/bin,/usr/local/etc] psql: could not connect to server: Permission […]

Connect PostgreSQL server running in docker container to wild-fly docker container?

I am not able to connect wild-fly container to PostgreSQL server which is running in different container. But, I am able to connect to database from host machine.

Dockerized PostgreSQL: psql: FATAL: the database system is starting up

I am trying to build and run two Docker containers hosting PostgreSQL and Citus extension using ansible-container. I am aware that Citus provides containers, but I want to build my own. My container.yaml looks as follows: version: ‘2’ services: database_master: image: hackermd/ubuntu-trusty-python user: postgres expose: – 5043 entrypoint: [‘dumb-init’, ‘–‘] command: [‘/usr/bin/pg_ctlcluster’, ‘9.6’, ‘master’, ‘start’] […]

Cannot exec into docker container due to application

Yesterday I restarted my docker container for my database. My applications can still connect as normal however: The following line no-longer works docker exec -i -t database_1 bash Instead it gives me this error: unable to find user postgres: no matching entries in passwd file I don’t know why it’s not just giving me bash

Cannot connect to PostgreSQL in Docker through PHP

I’m cant connect to PostgreSQL with php code. My Postgresql is docker container. I get an IP with: docker inspect toshi_db_1 How I’m trying to connect: $dbconn = pg_connect(“host= port=5432 dbname=toshi_development”)or die(“Could not connect”); Error: Warning: pg_connect(): Unable to connect to PostgreSQL server: could not connect to server: Connection timed out (0x0000274C/10060) Is the server […]

Docker container with Python Web App – Connect to Postgres on Host machine (OSX)

I can connect to my local Postgres DB in my web app, but NOT if I am running the web app inside of a Docker container. Web app running inside of a Docker container Postgres running in the Host machine I am not sure if it is related to the Postgres connection settings or to […]

How to obtain container Ip from another container?

I have the following docker-compose file: version: ‘2’ services: node: build: ./node/ ports: – “3000:3000” volumes: – ~/src/api:/code links: – postgres environment: – NODE_ENV=dev – POSTGRES_ADDRESS=postgres postgres: build: ./postgres/ ports: – “8000:5432” environment: – POSTGRES_PASSWORD=pw volumes: – ~/Postgres/data/:/var/lib/postgresql/data But when I access process.env.POSTGRES_ADDRESS in my nodejs, it returns ‘postgres’. This is the way I have […]

Access PostgreSQL running in Docker container in Vagrant

I have a Vagrant box in which I have a Docker container that runs PostgreSQL. The container is the official one found here I want to be able to connect to Postgres from the host (i.e outside of Vagrant) using psql but can’t get it to work. (Get a “could not connect”-error). I have added […]

Docker: cannot use postgres client connect to database container

I have created a docker container. This database container is run successfully. I can connect to this container and see all details of database. Here is some configuration: services: db: container_name: db image: postgres:latest ports: – “5432:5432” environment: POSTGRES_USER: abc POSTGRES_PASSWORD: abc POSTGRES_DB: database_dev PGDATA: /var/lib/postgresql/data/pgdata volumes: – postres_volume:/var/lib/postgresql/data/ Here is information I inspect from […]

Cannot connect Npgsql to Postgres DB running on Docker

I have a docker container with a .NET app with the following code: var pgsql = OpenDbConnection(“Server=localhost;Database=postgres;Username=postgres;Password=MyPass;Port=5432”); private static NpgsqlConnection OpenDbConnection(string connectionString) { NpgsqlConnection connection; Console.Error.WriteLine(“Connecting to DB”); while (true) { try { connection = new NpgsqlConnection(connectionString); connection.Open(); break; } catch (SocketException e) { Console.WriteLine(“{0} Exception caught.”, e); Thread.Sleep(1000); } catch (DbException) { Console.Error.WriteLine(“Waiting for […]

Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.