Picture of Javier Tejera
Error with Database Connection
by Javier Tejera - Monday, 20 November 2017, 6:31 PM
 

Hi everybody,

It is my first post here and I would like to express my gratitude for this amazing open-source authoring tool! This is great :)

Just installed it yesterday for first time and I have been playing around with it - it is fantastic! The problem is that today I tried to access to the localhost:5000 and the next message is appearing:

info: [20 Nov 2017 18:21:21 +00:00] - local
info: [20 Nov 2017 18:21:21 +00:00] Adapt authoring tool 0.4.0.
info: [20 Nov 2017 18:21:21 +00:00] Adapt framework 3.0.0.
info: [20 Nov 2017 18:21:22 +00:00] Connection established: adapt-tenant-master
error: [20 Nov 2017 18:21:22 +00:00] MongoError: connect ECONNREFUSED 127.0.0.1:27017
error: [20 Nov 2017 18:21:22 +00:00] Database Connection failed, please check your database

Yesterday was working perfectly, no idea what is happening today. Well, I am not a developer... Any suggestion? 
Thanks in advanced :)

Picture of Javier Tejera
Re: Error with Database Connection
by Javier Tejera - Monday, 20 November 2017, 11:09 PM
 

OK, so what I did was remove all the files and reinstall everything from scratch. After that, I could open Adapt again.

The problem is when restarting the computer I can't open it anymore. I have the same error again :s

What could be happening? I appreciate your help!

Picture of Tom Taylor
Re: Error with Database Connection
by Tom Taylor - Monday, 20 November 2017, 11:14 PM
 

Hi Javier,

The problem is likely that you need to restart your MongoDB -- usually done simply by running mongod in a terminal.

Picture of Javier Tejera
Re: Error with Database Connection
by Javier Tejera - Tuesday, 21 November 2017, 5:50 PM
 

Easy! Thanks very much :) Is working perfectly now!

Picture of John Niezen
Re: Error with Database Connection
by John Niezen - Tuesday, 21 November 2017, 7:52 AM
 

Hi Javier,

Yes that is your issue, when you restart the machine all processes you did in the install part need to restart, on given your error, it means the connection to Mongo is not active.

You can write a little batch or cron file (depending on your OS) where this is done when the machine starts. I have a private install on Ubuntu and created a .rc file where I wrote the commands. so when I do want it to start I execute that file.

Picture of Javier Tejera
Re: Error with Database Connection
by Javier Tejera - Tuesday, 21 November 2017, 5:52 PM
 

Hi John,

Many thanks for your help.

As Tom mentioned above, I have just entered mongod in the terminal and run node server. It works perfectly.

I would like to go create the cron file, that would be really useful. But I am not a developer, so I have to do some research. I am pretty sure that if I follow some steps in a tutorial I will sort it out. 

Thanks very much again!

Picture of John Niezen
Re: Error with Database Connection
by John Niezen - Wednesday, 22 November 2017, 6:57 AM
 

You are welcome, a small file on Linux is not difficult, use a text editor to write a file with some commands on the lines and ensure it is executable after saving, like:

sudo service mongod start
node server

depending where you put the file, you might need to include a line to ensure you go to your adapt installation folder, otherwise your node server command will not work :-)</p)

Picture of Javier Tejera
Re: Error with Database Connection
by Javier Tejera - Wednesday, 22 November 2017, 5:41 PM
 

Hi John, I really appreciate your help, thanks a lot :)

After solved my first problem, now unfortunately have a couple of new ones... 

Yesterday I couldn't neither preview nor download the test-courses I was playing with. Today I was almost to start to figure out what was happening, but I couldn't even log into the authoring tool. Here you have the new problems:

problem authoring tool

It seems that some files are missing, but I did not do anything into the folders adapt_authoring neither mongodb.

Not really sure what to do, any suggestion?

Picture of Tom Taylor
Re: Error with Database Connection
by Tom Taylor - Thursday, 23 November 2017, 3:48 PM
 

Hi Javier,

This message means that there's an issue with the installed roles, rather than a problem with files. I suspect that something may have gone wrong during install.

Is this a new install, or has it worked previously?

Picture of Javier Tejera
Re: Error with Database Connection
by Javier Tejera - Thursday, 23 November 2017, 7:33 PM
 

Hi Tom,

It has worked previously but I could not save/export any course. This is what happened to this point:

(1) Installation of Adapt.

(2) Log in (email address and password OK) and after having been playing around with the application, I tried to save/export a course and it was not working (error).

(3) The next day I had tried to open the tool in order to figure out why I couldn't save/export, but this new problem appeared, therefore now I can not log into Adapt. I have the message “Invalid email address or password”. 

As far as I know, between (2) and (3) I did not modify anything at all - but I guess probably I did without realizing. Any idea what steps can I follow at this point?

 Thanks in advance!

Picture of Ayyaj Attar
Re: Error with Database Connection
by Ayyaj Attar - Thursday, 23 November 2017, 6:20 AM
 

just start mongod service in terminal..check connections as well