I'm using node-mysql2 and receiving this error message when connecting to a production instance of mysql via a wan:
Server requires auth switch, but no auth switch handler provided
This error is not received when connecting to our local dev server.
Furthmore, connecting to this mysql instance by other means works fine (mysql cli, Toad)
node-mysql2 version: mysql2#1.1.2 installed via npm.
This error was allegedly fixed back in Aug (RC9) https://github.com/sidorares/node-mysql2/pull/331
I'm not very familiar with mysql, Is there a server setting we can change to workaround this issue?
So it turns out this error also occurs with other libraries which give more meaningful error messages, e.g.: Authentication with old password no longer supported, use 4.1 style passwords
Solution from here: https://forums.mysql.com/read.php?38,593423,593423
SET SESSION old_passwords=0;
SET PASSWORD=PASSWORD('YOURDATABASEPASSWORD');
Related
I have a server running Ovirt Node that I'm trying to manage remotely using libvirt. I have an SSH keypair installed and can ssh user#server -i ssh-privkey successfully. When I try to connect to qemu+ssh//user#host/system?keyfile=ssh-privkey, I get this error:
authentication failed: Failed to start SASL negotiation: -4 (SASL(-4): no mechanism available: No worthy mechs found)
That led me down the path of getting TLS keys and certificates installed on the client and the server mostly according to these instructions (the configuration is slightly different because I have only one host and am using Terraform to manage the certificates*). However, I still get the same error. When I look at the output of libvirt --listen --verbose on the server when a connection failed, the only useful output is this:
error : virNetSocketReadWire:1792 : End of file while reading data: Input/output error
I have checked every firewall between the client and the server and they should all be wide open. What else could be the cause of this error?
* The goal is ultimately to use Terraform to provision libvirt resources, however I get the same errors trying to connect with virsh and virt-manager.
UPDATE: It's easier to connect just via SSH; this question exists because I couldn't figure out how to turn off SASL. It turns out SASL is enabled for SSH connections due to vdsm setting auth_unix_rw="sasl" in /etc/libvirt/libvirtd.conf. Removing that config means I can just use my SSH private key as I intended. The TLS configuration was a wild goose chase that was further hindered by vdsm changing the configured location of all the PKI files.
You're likely missing a RPM package on your client host. First on the virtualization host check /etc/sasl2/libvirt.conf and see what 'mech_list' setting is uncommented.
Back on your client you'll need to install a 'cyrus-sasl-XXXX' RPM that provides the same mechanism that the server is set to use. For a modern libvirt install it will probably be using 'cyrus-sasl-scram' for plain username/password auth, but for older installs, it might still be using 'cyrus-sasl-md5'
I am deploying my app on aws ec2 and while runing my app by node app.js it gives the above mentioned error and upon changing privileges following prompt occurs and nothing happens
You need to check whether your ec2 instance and the database server can ping each other.
I already have installed vernemq in my cloud server, everything seems running fine. But from any client, it is unable to connect the broker using username/password authentication. The authentication is based on MySQL, the Lua script is running fine. But strangely the authentication not working or something is wrong. I couldn't trace anything as nothing shows in Log. The only debug message I see is as follows:
[debug] <0.227.0>#plumtree_broadcast:schedule_lazy_tick:720 0ms mailbox traversal, schedule next lazy broadcast in 10000ms, the min interval is 10000ms
OS : Ubuntu 18.04
MySQL Version : 5.7.29
VerneMQ Version : 1.10
That debug log message is unrelated (it shows load information on the metadata exchange protocol).
Please make sure the password formats/hashing methods are compatible between VerneMQ and MySQL.
I am seasoned with Ubuntu, Apache and MySQL but new to the email server world and an looking for some troubleshooting tips with my server configuration.
I am running Ubuntu 14.04 with Postfix, Dovecot and MySQL as instructed in this tutorial: https://www.digitalocean.com/community/tutorials/how-to-configure-a-mail-server-using-postfix-dovecot-mysql-and-spamassassin
with the exception of spamassassin.
I then installed postfixadmin to provide a graphical means of configuring my virtual postfix users/domains.
Thereafter I installed Roundcube as instructed in this tutorial: http://www.unixmen.com/install-configure-roundcube-webmail-ubuntu/ with the exception of the version (I am using 1.1.4). Everything checks out; I can Telnet into my mail server with accounts created using postfixadmin and can verify the mailbox(es) exists. The server receives email from external domains and can send as well. However, when I attempt to login to a verified user account via-Roundcube it fails. I have tried and tried again to find what is missing and have hit a wall.
Any suggestions would be greatly appreciated.
Best Regards,
-Joe
To debug, I would double check that RC is configured correctly to communicate with dovecot: this is the piece of software that is going to handle the authentication. To verify the software settings, one could switch on the debugging of both RC and dovecot.
Check RC configuration files to make sure that it is set up to connect to the right server and port. These settings can be found either in 'config.inc.php' or in 'defaults.inc.php' under the 'config' directory of RC. Look for IMAP section and the following strings:
$config['default_host'] = 'tls://localhost';
$config['default_port'] = 143;
$config['imap_auth_type'] = null;
Pay special attention to the 'tls://' ('ssl://') prefixes -- these control the usage of encryption during negotiation with IMAP server (tls issues STARTTLS command while connecting on a standard port, and ssl expects connection to be encrypted from the very start and thus is generally used to connect to a dedicated 'encryped' port): for the purposes of debugging one might want to disable encryption altogether. I would propose to use the same hostname and port as were used for telnetting.
If these settings seem to be right, one can proceed to debugging of IMAP connection from RC to dovecot. To enable debugging, edit defaults.inc.php once again:
$config['debug_level'] = 1;
$config['log_driver'] = 'syslog';
$config['syslog_id'] = 'roundcube';
$config['syslog_facility'] = LOG_MAIL;
$config['log_logins'] = true;
$config['imap_debug'] = true;
This would direct debug information of RC IMAP negotiation with dovecot to /var/log/mail.log, where you most probably would be able to identify the problem.
I'm not able to establish a connection to my MySQL server.
This is the connection string:
jdbc:mysql://<my_IP_address>:1005/rs_pm
This is the line of code:
var conn = Jdbc.getConnection(connString, mysql_user, mysql_pass);
I've been able to write a native Java program using JDBC and it connects just fine using the same connection string/username/password. (Yes, I know the port is non-standard but that's how I have it configured and it works with the native Java app).
The weird thing is, I'm looking at my router logs and when I try to connect with a native Java app I can see the traffic coming in. But when I run the script in G Apps I don't see any packets being received by Google IP addresses.
Is it just me? Is there a problem somewhere?
Thanks in advance.
Update So it appears that if I use the standard mysql port (3306), the connection works fine. It seems as though something in Google Apps won't try an outbound connection on the port I had specified (1005), or any other ports I tried. Perhaps the jdbc connector they use only supports port 3306? I will file a bug since this behavior isn't documented anywhere.
JDBC connection to a database server only supported to ports 1025 and higher.