I am trying to establishing a connection to jdbc:mysql://mysqldb:3306/zomato but it is not working.
I tried 2 differents approach:
at first, I did not want to use Strigo so I was not limited to the 8 hours. So I run my engines in containers within my local machine. The engines are running fine on the Control Hub and I can create and run some pipelines. However, I would like to use the connection cited in one of the lab with mysqldb and zomato. I am not sure how to “install” the zomato db and reviews table locally? I have a container running mysql but from there i dont know what to.
If i try to create the connection using my local engine, i get then the below error.
JDBC_00 - Cannot connect to specified database: com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
I could see a post with the same error message but it does not give the solution on how to get the zomato db and reviews table installed locally?
then I tried to create my engines in Strigo, even if it s not what I would like as an environment. When I then create a connection using the Strigo engine i get the below error message
Please note that i uploaded the mysql jar file as external source for all my engines.
Can you please help?
thank you
Page 1 / 1
Hi Russ,
I am not sure why it was showing me an empty file even in the Strigo environment before, but now everything is good. I redid everything, and successfully transferred all the databases into my local container.
Thanks for the instructions
Hello Melanie,
I created the following instructions to install the ‘zomato’ and all the other databases:
onto a new mysql container I create on my MAC M1.
Install mysqldb as a container locally on my pc:
% docker pull arm64v8/mysql
create a mysql account for root/StreamTra1ningSets! in the mysqldb container on my pc:
% docker run --name mysqldb -e MYSQL_ROOT_PASSWORD=StreamTra1ningSets! -d arm64v8/mysql:latest
Differences between user-defined bridges and the default bridge
User-defined bridges provide automatic DNS resolution between containers.
Containers on the default bridge network can only access each other by IP addresses, unless you use the --link option, which is considered legacy. On a user-defined bridge network, containers can resolve each other by name or alias.
so I reckon I’d have to use the ip address 172.18.0.2 rather than mysqldb (in your JDBC connection) although I’ve not tried that.
@Russ Webb thanks, how do i get onto the 4.x environment? I connected again to Strigo but i can see the sql file is still containing the 3.x databases. ty
Hi Atousa,
Sounds like you need to redo from step 3 onwards in the procedure.
Check the size of the /tmp/alldatabases.sql directly after step 3.
ls -altr /tmp/alldatabases.sql
Let me know the output of what exactly happens as you redo it.
Russ.
Hi;
I tried all the steps above to get the databases inside the mysqldb container from Strigo environment to a container in my machine. Here, is the result I got at the end
As, you can see the Zomato database that I need is not present. In order to understand what is wrong, after doing the steps 3 and 4 I checked the size of alldatabases.sql and it looks like it is empty in the strigo environment. I also tried to get into the mysqldb container in the Strigo environment, but I got access denied. I am in the 4x environment. Can you help me find out the problem?
@Russ Webb my 2 sdc containers and my sqldb container was all in the network bridge so I thought it would be the same than creating another network.
But I did it anyway as you mentioned, now they are all 3 in another network and my SQL connection works! I don’t understand what is different between the bridge network and the melanie network since when I inpected the brigde one, i could see the 3 of them. But in any case, now it finally works yeahhh!!
Thank you very much for all your help and responsiveness!
Great!
So your Data collector container needs to be able to talk to your mysqldb container (and other containers.)
I created my own cluster called ‘cluster’ and added my containers to it.
This should add two containers, your sdc and your mysqldb to the cluster called ‘melanie’.
PS: engines and sqldb containers are all on the network called bridge
@Russ Webb great thank you! I now have the zomato db locally in my container :)
I m on step 10 where you ask to check the container networks.
Personally i do not see any additional network on my side
So I did not execute the step 10 and 11.
In any case I tried adding the connection to Control Hub, selecting my local engine, and it is still failing with the same message.
@Melanie
The same issue has been raised before and it has been resolved with the correct configuration.
Kindly refer the discussion in the below link and do the necessary setup correctly to fix your issues
Thanks & Regards
Bikram_
if you are “Melanie Monnereau” then you are currently registered for a legacy strigo environment (i.e. 3.x).
Which is where these databases are found.
You need to be on the 4.x strigo env. for the zomato db etc.
I have registered you on a 4.x environment.
@Russ Webb we are def getting there haha. I gave permissions to my folder and indeed that was the issue.
I believe now we have a more problematic issue, the zomato db does not seem to exist … so i wont be able to do the labs for the certifications. See below all the dbs included . It looks very differently to yours any idea how i can get the zomato db?
are you issuing the scp from your home directory (such that you have permissions to put files in there)? or from just /home. ?
ensure you can create a file in the folder you’re issuing the scp command by typing:
touch myFile
to see if you get a permissions problem.
send me the output of:
ls -ld .
@Russ Webb
there is nothing in the tmp folder on Strigo (My mistake i was doing the steps initally locally on my pc)
I redid step 3 and 4 on Strigo and now i can see the sql file in /tmp :)
So now i resumed from step 5 onwards. Even with the ssh key added, i get a permission denied.
locally i did
Then I copy the whole content of my local file /home/melm/.ssh/id_rsa.pub and copy it into strigo. You can see it highlighted in red
Finally i run on my pc the below cmd which is denied due to permissions :(
ok, first thing:
check in your strigo mysqldb container in /tmp to see if the alldatabases.sql file is there.
If not, redo step 3
Then redo step 4.
Then outside your container on strigo (‘exit’ the container), check to see if the file is in your /tmp folder on strigo.
This is what step 4 did. Sounds like you need to get step 3 and 4 to work to make sure /tmp/alldatabases.sql exists in your main strigo environment.
Let me know how you get on.
@Russ Webb Thank you for your message, it is very detailed and i would never have known how to do all of it
I am currently blocked at step 6 : scp ubuntu@<public ip - get from ‘machine info’ on strigo env - cog icon>:/tmp/alldatabases.sql .
Indeed I run the cmd with the public ip of my strigo env and I get the below error msg:
scp ubuntu@54.71.34.231:/tmp/alldatabases.sql . The authenticity of host '54.71.34.231 (54.71.34.231)' can't be established. ECDSA key fingerprint is SHA256:DA5oGdh5kfOtDURWzjP0ziFrtKWpdZ25NFHcugTPD3s. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '54.71.34.231' (ECDSA) to the list of known hosts. scp: /tmp/alldatabases.sql: No such file or directory
Below is what i have in the /tmp folder of Strigo, so no sql file there.
I also searched for a filename containing database but does not think the alldatabase.sql file is there
Did the academy change the path of the sql file? Did you run the above steps recently in your environment?
Thank you!
@Melanie
The same issue has been raised before and it has been resolved with the correct configuration.
Kindly refer the discussion in the below link and do the necessary setup correctly to fix your issues
Thanks & Regards
Bikram_
Hi Bikram
It is not at all the same error msg so does not solve my issue,
Also as mentioned in my previous message, I could see a post with the same error message but it does not give the solution on how to get the zomato db and reviews table installed locally?