Appfog mysql tunnel error - Encryption not available on this event-machine - mysql

We've established a connection to appfog using caldecott and af tunnel command. We try to connect to a mysql service to load and execute a big .sql file to populate the db.
We tried it from 3 different machines Ubuntu on VirtualBox, Feora 18 on VirtualBox and native Ubuntu. We also tried it on another account, but we keep getting this error:
Launching 'mysql --protocol=TCP --host=localhost --port=10000 --user=uZVQhGhbYEzyb --password=pNu1l6xbXVhbj d39d6d0e6344b41a4aaeada16dfca2a46'
terminate called after throwing an instance of 'std::runtime_error'
what(): Encryption not available on this event-machine
ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 0
Aborted (core dumped)

Thanks to appfog customer support I managed to solve this problem. My distro lacked an ssl provider.
To solve this on fedora
yum install openssl openssl-devel
gem uninstall eventmachine
gem install eventmachine
However I still had a problem with executing big sql scripts. Does anyone know a neat solution to this issue?

For a Windows system, I got it to run by doing the following:
Install Win32 OpenSSL v1.0.1e Light from here
Install Visual C++ 2008 Redistributables from the same link if not already installed.
Re-install eventmachine in Ruby with the newly installed open-ssl.
gem install eventmachine -- --with-ssl-dir=C:\OpenSSL-Win32
(you might need C:\OpenSSL-Win32\bin)
After the installation is complete, you're ready to tunnel to any service! (In my case postgresql)

Related

Why is the connection to microsoft sql stopped working?

I have a service which connects with Ms Sql. The connection is running successfully from local system. But after deployment throws following error.
Could not obtain connection to query metadata : The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "The server selected protocol version TLS10 is not accepted by client preferences [TLS13, TLS12]
The only change that was done in Dockerfile was last 3 lines:
FROM openjdk:11-jre-slim
COPY /target/app-exec.jar /app-exec.jar
RUN apt-get update && apt-get -y install wget
RUN apt-get install curl -y
RUN wget -O dd-java-agent.jar https://dtdg.co/latest-java-tracer
Even after reverting changes I am getting same error.
Could you please help me with this issue?
Recently TLS 1.0/1.1 is not enabled by default in the upcoming versions of OpenJDK updates (since April 20)
Quick solution for me was to downgrade version to following:
FROM openjdk:11.0.6-jre-slim

MySQL enable Windows event logging

I have MySQL Server 8.0.21 installed on my Windows 10 machine. I want to enable Windows event logging so that I can see the errors in Windows Event Viewer instead of a txt log file. I am using the documentation from here: https://dev.mysql.com/doc/refman/8.0/en/error-log-configuration.html
INSTALL COMPONENT 'file://component_log_sink_syseventlog';
SET GLOBAL log_error_services = 'log_filter_internal; log_sink_syseventlog';
However, when I try to execute:
mysql> INSTALL COMPONENT 'file://component_log_sink_syseventlog';
It gives me the error:
ERROR 3536 (HY000): Initialization method provided by component 'mysql:log_sink_syseventlog' failed.
The same from mysql.exe in CMD, the same from MySQL Workbench. In both cases I connect with the root user which has all possible privileges.
I also installed MySQL Server 8.0.12 on a Windows 7 machine and the same problem.
MySQL Server is installed as a Windows service.
Did anyone manage to enable logging to event log in Windows for MySQL ? Thank you.
I was experiencing the same issue. I was able to install other components but component_log_sink_syseventlog kept failing on MySQL 8.0.21. My issue was resolved by updating to 8.0.22 which makes me think it was just broken. I experienced this issue on Windows 10 and Windows Server 2016 and updating fixed it on both platforms.

How do I install Mysql with Macports

I am trying to connect a QT app to an SQL database, however keep getting an error with the qmysql driver not loading. Having spent a week now trying all possible solutions, the final solution was to try and install mysql using macports.
I am using a mac with OS Catalina.
I have installed MacPorts using the recommended pkg file.
I have confirmed installation using 'port version' with the following response 'Version: 2.6.2'
As per the instructions on the macports website I try to install using the following command:
$ sudo port install mysql8-server
I get the following error:
Error: Port mysql8-server not found
I have tried other ports listed on the macports website for mysql and all return the same error. Would greatly appreciate if anyone can point out where I might be going wrong and how to fix this issue.
Thanks in advance
For anyone who experiences this problem, following installation run a self update and refresh all of the ports. For some reason on a new install the ports are not updated.

Laragon MySQL ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061 "Unknown Error")

