Snappy Mail/Rainloop Authentication failed - mail-server

I Installed the fresh cyberpanel installation when I created a email with the domain and tried to login with the same it shows
Authentication failed
Server message: AUTHENTICATIONFAILED Authentication failed.
I am using VPS server from contabo:
OS: Ubuntu 18.04 (64 Bit)
Installed Cyperpanel using below command.
sh <(curl https://cyberpanel.net/install.sh || wget -O - https://cyberpanel.net/install.sh)
When I checked for the errors I got below Error:
Sep 14 19:44:42 vmi1011202.contaboserver.net dovecot[733]: auth-worker(1939): Error: sql(admin#innovatelifesciences.org,127.0.0.1,<TgoNr6boGLp/AAAB>): Invalid password in passdb: crypt() failed: Invalid argument
Sep 14 19:44:44 vmi1011202.contaboserver.net dovecot[733]: imap-login: Disconnected (auth failed, 1 attempts in 2 secs): user=admin#innovatelifesciences.org, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, TLS, session=<TgoNr6boGLp/AAAB>

This was because of dovecot version once we upgrade devecot from 2.2.x to 2.3.x it'll work.
Follow below steps.
Add the reposity key of dovecot to the rpm key store:
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 18A348AEED409DA1
Add the official dovecot Ubuntu Repo to sources.list
(this example is for Ubuntu 18)
sudo nano /etc/apt/sources.list.d/dovecot.list
insert into:
deb [arch=amd64] https://repo.dovecot.org/ce-2.3-latest/ubuntu/bionic/ bionic main
Save it and close editor
Do a:
sudo apt update
Do a:
sudo apt dist-upgrade
Reboot your machine.
reboot

Related

Fail to start Minikube on Debian

I installed Minikube on my Debian 10, but when I try to start it, I
get these errors:
$ minikube start
* minikube v1.25.2 on Debian 10.1
* Unable to pick a default driver. Here is what was considered, in preference order:
- docker: Not healthy: "docker version --format {{.Server.Os}}-{{.Server.Version}}" exit status 1: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.40/version: dial unix /var/run/docker.sock: connect: permission denied
- docker: Suggestion: Add your user to the 'docker' group: 'sudo usermod -aG docker $USER && newgrp docker' <https://docs.docker.com/engine/install/linux-postinstall/>
- kvm2: Not healthy: /usr/bin/virsh domcapabilities --virttype kvm failed:
error: failed to get emulator capabilities
error: invalid argument: KVM is not supported by '/usr/bin/qemu-system-x86_64' on this host
exit status 1
- kvm2: Suggestion: Follow your Linux distribution instructions for configuring KVM <https://minikube.sigs.k8s.io/docs/reference/drivers/kvm2/>
* Alternatively you could install one of these drivers:
- podman: Not installed: exec: "podman": executable file not found in $PATH
- vmware: Not installed: exec: "docker-machine-driver-vmware": executable file not found in $PATH
- virtualbox: Not installed: unable to find VBoxManage in $PATH
I added my user to the docker group using:
sudo usermod -aG docker $USER
and I insalled kvm without any apparent problems as far as I understand:
kvm --version
QEMU emulator version 3.1.0 (Debian 1:3.1+dfsg-8~deb10u1)
Copyright (c) 2003-2018 Fabrice Bellard and the QEMU Project developers
$ lsmod | grep kvm
kvm 729088 0
irqbypass 16384 1 kvm
$ sudo virsh list --all
Id Name State
-----------------------------
1 debian10-MK running
What could be the problem and solution then?
Thanks,
Tamar

Grafana-server Init Failed - Ubuntu 20.04

Using Grafana 8.3 in Ubuntu 20.04. When I went to the desktop environment to use Grafana, it wouldn’t connect. In the command line, when I type:
sudo netstat -lp
I noticed port 3000 wasn’t listed anymore.
starting the grafana server i get this below
a#a:~$ grafana-server
Grafana-server Init Failed: Could not find config defaults, make sure homepath command line parameter is set or working directory is homepath
when checking the status, I get this:
● grafana-server.service - Grafana instance
Loaded: loaded (/lib/systemd/system/grafana-server.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2022-01-05 16:06:11 MST; 11min ago
Docs: http://docs.grafana.org
Process: 4621 ExecStart=/usr/sbin/grafana-server --config=${CONF_FILE} --pidfile=${PID_FILE_DIR}/grafana-server.pid --packaging=deb cfg:default.paths.lo>
Main PID: 4621 (code=exited, status=1/FAILURE)
Jan 05 16:06:11 antonio- systemd[1]: grafana-server.service: Scheduled restart job, restart counter is at 5.
Jan 05 16:06:11 antonio- systemd[1]: Stopped Grafana instance.
Jan 05 16:06:11 antonio- systemd[1]: grafana-server.service: Start request repeated too quickly.
Jan 05 16:06:11 antonio- systemd[1]: grafana-server.service: Failed with result 'exit-code'.
Jan 05 16:06:11 antonio- systemd[1]: Failed to start Grafana instance.
thte only way I can get grafana to work in the desktop envionment is if I use and keep this open in the terminal:
$ sudo grafana-server -homepath /usr/share/grafana
Why has this happened and how can I use grafana without have to do this terminal step everytime?
thanks, I basically solved the problem by not solving the problem.
sudo apt-get purge grafana
sudo apt-get remove grafana
sudo apt-get remove --auto-remove grafana
then I deleted the config folder (contains the config file)
rm -R /etc/grafana/
then I reinstalled grafana
$ sudo apt-get install -y gnupg2 curl
$ curl https://packages.grafana.com/gpg.key | sudo apt-key add -
$ sudo add-apt-repository "deb https://packages.grafana.com/oss/deb stable main"
$ sudo apt-get update
$ sudo apt-get -y install grafana
$ sudo systemctl start grafana-server
Now its running as before, with default port 3000 on startup

Running MongoDB shell commands from within shell script connection refused

I have the following shell script which I am running in UserData section of a CloudFormation template:
#!/bin/sh
wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | apt-key add -
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-4.4.list
apt-get update
apt-get install -y mongodb-org
apt install mongodb-clients
systemctl start mongod
systemctl status mongod
systemctl enable mongod
echo "ABOUT TO ENTER WHILE LOOP"
while :
do
echo "waiting to RUN MONGO COMMANDS"
echo "$(systemctl show -p ActiveState --value mongod)"
if [ "$(systemctl show -p ActiveState --value mongod)" = "active" ]
then
echo "RUNNING MONGO COMMANDS"
mongo crawler --eval "db.websites.insertOne({ customerId: '1', url: 'https://dootli.com' })"
mongo crawler --eval "db.createUser({ user: 'username', pwd: 'password', roles: 'clusterAdmin' })"
break
fi
done
As far I can tell the script is valid, how I'm getting the this output (and error) when it is run during the initialization of the EC2 instance:
Reading package lists...
Building dependency tree...
Reading state information...
The following package was automatically installed and is no longer required:
mongodb-database-tools
Use 'apt autoremove' to remove it.
The following additional packages will be installed:
libboost-filesystem1.71.0 libboost-iostreams1.71.0
libboost-program-options1.71.0 libgoogle-perftools4 libpcrecpp0v5
libsnappy1v5 libtcmalloc-minimal4 libyaml-cpp0.6 mongo-tools
The following packages will be REMOVED:
mongodb-org mongodb-org-database-tools-extra mongodb-org-mongos
mongodb-org-server mongodb-org-shell mongodb-org-tools
The following NEW packages will be installed:
libboost-filesystem1.71.0 libboost-iostreams1.71.0
libboost-program-options1.71.0 libgoogle-perftools4 libpcrecpp0v5
libsnappy1v5 libtcmalloc-minimal4 libyaml-cpp0.6 mongo-tools mongodb-clients
0 upgraded, 10 newly installed, 6 to remove and 87 not upgraded.
Need to get 35.2 MB of archives.
After this operation, 44.4 MB disk space will be freed.
Do you want to continue? [Y/n] Abort.
● mongod.service - MongoDB Database Server
Loaded: loaded (/lib/systemd/system/mongod.service; disabled; vendor preset: enabled)
Active: active (running) since Sat 2021-02-06 20:38:12 UTC; 15ms ago
Docs: https://docs.mongodb.org/manual
Main PID: 2738 (mongod)
Memory: 288.0K
CGroup: /system.slice/mongod.service
└─2738 /usr/bin/mongod --config /etc/mongod.conf
Feb 06 20:38:12 ip-172-31-64-168 systemd[1]: Started MongoDB Database Server.
Created symlink /etc/systemd/system/multi-user.target.wants/mongod.service → /lib/systemd/system/mongod.service.
ABOUT TO ENTER WHILE LOOP
waiting to RUN MONGO COMMANDS
RUNNING MONGO COMMANDS
MongoDB shell version v4.4.3
connecting to: mongodb://127.0.0.1:27017/crawler?compressors=disabled&gssapiServiceName=mongodb
Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed: SocketException: Error connecting to 127.0.0.1:27017 :: caused by :: Connection refused :
connect#src/mongo/shell/mongo.js:374:17
#(connect):2:6
exception: connect failed
exiting with code 1
MongoDB shell version v4.4.3
connecting to: mongodb://127.0.0.1:27017/crawler?compressors=disabled&gssapiServiceName=mongodb
Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed: SocketException: Error connecting to 127.0.0.1:27017 :: caused by :: Connection refused :
connect#src/mongo/shell/mongo.js:374:17
#(connect):2:6
exception: connect failed
exiting with code 1
Cloud-init v. 20.3-2-g371b392c-0ubuntu1~20.04.1 running 'modules:final' at Sat, 06 Feb 2021 20:37:42 +0000. Up 27.35 seconds.
ci-info: no authorized SSH keys fingerprints found for user ubuntu.
Cloud-init v. 20.3-2-g371b392c-0ubuntu1~20.04.1 finished at Sat, 06 Feb 2021 20:38:12 +0000. Datasource DataSourceEc2Local. Up 56.97 seconds
I modified the code to work. I identified that the main issue is mongodb-clients which causes failures of monogdb. Also your command db.createUser is invalid and will lead to failure as well. I did not fix that, as its not related to your issue about connection refused. You can make new question why your db.createUser is incorrect (I don't know how to fix that, its mongodb specific).
#!/bin/sh
wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | apt-key add -
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-4.4.list
apt update
apt install -y mongodb-org
systemctl enable mongod
systemctl start mongod
echo "ABOUT TO ENTER WHILE LOOP"
while :
do
echo "waiting to RUN MONGO COMMANDS"
sleep 5
echo "$(systemctl show -p ActiveState --value mongod)"
if [ "$(systemctl show -p ActiveState --value mongod)" = "active" ]
then
echo "RUNNING MONGO COMMANDS"
mongo crawler --eval "db.websites.insertOne({ customerId: '1', url: 'https://dootli.com' })"
[ $? != 0 ] && continue
echo "db.websites.insertOne command successful"
break
fi
done

Upgrade to postgres96 on Alpine (/usr/bin/pg_dump: No such file or directory)

I'm trying to upgrade postgres locally so I don't get a version mismatch error. This is what i do:
echo "http://dl-5.alpinelinux.org/alpine/v3.5/main" >> /etc/apk/repositories;
apk update
bash-4.3# apk add postgresql-dev
(1/4) Installing libressl2.4-libtls (2.4.4-r0)
(2/4) Installing libressl-dev (2.4.4-r0)
(3/4) Installing postgresql-libs (9.6.5-r0)
(4/4) Installing postgresql-dev (9.6.5-r0)
Executing busybox-1.24.2-r13.trigger
OK: 353 MiB in 108 packages
bash-4.3# pg_dump
bash: /usr/bin/pg_dump: No such file or directory
I'm at a loss - any idea what the problem is please?
Just a guess but I guess you've not installed postgresql. In order to use the pg_dump you must have installed this, or if you do have it already and I'm wrong try reinstalling it like so:
bash-4.3# apk del postgresql
(1/4) Purging postgresql (9.6.5-r0)
(2/4) Purging postgresql-client (9.6.5-r0)
(3/4) Purging libedit (20170329.3.1-r2)
(4/4) Purging libxml2 (2.9.4-r4)
Executing busybox-1.26.2-r5.trigger
OK: 37 MiB in 25 packages
bash-4.3# apk add postgresql
(1/4) Installing libedit (20170329.3.1-r2)
(2/4) Installing postgresql-client (9.6.5-r0)
(3/4) Installing libxml2 (2.9.4-r4)
(4/4) Installing postgresql (9.6.5-r0)
Executing busybox-1.26.2-r5.trigger
OK: 53 MiB in 29 packages
bash-4.3# pg_dump
pg_dump: [archiver (db)] connection to database "root" failed: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
bash-4.3#
As you can see from above pg_dump is working because it is in the postgresql package even though as listed on alpine packages site it should be within the postgresql-client package as shown here but it doesn't work unless postgres is installed. If you can't have a full postgres installation, I recommend this workaround which is a bit unclean, install postgres, backup the pg_dump binary, uninstall postgres then restore pg_dump like so:
bash-4.3# apk add postgresql
(1/2) Installing libxml2 (2.9.4-r4)
(2/2) Installing postgresql (9.6.5-r0)
Executing busybox-1.26.2-r5.trigger
OK: 53 MiB in 29 packages
bash-4.3# cp /usr/bin/pg_dump /usr/bin/pg_dump
pg_dump pg_dumpall
bash-4.3# cp /usr/bin/pg_dump /usr/bin/pg_dump.back
bash-4.3# cp /usr/bin/pg_dumpall /usr/bin/pg_dumpall.back
bash-4.3# apk del postgresql
(1/2) Purging postgresql (9.6.5-r0)
(2/2) Purging libxml2 (2.9.4-r4)
Executing busybox-1.26.2-r5.trigger
OK: 38 MiB in 27 packages
bash-4.3# mv /usr/bin/pg_dump.back /usr/bin/pg_dump
bash-4.3# mv /usr/bin/pg_dumpall.back /usr/bin/pg_dumpall
bash-4.3# pg_dump
pg_dump: [archiver (db)] connection to database "root" failed: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
bash-4.3#
It is not ideal but it has worked for me in the past

minikube: could not find capabilities for domaintype=kvm

What are installed for minikube:
$ ls -al /usr/local/bin/
-rwxr-xr-x 1 root root 26406912 Jun 14 12:05 docker-machine
-rwxrwxr-x 1 me libvirtd 11889064 Jun 14 12:07 docker-machine-driver-kvm
-rwxrwxr-x 1 me me 70232912 Jun 14 11:58 kubectl
-rwxrwxr-x 1 me me 82512696 Jun 14 11:57 minikube
Trying to start cluster by minikube
$ minikube start --vm-driver=kvm
Starting local Kubernetes v1.6.4 cluster...
Starting VM...
E0614 12:07:39.515994 14655 start.go:127] Error starting host: Error creating host: Error creating machine: Error in driver during machine creation: virError(Code=8, Domain=44, Message='invalid argument: could not find capabilities for domaintype=kvm ').
Retrying.
E0614 12:07:39.517076 14655 start.go:133] Error starting host: Error creating host: Error creating machine: Error in driver during machine creation: virError(Code=8, Domain=44, Message='invalid argument: could not find capabilities for domaintype=kvm ')
I am new to kubernetes. Any idea how to fix it? Thanks
UPDATE
sudo /usr/sbin/kvm-ok
INFO: /dev/kvm does not exist
HINT: sudo modprobe kvm_intel
INFO: Your CPU supports KVM extensions
INFO: KVM (vmx) is disabled by your BIOS
HINT: Enter your BIOS setup and enable Virtualization Technology (VT),
and then hard poweroff/poweron your system
KVM acceleration can NOT be used
$ dmesg | grep kvm
[ 2.114855] kvm: disabled by bios
[ 2.327746] kvm: disabled by bios
[ 120.423249] kvm: disabled by bios
[ 222.250977] kvm: disabled by bios
My update is close to the solution. The solution is to enable virtualization in the BIOS.
1, Power on your PC and open the BIOS.
2, Go to the security section and enable virtualization.
you need to install the kvm package refer package.
https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#kvm-driver
# Install libvirt and qemu-kvm on your system, e.g.
# Debian/Ubuntu
$ sudo apt install libvirt-bin qemu-kvm
# Fedora/CentOS/RHEL
$ sudo yum install libvirt-daemon-kvm kvm
# Add yourself to the libvirtd group (use libvirt group for rpm based distros) so you don't need to sudo
# Debian/Ubuntu (NOTE: For Ubuntu 17.04 change the group to `libvirt`)
$ sudo usermod -a -G libvirtd $(whoami)
# Fedora/CentOS/RHEL
$ sudo usermod -a -G libvirt $(whoami)
# Update your current session for the group change to take effect
# Debian/Ubuntu (NOTE: For Ubuntu 17.04 change the group to `libvirt`)
$ newgrp libvirtd
# Fedora/CentOS/RHEL
$ newgrp libvirt