Mobius icon indicating copy to clipboard operation
Mobius copied to clipboard

Error : db.connect No connection after running " node mobius.js "

Open ajiteguh opened this issue 4 years ago • 18 comments

Hello,

I found issue when following guidance of Mobius installation. After running "node mobius.js" i got these errors :

C:\Installer App\Mobius-master>node mobius.js Production Mode Garbage collection is not exposed sgn_mqtt_client is connected [db.connect] No Connection ^C C:\Installer App\Mobius-master>

Please share your advice and suggestions.

Thank you

ajiteguh avatar Apr 02 '20 07:04 ajiteguh

I am having the same problem.

Production Mode Garbage collection is not exposed [db.connect] No Connection

topkim993 avatar Apr 04 '20 01:04 topkim993

I am having the same problem.

Production Mode Garbage collection is not exposed [db.connect] No Connection

There is no clear and detail guidance about this Mobius Installation.

ajiteguh avatar Apr 04 '20 19:04 ajiteguh

Hi,

I'm having the same problem. does anyone have any information about it?

MarcoSapienza avatar Apr 05 '20 13:04 MarcoSapienza

Hi all,

I have resolved the problem.

The problem is related to the mysql authentication method for root user.

You should to change the method from auth_socket to mysql_native_password

MarcoSapienza avatar Apr 05 '20 14:04 MarcoSapienza

Hi all,

I have resolved the problem.

The problem is related to the mysql authentication method for root user.

You should to change the method from auth_socket to mysql_native_password

I entered the port and password correctly in the conf.js file. Are you talking about settings other than it?

topkim993 avatar Apr 05 '20 14:04 topkim993

Yes, I am referring to the mysql configuration

Following this link you should be able to change the authentication configuration associated with the root user https://vitux.com/how-to-install-and-configure-mysql-in-ubuntu-18-04-lts/

Read from Step 3: Change the authentication method for root

Alternatively, I can post the mysql commands

MarcoSapienza avatar Apr 05 '20 14:04 MarcoSapienza

Yes, I am referring to the mysql configuration

Following this link you should be able to change the authentication configuration associated with the root user https://vitux.com/how-to-install-and-configure-mysql-in-ubuntu-18-04-lts/

Read from Step 3: Change the authentication method for root

Alternatively, I can post the mysql commands

Thank you for answer.

  1. After checking the settings, the root plugin is already set to native_password.

스크린샷 2020-04-06 오전 12 15 35

topkim993 avatar Apr 05 '20 15:04 topkim993

Yes, I am referring to the mysql configuration Following this link you should be able to change the authentication configuration associated with the root user https://vitux.com/how-to-install-and-configure-mysql-in-ubuntu-18-04-lts/ Read from Step 3: Change the authentication method for root Alternatively, I can post the mysql commands

Thank you for answer.

  1. After checking the settings, the root plugin is already set to native_password.

스크린샷 2020-04-06 오전 12 15 35

Hi @topkim993 , are you able to insert a console.log(err) in method getConnection, after row 80 (db_action.js file) ?

Maybe your error is different from mine

MarcoSapienza avatar Apr 05 '20 20:04 MarcoSapienza

Yes, I am referring to the mysql configuration Following this link you should be able to change the authentication configuration associated with the root user https://vitux.com/how-to-install-and-configure-mysql-in-ubuntu-18-04-lts/ Read from Step 3: Change the authentication method for root Alternatively, I can post the mysql commands

Thank you for answer.

  1. After checking the settings, the root plugin is already set to native_password.

스크린샷 2020-04-06 오전 12 15 35

Hi @topkim993 , are you able to insert a console.log(err) in method getConnection, after row 80 (db_action.js file) ?

Maybe your error is different from mine

The log has been checked as below.

getConnection error is Error: ER_BAD_DB_ERROR: Unknown database 'mobiusdb'

I had the schema set to modiusdb.

Thanks to that I fixed that error. Thank you.

topkim993 avatar Apr 06 '20 13:04 topkim993

Yes, I am referring to the mysql configuration Following this link you should be able to change the authentication configuration associated with the root user https://vitux.com/how-to-install-and-configure-mysql-in-ubuntu-18-04-lts/ Read from Step 3: Change the authentication method for root Alternatively, I can post the mysql commands

