Jump to content

How do I restart simple features from the command line?


tucansam

Recommended Posts

Simply put, you cannot.

 

Simple Features isn't really "ran", it replaces files in the stock unraid webgui to give it the new appearance. So Simple Features will never "crash" or need to be restarted, the unraid webgui (emhttp) is what is actually going down.

 

Emhttp cannot be restarted, there is a lot of commands that need to be ran in order to start emhttp, otherwise you will only get a segfault.

 

One thing to try, when the webgui isn't accessible, run this:

 

ps aux | grep emhttp | grep -v grep

 

If nothing comes up, emhttp has been killed or crashed. If something does come up, then emhttp is still running and there may be another issue at play.

Link to comment

Well, its running... but not "listening" -- telneting to port 80 yields nothing, and it times out in any browser I try.

 

This happens at least once a week... And in the past I've had to reboot.

 

How can I begin troubleshooting this?  Might something be written in the syslog?  I make it a habit to log in to unraid at least once a day to check disk status.  Having to reboot once a week is becoming old :(

Link to comment

If nothing comes up, emhttp has been killed or crashed. If something does come up, then emhttp is still running and there may be another issue at play.

If emhttp has crashed, all you can do is reboot.  If you have the clean-powerdown add-on installed, you can try invoking

/sbin/powerdown

to attempt to have the array stop cleanly.

Link to comment

Installed it.  Ran it, got this:

 

--

 

root@ffs1:/sbin# ./powerdown

Capturing information to syslog. Please wait...

version[17041]: Linux version 3.0.35-unRAID (root@Develop) (gcc version 4.4.4 (G                                                                              CC) ) #2 SMP Thu Jun 21 16:20:26 MDT 2012

ls: cannot access /dev/hd[a-z]: No such file or directory

ls: cannot access /dev/hd[a-z]: No such file or directory

status[17124]: State: STARTED

status[17124]: D#          Model / Serial          Status        Device

status[17124]: 0                  /                DISK_OK        sdc

status[17124]: 1                  /                DISK_OK        sdb

status[17124]: 2                  /                DISK_OK        sdd

status[17124]: 3                  /                DISK_OK        sde

status[17124]: 4                  /                DISK_NP        rdevName.

status[17124]: 5                  /                DISK_NP        rdevName.

status[17124]: 6                  /                DISK_NP        rdevName.

status[17124]: 7                  /                DISK_NP        rdevName.

status[17124]: 8                  /                DISK_NP        rdevName.

status[17124]: 9                  /                DISK_NP        rdevName.

status[17124]: 10                /                DISK_NP        rdevName.

status[17124]: 11                /                DISK_NP        rdevName.

status[17124]: 12                /                DISK_NP        rdevName.

status[17124]: 13                /                DISK_NP        rdevName.

status[17124]: 14                /                DISK_NP        rdevName.

status[17124]: 15                /                DISK_NP        rdevName.

status[17124]: 16                /                DISK_NP        rdevName.

status[17124]: 17                /                DISK_NP        rdevName.

status[17124]: 18                /                DISK_NP        rdevName.

status[17124]: 19                /                DISK_NP        rdevName.

status[17124]: 20                /                DISK_NP        rdevName.

status[17124]: SMART overall health assessment

ls: cannot access /dev/hd[a-z]: No such file or directory

status[17124]: /dev/sda: smartctl 5.40 2010-10-16 r3189 [i486-slackware-linux-gn                                                                              u] (local build)

status[17124]: Copyright © 2002-10 by Bruce Allen, http://smartmontools.source                                                                              forge.net

status[17124]: SMART overall-health self-assessment test result: PASSED

status[17124]: /dev/sdb: smartctl 5.40 2010-10-16 r3189 [i486-slackware-linux-gn                                                                              u] (local build)

status[17124]: Copyright © 2002-10 by Bruce Allen, http://smartmontools.source                                                                              forge.net

status[17124]: Device is in STANDBY mode, exit(2)

status[17124]: /dev/sdc: smartctl 5.40 2010-10-16 r3189 [i486-slackware-linux-gn                                                                              u] (local build)

status[17124]: Copyright © 2002-10 by Bruce Allen, http://smartmontools.source                                                                              forge.net

status[17124]: SMART overall-health self-assessment test result: PASSED

status[17124]: /dev/sdd: smartctl 5.40 2010-10-16 r3189 [i486-slackware-linux-gn                                                                              u] (local build)

status[17124]: Copyright © 2002-10 by Bruce Allen, http://smartmontools.source                                                                              forge.net

status[17124]: SMART overall-health self-assessment test result: PASSED

status[17124]: /dev/sde: smartctl 5.40 2010-10-16 r3189 [i486-slackware-linux-gn                                                                              u] (local build)

status[17124]: Copyright © 2002-10 by Bruce Allen, http://smartmontools.source                                                                              forge.net

status[17124]: SMART overall-health self-assessment test result: PASSED

status[17124]: /dev/sdf: smartctl 5.40 2010-10-16 r3189 [i486-slackware-linux-gn                                                                              u] (local build)

status[17124]: Copyright © 2002-10 by Bruce Allen, http://smartmontools.source                                                                              forge.net

status[17124]: /dev/sdf: Unknown USB bridge [0x0781:0x5571 (0x126)]

status[17124]: Smartctl: please specify device type with the -d option.

status[17124]: Use smartctl -h to get a usage summary

status[17124]: No active PIDS on the array

ls: cannot access /boot/logs/syslog*.txt: No such file or directory

Saving current syslog: /boot/logs/syslog-20121110-215205.txt

-rwxrwxrwx 1 root root 3252094 2012-11-10 21:52 /boot/logs/syslog-20121110-215205.txt

  adding: syslog.txt (deflated 95%)

 

Broadcast message from root (pts/0) (Sat Nov 10 21:52:06 2012):

 

The system is going down for system halt NOW!

root@ffs1:/sbin#

 

--

 

Parity check in progress.  This will mark the fourth reboot-caused parity check in six days.

 

Should I be looking at re-installing unraid at this point?  Uptimes haven't exceeded 72 hours since I installed the sab/sb/cp packages.

 

Link to comment

Here is my dilemma.  Somewhere in the process of installing the simple feature/sab/sb/cp plugins, the system became unstable.  Reboots are a regular thing right now, services stopping on their own (or crashing, or whatever), slowness, poor network speeds, etc. 

 

I can either spend hours (days) troubleshooting, trying to figure out how to disable each one and then turn each one on one at a time until I find out what is causing the problem... And then troubleshooting once I find it (with God only knows how many dirty shutdowns and forced parity checks along the way)

 

OR... I can research how to do a totally clean unraid install while preserving my user shares and data, and then build a cheap Windows XP machine to be my media downloader.  I am infinitely more familiar with Windows, and my unraid server would (theoretically) not be so unstable. 

 

I'd really like to consolidate and run everything in the server, but I'm not willing to sacrifice the uptime/reliability of my primary storage system for all my critical data. 

 

The sad thing is, everything is working fine except the regular breaking in the web interface.  Maybe install unmenu again?

 

Link to comment

For plug-ins, you remove them from the /boot/config/plugins directory or rename them changing the extension from .plg to anything else. My bet is on sabnzbd, it tends to be a resource hog at times.

 

The issue is how linux decides what processes to kill. Its based on how many cycles it has ran, its uptime and time since last accessed. Many of us go days without accessing the main webgui, which slowly but surely knocks it down the totem pole. If couchpotato, sickbeard and sabnzbd are being used/accessed and there isn't much else running, emhttp will most likely get killed.

 

I can say this, I have almost the same hardware as you, an athlon dual core, albeit with a faster clock, 8GB ram. I run sabnzbd, couchpotato and sickbeard along with simplefeatures. I have zero issues with emhttp being unresponsive.

 

Sounds a lot like one of your add-ons is preventing unRAID from starting.  (This has been reported before)

Disable ALL your add-ons and then try re-starting the array.

 

If he's getting the user/password prompt, emhttp is running(atleast temporarily).

 

I would disable the three plug-ins and see if the issue persists. If not, add one back at a time and see if the issue comes back.

 

With slowness, poor network speeds and crashing, it could very well be a faulty processor, ram or even power supply.

Link to comment

Memtest ran until just now and found no errors.

 

I was preclearing a disk on another machine.  I installed it and booted the server.  The web interface started, and I attempted to stop the array so I could add the new disk.  The endless "attemping to unmount disks" loop occured, and I closed the browser and re-opened it, and now unraid's management interface is, once again, unavailable.  No plug ins are running except Simple Features.

 

I can't manage my server.

Link to comment

Memtest ran until just now and found no errors.

Good.

I can't manage my server.

Log in via telnet (or on the system console) and type:

lsof | grep /mnt

 

It will list a few processes, like this on my server. 

smbd      10406      root  31r      DIR      0,12    11936          2 /mnt/user/Movies

smbd      10406      root  37r      DIR      0,12    9784          8 /mnt/user/data

 

These show that the smbd process have as their current-working-directory on my server.  The "smbd" process is killed by unRAID as it stops the array.  Other processes might be listed on your server.  If ANY are your add-ons, they must be stopped before the server will un-mount the drives.  It will wait patiently until you stop your add-ons.

 

If you have logged onto the server and changed directory to any of your disks or user-shares, again unRAID will wait patiently until you log out or change directory to /boot (or / )

 

Any process whose current-working-directory is under /mnt/disk* or /mnt/user/* or /mnt/cache will keep the disk from un-mounting.  A program that is running on cache will keep it from un-loading.  You MUST stop all the add-ons.  The "lsof" command will show those to you.

 

If you've added a "swap" file through an add-on and that file is on the cache drive, or on a data drive, it must be stopped. To stop all swap files type:

swapoff -a -v

 

Time to learn how to manage your server. 

Joe L.

Link to comment

Thanks Joe.  I read another thread and ran the command, and the open files kept changing -- this was immediately following a reboot.  I suspect it is the cache-dirs feature doing its thing.  I gave it a few minutes and the array stopped and I was able to add my disk, format, and go from there.

 

This whole mess started when the web interface became unavailable.  I renamed my sab/sb/cp plg files to turn them off, and now have renamed the sab plg (and rebooted) to turn them on one by one... And now sab is not available to manage.

 

One thing at a time, I guess.

Link to comment

Thanks Joe.  I read another thread and ran the command, and the open files kept changing -- this was immediately following a reboot.  I suspect it is the cache-dirs feature doing its thing.  I gave it a few minutes and the array stopped and I was able to add my disk, format, and go from there.

 

This whole mess started when the web interface became unavailable.  I renamed my sab/sb/cp plg files to turn them off, and now have renamed the sab plg (and rebooted) to turn them on one by one... And now sab is not available to manage.

 

One thing at a time, I guess.

yes, cache_dirs will notice you are trying to stop the array and terminate itself.

 

Joe L.

Link to comment

Well, as far as running sab/sb/cp on the unraid server, I'm over it.  Just can't get the system to stay stable with all the other crap running.  Time to dedicate an old PC to be my downloader.  Not about to risk the stability and availability of my data for the convenience of running one less machine.

 

Hopefully unraid + simple features doesn't puke all over itself.  This initial install has been a pretty rocky road.

 

Next step will be to let the system run for a few days to make sure the web interface doesn't die any more... if it does, I'm afraid I'll be about at my wit's end.

Link to comment

Sorry to hear its causing you issues. I run all three and more, plus simplefeatures and am always messing with something testing it out, haven't had a single issue other than my NIC dropping out, which I resolved with a new NIC.

 

If memtest came back solid, it could still be any of the other possibilities I listed. As for the plug-ins running on cache, they will notice you trying to shutdown and will stop themselves the same as cache_dirs.

Link to comment

I appreciate it... I wish I could get everything to work, I really do, I just can't dedicate every afternoon and evening to trying to fix the next broken thing.  I've already poured more hours into this project than I had planned.  At this point I just need a system that will just work.  Hopefully a second system doing the downloading will be that solution.

Link to comment
  • 3 weeks later...

Are you running simpleFeatures 1.0.5? I am having the same problem since upgrading to that version. Earlier versions had no problems but there are others in this thread having the same thing w/ 1.0.5 http://lime-technology.com/forum/index.php?topic=12698.msg212637#msg212637

 

Not sure what is going on but once I am able to reboot I am going to downgrade simpleFeatures and see if I get my stability back. With an earlier version I had no issues for months. Now I am locked out of the web UI but absolutely nothing gets logged and the system is otherwise stable.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...