I'm new to docker and pgAdmin.
I am trying to create a server on pgAdmin4. However, I cannot see the Server dialog when I click on "Create" in pgAdmin. I only see Server Group (image below).
Here's what I'm doing in the command prompt:
Script to connect and create image for postgres:
docker run -it -e POSTGRES_USER="root" -e POSTGRES_PASSWORD="root" -e POSTGRES_DB="ny_taxi" -v "c://Users//bpatel//data-engineering-zoomcamp//week_1_basics_n_setup//2_docker_sql//ny_taxi_data:/var/lib/postgresql/data" -p 5431:5432 postgres:13
Script to run pgAdmin after postgres is running:
docker run -it -e PGADMIN_DEFAULT_EMAIL="admin#admin.com" -e PGADMIN_DEFAULT_PASSWORD="root" -p 8080:80 dpage/pgadmin4
I am using localhost:8080 in my browser to open pgAdmin. When I try to create a new server, I only see "Server Group" option. But I need the "Server" dialog. Image for reference:
I'm not sure what I am missing? Please help! Thank you!!
They recently changed "create server" to "register server", to more accurately reflect what it actually does. Be sure to read the docs for the same version of the software as you are actually using.
Related
I and new to use docker, I'm so confused about creating postgres container in docker.
what is -v /data:/var/lib/postgresql/data in the command line below, which is for creating a container in docker? Is it for setting the volume? Can I change the path since I cannot find the postgresql in /lib, and so I cannot find the file path when I want add the file permission in file sharing in docker setting.
sudo docker run -d --name mybd --network mydb-network -p 5432:5432 -v /data:/var/lib/postgresql/data -e POSTGRES_PASSWORD=mydb -e PGDATA=/var/lib/postgresql/data/pgdata postgres
running container error
when I tried to run container in docker, it showed this error. Then I went to docker setting and wanted add /data path to file sharing, however, I cannot find the /date path.
I have been trying since yesterday to connect to a ChainLink node and I was not able to.
I followed the steps at this website
I am having a problem with "Set the Remote DATABASE_URL Config" (I think that this is my only error because of the [ERROR] listed below, I do not know if I am doing something else wrong since every command was executed without error)
I am using the Docker option to create the database listed here.
I am always having this error:
"[ERROR] unable to lock ORM: failed to connect to host=localhost user=some-postgres database=postgres: dial error (dial tcp [::1]:5432: connect: cannot assign requested address) logger/default.go:155 stacktrace=github.com/smartcontractkit/chainlink/core/logger.Errorf
/chainlink/core/logger/default.go:155"
After writing in my Ubuntu Terminal (ON WINDOWS 10):
"cd ~/.chainlink-kovan && docker run -p 6688:6688 -v ~/.chainlink-kovan:/chainlink -it --env-file=.env smartcontract/chainlink:0.10.1 local n"
I do not know how to connect to the database and what to write as attributes. All of the other steps and installs I have accomplished successfully.
I just want to know how to create a database on PostgreSQL and connect it to Docker as explained on the ChainLink website and write the appropriate command in the Ubunto terminal (for the "Remote DATABASE_URL Config PostgreSQL" step) so that I can run my node.
Thanks! (PS: I am a beginner and your help is much appreciated, and if I forgot to mention any important information please let me know so that I add it)
A comprehensive 101 for docker-postgres can be found here: https://hackernoon.com/dont-install-postgres-docker-pull-postgres-bee20e200198
Basically, you need to deploy a postgres db with docker
Pre-Reqs:
Create a dir for you docker/postgres:
mkdir -p $HOME/docker/volumes/postgres
Example:
docker run --rm --name pg-docker -e POSTGRES_USER=<any_desired_name> -e POSTGRES_PASSWORD=docker -e POSTGRES_DB=<any_db_name> -d -p 5432:5432 -v $HOME/docker/volumes/postgres:/var/lib/postgresql/data postgres
For postgres username, it can be anything like "super_chain" or etc.
For postgres db, it can be "chainlink"
After, docker is up and running. Just follow up the docs tut, where you need to write the DB URL to the .env file
Cheers
So, I pulled the postgres image down from docker. I followed a tutorial which explained what's going with the command below and the the whole docker pull. I can log in to the instance fine. But when I restart my computer or shutdown docker I end up goign through similar setup steps and am not able to access the postgres instance anymore. Can someone explain what's going on here:
Run this command
docker run --rm --name pg-docker -e POSTGRES_PASSWORD=docker -d postgres -p 5432:5432 -v $HOME/docker/volumes/postgres:/var/lib/postgresql/data postgres
log in via PG admin.
Nothing, instance not available.
So, I feel like I am missing a step at one point I had executed a command like this:
docker exec -it c5b8bdd0820b35a01ea153a44e82458a6285cf484b701b2b2d6d4210266fb4f8 bash
which gave me acess to the shell for the image, after doing that I was able then to use PGAdmin, however, I feel like that may have been coincidence? As this does not work currently.
So, what am I doing wrong? What's an easier way to do this?
The --rm causes Docker to automatically remove the container when it exits. Remove it.
You can also add --restart always and your container will be up after restart.
I am begginer with docker, and I stuck in place due to container restarting problem.
The problem occures when I try to restart an existing exited container, or create new container (after deleting old one) running:
docker run -d --name mempostgres \
-v "/home/lukasz/lc_pg_data:/var/lib/pgsql/data:Z" \
-e POSTGRES_USER=postgres \
-e POSTGRES_PASSWORD=password \
-e POSTGRES_DB=dbName \
-p 5432:5432 \
fedora/postgresql
My container always exits immediately with status "Exited(1)"
Inside the logs of my container i have:
However I don't have any PostgreSQL server running at this moment.
You need to kill that postmaster process.
cat .../postmaster.pid
The first number of this file is the PID of postmaster process.
Then, kill that process using:
kill PID
Finally, run a container, your problem should be fixed.
Postgres should conatain password environmental variable as below:
-e POSTGRES_PASSWORD=postgres
Add also, pgadmin should have two environmental variables(email and passworld) as below:
-e 'PGADMIN_DEFAULT_EMAIL=address#email.something' -e 'PGADMIN_DEFAULT_PASSWORD=postgresmaster'
This is the email address used when setting up the initial administrator account to login to pgAdmin. This variable is required and must be set at launch time.
If these details are not given postgres and pgadmin will go to exited state.
I'm trying to getting started with restcomm following this guide:
http://docs.telestax.com/restcomm-docker-quick-start-guide/
but I'm facing two issues at this time:
Cannot make SIP calls. After I run the docker run command my softphone (X-Lite) can register successfully with the server but when I try to call +1234 I receive 'Call failed to connect'. This is what I see in logs:
https://justpaste.it/tdjg
I also can't connect to Visual Service Designer. This is what I see:
Log:
https://justpaste.it/tdjm
The docker command that I'm using is:
docker run --rm -i -t --name=restcomm-instance -v /var/log/restcomm/:/var/log/restcomm/ -e STATIC_ADDRESS="192.168.1.150" -e ENVCONFURL="https://raw.githubusercontent.com/RestComm/Restcomm-Docker/master/scripts/restcomm_env_locally.sh" -e VOICERSS_KEY="fdf04434829e4e02addd8d54b69e6bc0" -p 80:80 -p 443:443 -p 9990:9990 -p 5060:5060 -p 5061:5061 -p 5062:5062 -p 5063:5063 -p 5060:5060/udp -p 65000-65050:65000-65050/udp restcomm/restcomm:latest
And the servo is:
Hope you can help me.
Regards
The Restcomm Docker Quick start guide has recently been updated and should now be much more straightforward to deploy Restcomm on Docker, using Docker compose.