install: invalid user "mysql" on Gentoo - gentoo

I just installed Gentoo 2.2 in a Mac-hosted VirtualBox. I seeing the following snippet in /var/log/rc.log:
* Activating additional swap space ...
[ ok ]
* setting up tmpfiles.d entries ...
install: invalid user "mysql"
[ !! ]
* Initializing random number generator ...
[ ok ]
I don't have mysql installed.
What is causing the invalid user message and how do I make it go away?

I figured out what the problem was. I had mysql set in the USE variable in /etc/portage/make.conf even though I hadn't installed MySQL yet. Doing the following solved the problem:
Remove mysql from USE in /etc/portage/make.conf.
emerge --update --deep --newuse #world
emerge --depclean

Related

puppet-mongodb module doesn't show Mongo shell errors in puppet-agent run

We use the voxpupuli/puppet-mongodb module to create and manage Mongo data bases and users.
As usual we add necessary data to manifests and Hiera and after that the module form a command which it runs on the client side during a puppet-agent run.
We can see the executing command from the puppet-agent debug logs for instance this command create a new DB with the name unixtest_db:
Executing: '/usr/bin/mongo unixtest_db2 --quiet --host 127.0.0.1:27017 --eval load('/root/.mongorc.js'); db.dummyData.insert({"created_by_puppet": 1})'
The problem is the module never report any errors occurred during the commands execution.
For example consider the next hiera code:
tele2_mongodb::mongodb_db:
'unixtest_db': # DB name
user : unixtest
password : >
ENC[PKCS7,....]
auth_mechanism : scram_sha_1
roles :
- dbOwner
As result we have the next command executing and results:
Executing: '/usr/bin/mongo unixtest_db2 --quiet --host 127.0.0.1:27017 --eval load('/root/.mongorc.js'); db.dummyData.insert({"created_by_puppet": 1})'
Notice: /Stage[main]/Tele2_mongodb/Mongodb::Db[unixtest_db]/Mongodb_database[unixtest_db]/ensure: created
Now we can connect to the DB with the user credential mentioned in hiera:
# mongo -u unixtest -p password unixtest_db
MongoDB shell version v5.0.9 connecting to: mongodb://127.0.0.1:27017/unixtest_db?
...
unixtesttst:PRIMARY>
Next we change the DB name in Hiera to all capital letters:
tele2_mongodb::mongodb_db:
'UNIXTEST_DB': # DB name
In puppet agent output we see identical:
Executing: '/usr/bin/mongo UNIXTEST_DB --quiet --host 127.0.0.1:27017 --eval load('/root/.mongorc.js'); db.dummyData.insert({"created_by_puppet": 1})'
Notice: /Stage[main]/Tele2_mongodb/Mongodb::Db[UNIXTEST_DB]/Mongodb_database[UNIXTEST_DB]/ensure: created
But the database is not created, it's not in the db.adminCommand('listDatabases') output (the 1st one with all small letters still exist).
And if we run the command manually on the OS console, we see the error message:
# /usr/bin/mongo UNIXTEST_DB --host 127.0.0.1:27017 --eval " load('/root/.mongorc.js'); db.dummyData.insert({"created_by_puppet": 1})"
MongoDB shell version v5.0.9
...
WriteResult({
"nInserted" : 0,
"writeError" : {
"code" : 13297,
"errmsg" : "db already exists with different case already have: [unixtest_db] trying to create [UNIXTEST_DB]"
}
})
So my question is how to make the puppet also report errors if command execution failed instead of fake notification everything went smoothly.
I have the same problem for DB changes, users and passwords. If something went wrong we never know that from the puppet output.
Any ideas how to fix it?

Ansible on SLES: zypper plugin not able to install PostgreSQL 14

