LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-18-2013, 09:37 AM   #1
Vijay karthik
LQ Newbie
 
Registered: Nov 2013
Posts: 7

Rep: Reputation: Disabled
Couldnt stop running the Connection refused command


Hello Sir/Madam,
Its very urgent.... I wrote a script related to running a audio file in rc.local in bootloader... Unfortunately I wrote the script where there isnt an audio file in my system....

The code was like this

#!/bin/sh

songs=(~/music/*/*/*)
total=${#songs[@]}

while true
do
song=${songs[$RANDOM%$total]}
oggdec "$song" -o- | aplay -q
done

Since this file wasn't present in my system... When I rebooted the system, this program started running.... I couldn't stop the screen running the error "Connection refused" and that "No audio file present"... Moreover i couldnt enter into the terminal.... Please do help me... Its very urgent... I am running out of time....


I tried every command but nothing has gone well till this moment....

Last edited by Vijay karthik; 11-18-2013 at 09:41 AM.
 
Old 11-18-2013, 09:53 AM   #2
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,029

Rep: Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845
i hope no one is in any real mortal danger.

are you able to ssh into the machine and kill the script.
 
Old 11-18-2013, 10:18 AM   #3
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387
Quote:
Originally Posted by Vijay karthik View Post
Its very urgent....
Nope, it is not. We are all volunteers here, if you want instant help sign up for some paid for support.

Quote:
I wrote a script related to running a audio file in rc.local in bootloader... Unfortunately I wrote the script where there isnt an audio file in my system....

The code was like this
Code:
#!/bin/sh

songs=(~/music/*/*/*)     # This is run from rc.local. There is no ~ present at this time.
                          # Change to /full/path/music/*/*/*
total=${#songs[@]}

while true
do
    song=${songs[$RANDOM%$total]}
    oggdec "$song" -o- | aplay -q   # are all files in ogg format?
done
Since this file wasn't present in my system... When I rebooted the system, this program started running.... I couldn't stop the screen running the error "Connection refused" and that "No audio file present"...
You also need to put the script in the background when run from rc.local: /full/path/to/name.of.script &

Quote:
Moreover i couldnt enter into the terminal....
Boot into runlevel 1 (or rescue mode) and fix the rc.local script from there.

Quote:
Its very urgent... I am running out of time....
Maybe you should start earlier with your assignment(s)......
 
1 members found this post helpful.
Old 11-18-2013, 10:26 AM   #4
Vijay karthik
LQ Newbie
 
Registered: Nov 2013
Posts: 7

Original Poster
Rep: Reputation: Disabled
What I mean is i Couldnt enter into terminal itself.... the error screen is displayed and I couldnt stop and move into the terminal...
I tried all the shortcuts like Ctrl+Alt+(F1-F6).... but nothing gave good results... Please help its very urgent...
 
Old 11-18-2013, 10:43 AM   #5
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387
Quote:
Originally Posted by Vijay karthik View Post
What I mean is i Couldnt enter into terminal itself.... the error screen is displayed and I couldnt stop and move into the terminal...
I'll repeat my previous answer: Boot into runlevel 1 (or rescue mode) and fix the rc.local script from there.
Quote:
Please help its very urgent...
YES WE KNOW! You've told us, three times. And to be blunt: NOT OUR PROBLEM (see my previous remark about this).
 
Old 11-18-2013, 10:50 AM   #6
Vijay karthik
LQ Newbie
 
Registered: Nov 2013
Posts: 7

Original Poster
Rep: Reputation: Disabled
how to boot it sir.. I couldnt enter into terminal itself....
 
Old 11-18-2013, 10:54 AM   #7
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,029

Rep: Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845
are you able to boot into a live-usb, mount the disk and fix the bad configuration ?
 
Old 11-18-2013, 10:59 AM   #8
Vijay karthik
LQ Newbie
 
Registered: Nov 2013
Posts: 7

Original Poster
Rep: Reputation: Disabled
Thank you schneidz for ur reply...
As u said i didnt try booting it through usb yet,...
If u know the procedure can u please mail it...

Thank you
 
Old 11-18-2013, 11:20 AM   #9
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,029

Rep: Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845
https://fedorahosted.org/liveusb-creator/
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] rsh connection refused when executing a command john.wythe@activant.com Linux - Server 3 08-24-2011 02:23 PM
Http connection refused from portal server running on RHEL 5 deepshar027 Linux - Server 1 09-15-2007 06:08 AM
SSH connection refused, no firewall and confirmed running amdinator Linux - Networking 4 05-16-2007 04:18 PM
Connection Refused - site specific network problems Laptop running debian 2.6.0-test7 bjarvis829 Linux - Laptop and Netbook 1 10-11-2003 02:10 PM
Connection Refused - site specific network problems Laptop running debian 2.6.0-test7 bjarvis829 Linux - Networking 2 10-11-2003 01:24 PM


All times are GMT -5. The time now is 06:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration