linkedin / linkedin/dr-elephant

database connection issue

Open
#701 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
1.4k
Forks
839
PR merge metrics
No merged PRs in 30d

Description

I had issues with latest node version when trying to compile, so I have installed version 10.

node -v
v10.23.0

mysql -V
mysql Ver 14.14 Distrib 5.5.62, for Linux (x86_64) using readline 5.1

mysql> CREATE USER 'elephant1'@'localhost';
Query OK, 0 rows affected (0.00 sec)

mysql> CREATE DATABASE drelephant;
Query OK, 1 row affected (0.00 sec)

had this issue while compiling.
[error] Failed: Total 474, Failed 2, Errors 0, Passed 471, Skipped 1
[error] Failed tests:
[error] com.linkedin.drelephant.tuning.PSOParamGeneratorTest
[error] (test:test) sbt.TestsFailedException: Tests unsuccessful
[error] Total time: 33 s, completed Nov 17, 2020 2:55:23 PM
Build failed...

Fixed it by updating the file from https://github.com/linkedin/dr-elephant/pull/343/commits/ed0ca0a8fd364849bab7e8460390ccfc18c78cc3#diff-6388ffd322d15e41854f11f345d3b7a2088a390b4cdc2b38093519a3f75b8634

Bug fix: Auto tuning disable model unit test failure #343

found the file here
./test/com/linkedin/drelephant/tuning/PSOParamGeneratorTest.java

pwd
/home/hadoop/dr-elephant-master/target/universal/dr-elephant-2.1.7/bin
ls
dr-elephant dr-elephant.bak dr-elephant.bat start.sh stop.sh

sh bin/start.sh /home/hadoop/dr-elephant-master/target/universal/dr-elephant-2.1.7/app-conf
Scripts directory: /home/hadoop/dr-elephant-master/target/universal/dr-elephant-2.1.7/scripts
Using config dir: /home/hadoop/dr-elephant-master/target/universal/dr-elephant-2.1.7/app-conf
Using config file: /home/hadoop/dr-elephant-master/target/universal/dr-elephant-2.1.7/app-conf/elephant.conf
Reading from config file...
db_url: localhost
db_name: drelephant
db_user: elephant1
http port: 8989
This is hadoop2.x grid. Adding Java library to path: /usr/lib/hadoop/lib/native
Starting Dr. Elephant ....
error: Failed to start Dr. Elephant. Please check if this is a valid dr.E executable or logs under 'logs' directory.
[hadoop@ip-10-152-37-109 dr-elephant-2.1.7]$

got error from dr.log
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
[error] c.j.b.h.AbstractConnectionHook - Failed to obtain initial connection Sleeping for 0ms and trying again. Attempts left: 0. Exception: java.net.ConnectException: Connection refused (Connect
ion refused).Message: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.
Oops, cannot start the server.
Configuration error: Configuration error[Cannot connect to database [default]]

I hope someone can guide me here.

I have tried to change the file /project/Dependencies.scala. even after changing the connector version to 8.0.11 I still have issue connecting to database.

Disabling bind address variable #bind-address in my.cnf fixed the issue.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with test/com/linkedin/drelephant/tuning/PSOParamGeneratorTest.java and the reported failed test output, then inspect the database settings in app-conf/elephant.conf and the dr.log connection error. Reproduce the build and startup with the listed Node, MySQL, and Hadoop environment details. Done means the tests pass and Dr. Elephant starts without the database connection error.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, mysql, node.js
Domain
backend, databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.