I am trying my hand on Ansible after having a very nice training in it. Currently, my task is to create a playbook that sets up a PostgreSQL cluster (with Patroni and etcd).
However, while installing PostgreSQL should be a pretty easy task, doing it using the zypper plugin throws an error. First, the part of the playbook that should install PostgreSQL:
- name: Installation PostgreSQL 14 Latest ohne Recommendations
become: true
zypper:
disable_recommends: true
name:
postgresql14-server
postgresql14-contrib
postgresql14-devel
update_cache: true
when: ansible_host in pgservers
The error message given is this:
fatal: [goeccdb22l]: FAILED! => {"changed": false, "cmd": ["/usr/bin/zypper", "--quiet", "--non-interactive", "--xmlout", "install", "--type", "package", "--auto-agree-with-licenses", "--no-recommends", "--", "+postgresql14-server postgresql14-contrib postgresql14-devel"], "msg": "No provider of '+postgresql14-server postgresql14-contrib postgresql14-devel' found.", "rc": 104, "stderr": "", "stderr_lines": [], "stdout": "<?xml version='1.0'?>\n<stream>\n<message type=\"error\">No provider of &apos;+postgresql14-server postgresql14-contrib postgresql14-devel&apos; found.</message>\n</stream>\n", "stdout_lines": ["<?xml version='1.0'?>", "<stream>", "<message type=\"error\">No provider of &apos;+postgresql14-server postgresql14-contrib postgresql14-devel&apos; found.</message>", "</stream>"]}
Let's extract the error message:
"msg": "No provider of '+postgresql14-server postgresql14-contrib postgresql14-devel' found."
I tried to replicate the problem using the shell on the target server. However, running the command seems to be able to install the packages:
ansible#goeccdb22l:~> sudo /usr/bin/zypper install --type package --auto-agree-with-licenses --no-recommends -- +postgresql14-server postgresql14-contrib postgresql14-devel
Loading repository data...
Reading installed packages...
Resolving package dependencies...
The following 12 NEW packages are going to be installed:
libecpg6 libopenssl-1_1-devel libpq5 postgresql postgresql14 postgresql14-contrib postgresql14-devel postgresql14-server postgresql-contrib postgresql-devel postgresql-server zlib-devel
The following package needs additional customer contract to get support:
postgresql14
12 new packages to install.
Overall download size: 8.0 MiB. Already cached: 0 B. After the operation, additional 35.4 MiB will be used.
Continue? [y/n/v/...? shows all options] (y):
I've removed only the --quiet and --non-interactive options from the command, but kept all other given options.
The best idea I have is that the user/privilege escalation workings could be different from me logging in as the Ansible user to the target and just using sudo before the command.
Edit 1: I have developed an idea what the problem could be. As I mentioned above, when I tested the command, I removed two options: --quiet and --non-interactive. Testing the command with those two options gives the message:
The flag --quiet is not known.
However, using man zypper, I can clearly see that --quiet is a documented option:
-q, --quiet
Suppress normal output. Brief (esp. result notification) messages and error messages will still be printed, though. If used together with conflicting --verbose option, the --verbose option takes preference.
Now, my idea is that Ansible calls the command it documents in the return XML, but that because somehow --quiet is not understood it interprets that as nothing providing the requested package list. So that would leave two questions:
Why is --quiet not understood, yet documented? Is that a problem of SLES vs. OpenSuse?
How to work around that?
As the Ansible zypper module has no option to suppress the --quiet option I don't see any chance of working around it with parameters. The last option would be to split the zypper task into smaller shell tasks which I would like to avoid if possible.
So, with the help of a knowledgeable sysadmin I was able to diagnose the problem.
The list of packages documented above was not in fact a list. As I missed the dashes in front of the packages, Ansible accepted the packages with the newlines and everything as one package name and tried to install it.
The solution is to change the packages into a list of packages by prefixing them with dashes/minus signs.
The problem with --quiet was that it is a positional argument, and I used the wrong position when testing it.

connection refused error when trying to install plugins

i'm trying to install the logstash-input-jmx plugin but I keep getting a
ERROR: Something went wrong when installing , message: Connection refused - Connection refused
I've tried to set the proxy before running but no luck:
export http_proxy=http://proxy.com:8099
export https_proxy=http://proxy.com:8099
./logstash-plugin install logstash-input-jmx
I've edited the logstash-plugin file to include the proxy like this:
#!/bin/sh
unset CDPATH
. "$(cd `dirname $0`/..; pwd)/bin/logstash.lib.sh"
setup
# bin/logstash-plugin is a short lived ruby script thus we can use aggressive "faster starting JRuby options"
# see https://github.com/jruby/jruby/wiki/Improving-startup-time
export JRUBY_OPTS="$JRUBY_OPTS -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-noverify -X-C -Xcompile.invokedynamic=false"
export http_proxy=http://proxy.com:8099
export https_proxy=http://proxy.com:8099
ruby_exec "${LOGSTASH_HOME}/lib/pluginmanager/main.rb" "$#"
but got the same error
I've tried to even follow this github page: https://github.com/logstash-plugins/logstash-input-jmx
but when I get to bin/logstash-plugin install --no-verify...I still got the same error...
I was able to fix this by adding in the proxy to LS_JAVA_OPTS
LS_JAVA_OPTS='-Dhttp.useProxy=true -Dhttp.proxyHost=http://proxy.com -Dhttp.proxyPort=8099 -Dhttps.proxyHost=http://proxy.com -Dhttps.proxyPort=8099' ./logstash-plugin install logstash-input-jmx

Odoo Client Error Error: QWeb2: Template 'mail.chat.MessagingMenu' not found

When I trying to upgrade my application error occurs.enter image description here
What is the Solution for it ??
I can't able to fix this error .
Plz give me the solution ...
Please, make sure that:
The user 'odoo' is the owner of your DB. In any case:
ALTER DATABASE <db_name> OWNER TO odoo;
You have all the dependencies installed, in particular less. In any case:
sudo npm install -g less less-plugin-clean-css

Logstash install error: can't get unique system GID (no more available GIDs)

I am trying to install logstash with yum on a red hat vm, I already have the logstash.repo file setup according to the guide and i ran
yum install logstash
but I get the following error after it downloads everything
...
logstash-2.3.2-1.noarch.rpm | 72 MB 00:52
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
groupadd: Can't get unique system GID (no more available GIDs)
useradd: group 'logstash' does not exist
error: %pre(logstash-1:2.3.2-1.noarch) scriptlet failed, exit status 6
Error in PREIN scriptlet in rpm package 1:logstash-2.3.2-1.noarch
error: install: %pre scriptlet failed (2), skipping logstash-1:2.3.2-1
Verifying : 1:logstash-2.3.2-1.noarch 1/1
Failed:
logstash.noarch 1:2.3.2-1
Complete!
I can't find much information about this. Any suggestions?
groupadd determines gids for the creation of regular groups from the /etc/login.defs file.
In my centos 6 box. /etc/login.defs contains following two lines:
#
# Min/max values for automatic gid selection in groupadd
#
GID_MIN 500
GID_MAX 60000
For system accounts add these two lines to your /etc/login.defs
# System accounts
SYS_GID_MIN 100
SYS_GID_MAX 499
I updated the SYS_GID_MAX Value and it worked for me.

Resources