Thank you for answer.

  1. After checking the settings, the root plugin is already set to native_password.

스크린샷 2020-04-06 오전 12 15 35

Hi @topkim993 , are you able to insert a console.log(err) in method getConnection, after row 80 (db_action.js file) ?

Maybe your error is different from mine

Hi @MarcoSapienza Thanks for your insights. I already changed root plugin into mysql_native_password. But still I'm having the same error which is [db.connect] No Connection.

Could you explain how to "insert a console.log(err) in method getConnection, after row 80 (db_action.js file)" ?

thanks before

ajiteguh avatar Apr 06 '20 16:04 ajiteguh

Yes, I am referring to the mysql configuration Following this link you should be able to change the authentication configuration associated with the root user https://vitux.com/how-to-install-and-configure-mysql-in-ubuntu-18-04-lts/ Read from Step 3: Change the authentication method for root Alternatively, I can post the mysql commands

Thank you for answer.

  1. After checking the settings, the root plugin is already set to native_password.

스크린샷 2020-04-06 오전 12 15 35

Hi @topkim993 , are you able to insert a console.log(err) in method getConnection, after row 80 (db_action.js file) ? Maybe your error is different from mine

Hi @MarcoSapienza Thanks for your insights. I already changed root plugin into mysql_native_password. But still I'm having the same error which is [db.connect] No Connection.

Could you explain how to "insert a console.log(err) in method getConnection, after row 80 (db_action.js file)" ?

thanks before

Hi @neo-electro , sorry for the delay in answering you.

Are you using a linux or windows environment?

MarcoSapienza avatar Apr 08 '20 08:04 MarcoSapienza

Yes, I am referring to the mysql configuration Following this link you should be able to change the authentication configuration associated with the root user https://vitux.com/how-to-install-and-configure-mysql-in-ubuntu-18-04-lts/ Read from Step 3: Change the authentication method for root Alternatively, I can post the mysql commands

Thank you for answer.

  1. After checking the settings, the root plugin is already set to native_password.

스크린샷 2020-04-06 오전 12 15 35

Hi @topkim993 , are you able to insert a console.log(err) in method getConnection, after row 80 (db_action.js file) ? Maybe your error is different from mine

Hi @MarcoSapienza Thanks for your insights. I already changed root plugin into mysql_native_password. But still I'm having the same error which is [db.connect] No Connection. Could you explain how to "insert a console.log(err) in method getConnection, after row 80 (db_action.js file)" ? thanks before

Hi @neo-electro , sorry for the delay in answering you.

Are you using a linux or windows environment?

hello I'm having the same problem and i'm using window environment Can you give me some advice?

jimin755 avatar Apr 09 '20 11:04 jimin755

Yes, I am referring to the mysql configuration Following this link you should be able to change the authentication configuration associated with the root user https://vitux.com/how-to-install-and-configure-mysql-in-ubuntu-18-04-lts/ Read from Step 3: Change the authentication method for root Alternatively, I can post the mysql commands

Thank you for answer.

  1. After checking the settings, the root plugin is already set to native_password.

스크린샷 2020-04-06 오전 12 15 35

Hi @topkim993 , are you able to insert a console.log(err) in method getConnection, after row 80 (db_action.js file) ? Maybe your error is different from mine

Hi @MarcoSapienza Thanks for your insights. I already changed root plugin into mysql_native_password. But still I'm having the same error which is [db.connect] No Connection. Could you explain how to "insert a console.log(err) in method getConnection, after row 80 (db_action.js file)" ? thanks before

Hi @neo-electro , sorry for the delay in answering you. Are you using a linux or windows environment?

hello I'm having the same problem and i'm using window environment Can you give me some advice?

Did you create a database? name is >>> mobiusdb

devvace avatar Apr 10 '20 00:04 devvace

Yes, I am referring to the mysql configuration Following this link you should be able to change the authentication configuration associated with the root user https://vitux.com/how-to-install-and-configure-mysql-in-ubuntu-18-04-lts/ Read from Step 3: Change the authentication method for root Alternatively, I can post the mysql commands

