Im using unraid server and the Docker image InfluxDB.
I'm able to go to mine localhost:8086, and I create root user (admin user), but then, I do not have the option for adding more users.
I can add more organizations and buckets, but I simply can't add any users?
Any hints? Im new to this InfluxDB, my ultimate goal is to hook up with Grafana and Telegraf..
I'd assume that you can add users using the command from the docs.
With docker this should be possible with something like this (given your container name os influxdb2):
$ docker exec influxdb2 influx user create \
-n <username> \
-p <password> \
-o <org-name>
Try logging into the Docker image itself and using the influx command directly to see if you can create a new user - it may give you some insight into what's going on.
docker exec -it imagename bash
then when you have a shell
influx user create -n username
As said the command
docker exec IMAGE influx user create -n username
should achieve the same thing.
Related
How to recreate my problem
Creating the MonetDB Container
I have this setup (using windows with Docker Desktop).
Create the official monetdb docker container with the follwing command:
docker run -v $HOME/Desktop/monetdbtest:/monetdbtest -e 'MONET_DATABASE=docker' -e 'MONETDB_PASSWORD=docker' -p 50000:50000 -d topaztechnology/monetdb:latest
explanation what the command does:
creates a monetdb container with a database called 'docker' and applies the password 'docker' to the default user called 'monetdb'. It also mounts my directory monetdbtest/ into the container.
Testing the container with DBeaver
I test the connection using DBeaver with the following credentials:
JDBC URL: jdbc:monetdb://localhost:50000/docker
host: localhost
port: 50000
Database/schema: docker
username: monetdb
password: docker
this works fine, i am able to connect and can exequte sql queries with dbeaver.
Using mclient within the container to send queries
I enter the container as root with the following command:
docker exec -u root -t -i nostalgic_hodgkin /bin/bash
(replace nostalgic_hodgkin with your randomly generated container name)
2.
I navigate to my mounted directory
cd monetdbtest
then I test the connection with mclient:
mclient -h localhost -p 50000 -d docker
I get asked for user and password, so for user I enter
monetdb and for password I enter docker. It works and I am in the mclient shell, able to execute SQL queries.
3.
Since I don't want to always enter username and password I create a .monetdb file in the monetdbtest/ directory. It looks like this:
user=monetdb
password=docker
Now I should be able to use the mclient command without entering user information. So I type this command:
mclient -h localhost -p 50000 -d docker
However I get the message:
'nvalidCredentialsException:checkCredentials:invalid credentials for user 'monetdb
I did everything according to the mclient manual. Maybe I missed something?
You may need to export the environment variable DOTMONETDBFILE with value /monetdbtest/.monetdb. See the man page for mclient, especially the paragraph before the OPTIONS heading.
I've created a Nexus server using the official Docker image from Sonatype. My version is 3.28.1 and I can't find admin password or admin.password file in the usual place.
cat /opt/sonatype/sonatype-work/nexus3/admin.password
I've also tried default admin password admin123 and it did not work?
I could not find any release notes about this change and I would like to know where to find the admin password.
Thanks in advance.
Make docker container using following command
$ docker volume create --name nexus-data
$ docker run -d -p 8081:8081 --name nexus -v nexus-data:/nexus-data sonatype/nexus3
Then you will find admin.password file in /nexus-data folder.
Run following command to see default password!
$ docker exec -it nexus /bin/bash
bash-4.4$ cat /nexus-data/admin.password
For more detailed comment, check following url
https://hub.docker.com/r/sonatype/nexus3/#user-content-persistent-data
Are you using the sonatype/nexus3 image? Then it should be in /nexus-data.
If it's not there, then the only solution I've found was to remove all the contents of the /nexus-data directory and restart the container. That should initialize a new config, including a new admin password, which should now be available at /nexus-data/admin.password.
I installed Apache superset through docker but I cannot make the login. I am trying use admin/admin credentials but it returns invalid login.
I am trying to use some information found here, like docker-compose exec superset bash -c 'export FLASK_APP=superset && flask fab create-admin' but I got the error flask_appbuilder.security.sqla.manager:Error adding new user to database. (psycopg2.ProgrammingError) relation "ab_user_role" does not exist
LINE 1: INSERT INTO ab_user_role (id, user_id, role_id) VALUES (next....
I am beginner in use docker and Apache superset, could someone help me to understand what is going wrong?
I had the same error. Apparently, you need to create the db. Run this first:
docker-compose run --rm -e FLASK_APP=superset superset flask fab create-db
Struggling to get a docker app to both pipe output to a file, and read input. Running the same command in bash works fine.
The command is a CLI I created called envwarden (a simple bash script wrapping around the Bitwarden CLI).
Easiest to show an example:
locally
Running it locally (not inside docker), it works as expected:
$ ./envwarden --dotenv >/tmp/secrets.txt
.envwarden file not found in /home/user ... prompting for credentials
? Email address: my#email.addr
? Master password: [hidden]
The prompts work fine. I can type in my email (shown), password (hidden), and the output goes to /tmp/secrets.txt just fine.
with docker
With docker, things behave a bit differently.
With docker run -ti (or just docker run -t), there's no prompt at all for email or password...
$ docker run --rm -ti envwarden/envwarden envwarden --dotenv >/tmp/secrets.txt
# ... no output ...
With docker run -i, the prompt shows, but anything I type is repeated, and password is shown as well! :-/
$ docker run --rm -i envwarden/envwarden envwarden --dotenv >/tmp/secrets.txt
.envwarden file not found in /root ... prompting for credentials
? Email address: my#email.address
? Email address: my#email.address
? Master password: [input is hidden] my password
? Master password: [hidden]
docker run, without -t or -i it shows the prompt, but fails to get input
$ docker run --rm envwarden/envwarden envwarden --dotenv >/tmp/secrets.txt
.envwarden file not found in /root ... prompting for credentials
? Email address: unable to login or sync with bitwarden.
Further details
Here's the Dockerfile and docker-entrypoint.sh
Question
How can I get docker to match the same behaviour as running locally? i.e. prompt for password without showing it, and redirect output to stdout.
The behavior you observe is due to the way docker run handles standard streams.
In particular, this is related to moby/moby#725 and PR moby/moby#741:
If you pass no -i nor -t flag to docker run: your terminal is not attached to the standard input of your main program, which thereby behaves as if you had typed empty strings as credentials.
If you only pass the -i flag to docker run, your terminal is attached to your program's stdin, but no pseudo-TTY is allocated, implying you get a not very user-friendly CLI interaction (no hiding feature during password typing, and possible duplication of output lines).
If you pass the -it flags to docker run: a pseudo-TTY is allocated, so the password prompt should work (hiding what you type), but at the same time, the stdout and stderr streams are mixed, so when you append the >/tmp/secrets.txt redirection, you don't actually see the prompt as everything is sent to your /tmp/secrets.txt file!
All in all, to achieve what you want I guess you should stick to the -it option, but rather use a bash redirection "inside" the container (not outside) and also rely on some bind-mount option.
Hence the following proof of concept:
export out="/tmp/secrets.txt" # absolute path to the output file in the host
docker run --rm -it -v "$out:$out" envwarden/envwarden \
/bin/bash -c "envwarden --dotenv >$out"
cat "$out"
(This should work normally, but I did not try it on your particular instance, so comments are welcome.)
I am not able to connect with MongoDB and PostgreSQL. I am using the command below:
docker exec -it todomvc-mongodb mongo -user wolkenkit -p 576085646aa24f4670b929f0c47032ebf149e48f admin.
It shows the following result:
2018-08-14T11:48:20.592+0000 E QUERY [thread1] Error: Authentication failed. : –
I have tried to reproduce your issue. What I have done:
I cloned the wolkenkit-todomvc sample application.
I started it using wolkenkit start.
This gave me the (randomly created) shared key 4852f4430d67990c28354b6fafae449c4f82e9ab (please note that this value is different each time you run wolkenkit start, unless you set it explicitly to a value of your choice, so YMMV).
Then I tried:
$ docker exec -it todomvc-mongodb mongo -user wolkenkit -p 4852f4430d67990c28354b6fafae449c4f82e9ab admin
It actually doesn't work. The reason for this is that the parameter -user does not exist, it either has to be -u or --username. If you run:
$ docker exec -it todomvc-mongodb mongo -u wolkenkit -p 4852f4430d67990c28354b6fafae449c4f82e9ab admin
Then, things work as expected.
Hope this helps 😊