Webserver is not running

Having issues? Post them here, and help other users.
Post Reply
bacsom
Junior Member
Posts: 4
Joined: Thu Apr 26, 2018 2:20 am

Webserver is not running

Post by bacsom »

Hi,

I hope somebody could help me. I had a working NEMS installation few month back, but the SD card got corrupted and I haven't got the time to play with it since than. Today I wanted to reinstall everything, but I don't have the gui and it seems that the webserver is not running.

This is what I get:

admin@NEMS:~ $ service apache2 status
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset:
Active: failed (Result: exit-code) since Thu 2018-04-26 08:59:12 CEST; 23min
Process: 774 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILUR

Any help would be greatly appreciated.
User avatar
Robbie Ferguson
Posting Freak
Posts: 835
Joined: Wed Mar 07, 2012 3:23 pm
Location: Ontario, Canada
Contact:

RE: Webserver is not running

Post by Robbie Ferguson »

Hi there,
Sorry you had trouble with your SD card.

So to clarify, is it that you are trying to access the backup to be able to migrate to a new device/install?

Try using samba if that's the case... though with a corrupt SD card, your backup may too be corrupted. Try: \\nems.local\backup\backup.nems

I do offer NEMS off-site backup service which would be perfect in a case like this... but in the meantime if you don't have a current backup, your approach will be that of data recovery.

If you know your way around Linux and can't find any other way, you'll find your Migrator backup stored at /var/www/html/backup/snapshot/backup.nems once generated. Because the backup itself is stored in RAM and not the SD card, you should have little trouble copying it - but Migrator couldn't read the SD card during the backup process, it may be corrupt. Email it to me if you want me to check its integrity.

Cheers,
Robbie
Robbie Ferguson // The Bald Nerd

Did I help you out? Appreciate what I do? Please consider saying thanks:
bacsom
Junior Member
Posts: 4
Joined: Thu Apr 26, 2018 2:20 am

RE: Webserver is not running

Post by bacsom »

Thank you for your answer!

No, I am not trying to reach my backup. I have just started to play with your program (which is great by the way :-)). I made a few things a few months back but than I didn't have enough time. Now that I have some, I was going to continue when I found out that the SD card got corrupted.

I have downloaded / reinstalled NEMS again, I have run the init script, but I can't reach the GUI on the IP address of the program. I can ssh into the system all right though.

I am a beginner Linux user, not a newbie anymore but I still have a lot of things to learn :-).
Last edited by bacsom on Fri Apr 27, 2018 1:18 pm, edited 1 time in total.
User avatar
Robbie Ferguson
Posting Freak
Posts: 835
Joined: Wed Mar 07, 2012 3:23 pm
Location: Ontario, Canada
Contact:

RE: Webserver is not running

Post by Robbie Ferguson »

Hmm, well, something is not right there.

Rather than using the "service" command, what happens when you do this?

sudo systemctl stop apache2
sudo systemctl start apache2
sudo systemctl status apache2

My guess is you've got some bad certs. Did you try regenerating the NEMS certs?
Robbie Ferguson // The Bald Nerd

Did I help you out? Appreciate what I do? Please consider saying thanks:
bacsom
Junior Member
Posts: 4
Joined: Thu Apr 26, 2018 2:20 am

RE: Webserver is not running

Post by bacsom »

sudo systemctl start apache2:
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.

sudo systemctl status apache2:
● apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset:
   Active: failed (Result: exit-code) since Thu 2018-04-26 08:59:12 CEST; 1 day
  Process: 774 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILUR
Apr 26 08:59:11 NEMS systemd[1]: Starting The Apache HTTP Server...
Apr 26 08:59:12 NEMS apachectl[774]: apache2: Could not open configuration file
Apr 26 08:59:12 NEMS apachectl[774]: Action 'start' failed.
Apr 26 08:59:12 NEMS apachectl[774]: The Apache error log may have more informat
Apr 26 08:59:12 NEMS systemd[1]: apache2.service: Control process exited, code=e
Apr 26 08:59:12 NEMS systemd[1]: Failed to start The Apache HTTP Server.
Apr 26 08:59:12 NEMS systemd[1]: apache2.service: Unit entered failed state.
Apr 26 08:59:12 NEMS systemd[1]: apache2.service: Failed with result 'exit-code'


Thank you for your time :-) Unfortunately I don't know how to regenerate certs :-(.
User avatar
Robbie Ferguson
Posting Freak
Posts: 835
Joined: Wed Mar 07, 2012 3:23 pm
Location: Ontario, Canada
Contact:

RE: Webserver is not running

Post by Robbie Ferguson »

sudo nems-cert

:) Try it, and if still no go, email me your backup.nems file to review, or if you'd like, provide me with SSH access (again, email me the info to keep it private).

Cheers,
Robbie
Robbie Ferguson // The Bald Nerd

Did I help you out? Appreciate what I do? Please consider saying thanks:
bacsom
Junior Member
Posts: 4
Joined: Thu Apr 26, 2018 2:20 am

RE: Webserver is not running

Post by bacsom »

Thank you again, it doesn't work. :-(

I have checked and the configuration file (/etc/apache2/apache2.conf) is missing. In fact, the whole directory is empty. Is it normal? I can send you the backup.nems file, what is your e-mail address?
User avatar
Robbie Ferguson
Posting Freak
Posts: 835
Joined: Wed Mar 07, 2012 3:23 pm
Location: Ontario, Canada
Contact:

RE: Webserver is not running

Post by Robbie Ferguson »

LOL no - that's not normal! Did you try to manually apt something that may have broken your NEMS server? I'd probably just suggest re-flashing 1.3.1 and import your migrator backup.

My email address is [email protected] - feel free to send me the backup file to have a peek, though in this case it seems SSH access would be more helpful - but again, unless you know what you'd done to cause this, I'd just re-flash. Who knows what else is broken?

:)

Cheers,
Robbie
Robbie Ferguson // The Bald Nerd

Did I help you out? Appreciate what I do? Please consider saying thanks:
Post Reply