I'm using http://laragon.org for my server
I got a problem yesterday my apps cannot connect to mysql and give me this error message
ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost'
(10061 "Unknown Error").
and I tried to run mysql -v but got same error. I'm using :
OS Windows 10 64bit
Laragon v0.7
No antivirus running
No others server running (this is the only server in the pc)
I'm searching everywhere but the answer is to start MySQL service, but I don't find any MySQL service in services.msc (I read on their site if Laragon won't add anything to the System Path Variable.
But, you are freely to use composer, artisan, mysql, mysqldump, httpd, redis-cli, ... in Laragon' shell)
and in their control panel status MySQL 10.0.20 started.. i tried to restart all service and pc but still got the problem
anyone know how to fix this problem ?
UPDATE : mysql -V is working, just need to uppercase -v, but still cannot connect to my MySQL Database
You're running a very old version of Laragon.
Try installing Laragon 0.9 151004, I believe it helps.
From the website, it appears that:
No Windows Services
Laragon manage other servers by its own optimal service manager.
This provides a reason as to why you couldn't find MySQL service in services.msc. Can you check the interface itself (if you can not find the laragon service itself in services.msc) and check whether MySQL service is running or not?
Additionally, look into laragon's installation directory for a logs file. Close and restart laragon if everything fails.

Chef server error on create user (/etc/opscode/pivotal.rb does not exist)

I am extremely new to chef and I am attempting to create a chef server running on a Digital Ocean Ubuntu 14.04 droplet. I am using this guide for the install. I download the .deb and installed it fine. I then run chef-server-ctl reconfigure which runs without an issue. When I go to create my user I enter in all the details and run it, it then waits a few seconds and returns the error ERROR: CONFIGURATION ERROR:Specified config file /etc/opscode/pivotal.rb does not exist
I have scoured the internet to try and find a fix but haven't been able to find a thing. I have also tried doing these exact steps on a VPS running Ubuntu 12.04.5 and getting identical results.
For /etc/opscode/pivotal.pem is missing error use following command.
cp /opt/opscode/embedded/service/omnibus-ctl/spec/fixtures/pivotal.pem /etc/opscode/
Ran into the same thing when trying to install chef in an VM.
Expanding the memory (from 512Mb to 1512Mb) and reran reconfigure solved it for me.
Same problem here. An older version, for example 12.03 of chef-server works for me with Ubuntu 14.04
I got this error because my /etc/opscode/chef-server.rb had a syntax error.
The syntax error was displayed earlier in the logs, however my install script has kept going, causing later on this error.
More than likely, you have forgotten to run chef-server-ctl reconfigure. It's ambiguous naming of the command as it's reconfigure, however the installation guide for Chef Server actually states to run it after installing the package.
Why it's not part of the installation process is beyond me.
I had this problem as well. I exited my ssh session to the node I was configuring. I connected again and ran chef-server-ctl reconfigure again. I was able to then create a user without the error. I was using chef-server-core_12.1.0-1_amd64.deb for my install.
I got the same error with Ubuntu trusty 14.04 64 bit
/etc/opscode/pivotal.rb does not exist. I followed what Matthias Said and destroyed my VM ( I'm using Vagrant), then I quickly set up the VM and installed Chef server 12.03. I can now set up users correctly.
Just an FYI I also tried to install the latest version of chef which is 12.2.0 and do this but I also ran into the same error when trying to provision a user account.
Downgrading to 12.03 solved it for me.
I run in the same issue on CentOS 7 and Chef Infra Server 12.19.31; the following steps helped me to get the root cause of the problem.
Re-run the chef-server-ctl reconfigure and check if it gives any error at the end of the run
In my case, I received the error
Chef Client failed. 0 resources updated in 02 minutes 19 seconds
Check the stack trace / output log on
/var/opt/opscode/local-mode-cache/chef-stacktrace.out
I received
Errno::ENOMEM: Cannot allocate memory - ls -1 /opt/opscode/embedded/service/oc_id/db/migrate | tail -n 1 | sed -e "s/_.*//g"
To solve the problem, I upgraded the system with higher memory.
TL;DR;
Rerun the chef-server-ctl reconfigure to get the error
Upgrade the allocated memory to solve the issue
Me too got this error while installing chef infra server pkg in centos 8.
"ERROR: CONFIGURATION ERROR: Specified config file /etc/opscode/pivotal.rb does not exist"
Post Memory up-gradation I re-run below cmd its fixed issue:
sudo chef-server-ctl reconfigure