Jump to content

How can I restart the Web Server Interface via Telnet?


Suse User

Recommended Posts

Is there a command line I can use to stop and then restart the Webserver?

 

I've had a few occasions where I've lost connection to the Web Interface, usually when trying to shut down unraid via a browser.  I click to stop the array and that's it, no more web interface to power off from. 

 

When this happens I can still connect via Telnet and I know I can use the poweroff command from there, but this can sometimes result in a parity check on restarting.  Icidently, is there a clean & orderly reboot as opposed to poweroff command for unraid?

 

Thanks,

 

Mark.

 

 

Link to comment

If you can telnet in, try this:

 

nohup /usr/local/sbin/emhttp &

 

Now, the web-interface should be running.  You can see if it is accessible from your PC.

 

If it is not... then you need to type a series of commands to shut down cleanly.

 

cd /root

cp /var/log/syslog  /boot/syslog.txt

chmod a-x /boot/syslog.txt

samba stop

for i in /dev/md*

do

  umount $i

done

mdcmd stop

 

Good luck...  The web-interface does not stop.  Apparently, you have a problem...  If it it is dying, you really need to find the cause.

 

The second command in the above set of commands copied the system log to your flash drive.  Once you are back up, please consider posting it to this forum as an attachment. It might have the clues needed to learn why your server is having problems.

 

My web-interface never quits or stops working, and I've had my array running for nearly three years.  Your should not quit either.

 

Joe L.

Link to comment

Hi Joe,

 

Next time I have this problem I will post the log file.

 

It happens very rarely, yesterday I clicked the STOP ARRAY button (while all the drives were spun down) using a browser on a PC at my house controlled remotely from a Mac.  It appeared that I had not clicked the STOP button so I clicked again and at that second the first click registered.

 

I could not get back on to the web server, even using a different browser (or different PC).  I could Telnet in though.  "poweroff" seems to work cleanly though.

 

Thanks,

 

Mark.

Link to comment
  • 4 weeks later...

you need to type a series of commands to shut down cleanly.

 

cd /root

cp /var/log/syslog  /boot/syslog.txt

chmod a-x /boot/syslog.txt

samba stop

for i in /dev/md*

do

   umount $i

done

mdcmd stop

 

 

Is there a way to create these commands as a file on the flsh drive and execute them from the command line?

 

I tried this and got the below errors

 

I also couldn't figure out how to type the complete text on the command line (the for loop etc)

 

thanks for any help

 

--Don

 

====

: No such file or directory

cp: cannot create regular file '/boot/syslog.txt\r': Invalid argument

chmod: cannot access '/boot/syslog.txt\r': No such file or directory

-bash: samba: command not found

....

Link to comment

from the wiki FAQ:

 

Why do my scripts have problems with end-of-lines?

 

Linux and Unix use a single Linefeed (0a) as an end-of-line. DOS and Windows use a Carriage Return and Linefeed pair (0d0a) for each end-of-line. Mac's use a single Carriage Return (0d) for an end-of-line. In general, you must use the appropriate end-of-line character(s) when attempting to execute a script or batch or command file, with each of the operating systems mentioned.

 

Typically with unRAID, users create or copy scripts on a Windows machine, and need to strip the Carriage Returns from the file before it will work correctly on the unRAID server. Here is a pair of commands that can be used to properly convert a file for unRAID's use. It uses the monthly_parity_check.sh script as an example.

fromdos  <monthly_parity_check.sh  >tempfile

mv  tempfile  monthly_parity_check.sh

The Linux tool fromdos strips the carriage returns and writes a tempfile, then mv writes the tempfile back to the original.

Bottom line, your script has trailing carriage returns (shown in your sample output as "\r")

Link to comment

Archived

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

×
×
  • Create New...