IoTKETI / Mobius

oneM2M IoT Server Platform
http://developers.iotocean.org/archives/module/mobius
BSD 3-Clause "New" or "Revised" License
134 stars 87 forks source link

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

Open ajiteguh opened 4 years ago

ajiteguh commented 4 years ago

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_mqttclient is connected [db.connect] No Connection ^C C:\Installer App\Mobius-master>

Please share your advice and suggestions.

Thank you

topkim993 commented 4 years ago

I am having the same problem.

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

ajiteguh commented 4 years ago

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.

MarcoSapienza commented 4 years ago

Hi,

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

MarcoSapienza commented 4 years ago

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

topkim993 commented 4 years ago

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?

MarcoSapienza commented 4 years ago

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

topkim993 commented 4 years ago

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

MarcoSapienza commented 4 years ago

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

topkim993 commented 4 years ago

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.

ajiteguh commented 4 years ago

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

MarcoSapienza commented 4 years ago

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?

jimin755 commented 4 years ago

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?

devvace commented 4 years ago

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

ajiteguh commented 4 years ago

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.

MarcoSapienza commented 4 years ago

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 commented 4 years ago

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

seunghwanly commented 2 years ago

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

yalrnr commented 1 year ago

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