Thank you for answer.

  1. After checking the settings, the root plugin is already set to native_password.

스크린샷 2020-04-06 오전 12 15 35

Hi @topkim993 , are you able to insert a console.log(err) in method getConnection, after row 80 (db_action.js file) ? Maybe your error is different from mine

Hi @MarcoSapienza Thanks for your insights. I already changed root plugin into mysql_native_password. But still I'm having the same error which is [db.connect] No Connection. Could you explain how to "insert a console.log(err) in method getConnection, after row 80 (db_action.js file)" ? thanks before

Hi @neo-electro , sorry for the delay in answering you.

Are you using a linux or windows environment?

Hello Marco, I'm using Windows Environment.

ajiteguh avatar Apr 10 '20 11:04 ajiteguh

Yes, I am referring to the mysql configuration Following this link you should be able to change the authentication configuration associated with the root user https://vitux.com/how-to-install-and-configure-mysql-in-ubuntu-18-04-lts/ Read from Step 3: Change the authentication method for root Alternatively, I can post the mysql commands

Thank you for answer.

  1. After checking the settings, the root plugin is already set to native_password.

스크린샷 2020-04-06 오전 12 15 35

Hi @topkim993 , are you able to insert a console.log(err) in method getConnection, after row 80 (db_action.js file) ? Maybe your error is different from mine

Hi @MarcoSapienza Thanks for your insights. I already changed root plugin into mysql_native_password. But still I'm having the same error which is [db.connect] No Connection. Could you explain how to "insert a console.log(err) in method getConnection, after row 80 (db_action.js file)" ? thanks before

Hi @neo-electro , sorry for the delay in answering you. Are you using a linux or windows environment?

Hello Marco, I'm using Windows Environment.

Hi @neo-electro , below the steps:

1 - Go to the root folder, go to mobius/db_action.js

2 - Open db_action.js with a text editor

3 - Put the instruction console.log(err) after row 80

4 - Then restart mobius server

If everything is correct you should to see the error in your terminal

MarcoSapienza avatar Apr 13 '20 15:04 MarcoSapienza

Yes, I am referring to the mysql configuration Following this link you should be able to change the authentication configuration associated with the root user https://vitux.com/how-to-install-and-configure-mysql-in-ubuntu-18-04-lts/ Read from Step 3: Change the authentication method for root Alternatively, I can post the mysql commands

Thank you for answer.

  1. After checking the settings, the root plugin is already set to native_password.

스크린샷 2020-04-06 오전 12 15 35

Hi @topkim993 , are you able to insert a console.log(err) in method getConnection, after row 80 (db_action.js file) ? Maybe your error is different from mine

Hi @MarcoSapienza Thanks for your insights. I already changed root plugin into mysql_native_password. But still I'm having the same error which is [db.connect] No Connection. Could you explain how to "insert a console.log(err) in method getConnection, after row 80 (db_action.js file)" ? thanks before

Hi @neo-electro , sorry for the delay in answering you. Are you using a linux or windows environment?

hello I'm having the same problem and i'm using window environment Can you give me some advice?

Did you create a database? name is >>> mobiusdb

Hi @DAEWOONPARK , I have created mobiusdb database.

However, I have already resolved the problem

MarcoSapienza avatar Apr 14 '20 12:04 MarcoSapienza

In my case, I set up a checklist to check which part is causing the error.

Checking with the file in mobius-2.4.36/app.js at line 117

스크린샷 2022-01-16 오후 3 50 44

I found the error was something with ConnectionPool

스크린샷 2022-01-16 오후 3 51 25

Seemed the connection was not being created at all

Checklist

  • [ ] Check if the MySQL is running, in this repo, the basic code runs at localhost:3306
  • [ ] If you are using macOS and using homebrew, don't be confused you might be using both daemon and MySQL simultaneously
  • [ ] Check if the root's plugin is set to caching_sha2_password, update to mysql_native_password
  • [ ] Lastly, check the conf.json file if it is updated properly

seunghwanly avatar Jan 16 '22 06:01 seunghwanly

I was also having the same issue. Solved it by uninstalling mySQL and reinstalling the 8.0.22 versions as mentioned in the video.

yalrnr avatar Jun 18 '23 10:06 yalrnr