LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 02-14-2012, 06:10 PM   #1
rsheikh
LQ Newbie
 
Registered: Jun 2011
Posts: 14

Rep: Reputation: Disabled
chkconfig issue


Hello, I did a search in the forums for chkconfig but did not find anything.

System is RHEL 6.1 (32 bit), execute as root

Quote:
chkconfig --add ./sas.servers
error reading information on service sas.servers: No such file or directory
Google and other did not yield much, any insight is appreciated.

Note: the second part of the command I will execute once the --add works.
chkconfig --level 35 sas.servers on
 
Old 02-14-2012, 11:35 PM   #2
sag47
Senior Member
 
Registered: Sep 2009
Location: Raleigh, NC
Distribution: Ubuntu, PopOS, Raspbian
Posts: 1,899
Blog Entries: 36

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
First, the service needs to be located in /etc/init.d/ in order to be properly managed.

Second, you should read the RUNLEVEL FILES section of the chkconfig man page.

Once you add the required chkconfig comments to your init script and it's located in /etc/init.d/ folder then the chkconfig --add sas.servers command will work (not ./sas.servers) and you can manage the service using chkconfig.

Other man pages you should look at on your redhat system include:
man chkconfig
man service

Last edited by sag47; 02-14-2012 at 11:37 PM.
 
1 members found this post helpful.
Old 02-15-2012, 01:04 AM   #3
devilboy09
Member
 
Registered: Nov 2011
Location: Iran
Distribution: Debian, CentOS, LFS, CloudLinux
Posts: 377

Rep: Reputation: 10
Quote:
Originally Posted by rsheikh View Post
Hello, I did a search in the forums for chkconfig but did not find anything.

System is RHEL 6.1 (32 bit), execute as root



Google and other did not yield much, any insight is appreciated.

Note: the second part of the command I will execute once the --add works.
chkconfig --level 35 sas.servers on
i didn't undrestand what are you trying to do ?!?!
 
Old 02-18-2012, 02:09 PM   #4
rsheikh
LQ Newbie
 
Registered: Jun 2011
Posts: 14

Original Poster
Rep: Reputation: Disabled
You're a Wizard, Harry! Yes that was my mistake, thank you for the suggestion and guidance sag47. Devilboy, I was trying to do what sag47 suggested. I appreciate both of yours time!
 
Old 02-18-2012, 02:14 PM   #5
rsheikh
LQ Newbie
 
Registered: Jun 2011
Posts: 14

Original Poster
Rep: Reputation: Disabled
SAG47, I just saw in your profile that you have WIN X64 as well as are a linux expert. One question if I may please. Unrelated but I have been trying to communicate from a win64 7 pro to rhel 6 machine, hosts.deny and hosts.allow all commented out, sshd is running, but I keep getting connection refused, or when I run portQry form the windows side for a particular port (that port on rhel is listening (netstat -an|grep 8561) I get FILTERED status from PortQry. On WIN machine I turned off the firewall (for testing) also added PortQry in allow through firewall, no third party firewall running) but no resolution. MS tech support said it is RHEL that is refusing.

I will do the homework and reading but please if you could point me to where I should start looking, I am going nuts!
 
Old 02-18-2012, 02:21 PM   #6
devilboy09
Member
 
Registered: Nov 2011
Location: Iran
Distribution: Debian, CentOS, LFS, CloudLinux
Posts: 377

Rep: Reputation: 10
clearly, there's something wrong on your linux machine.is you firewall off on that machine?
 
Old 02-18-2012, 03:42 PM   #7
sag47
Senior Member
 
Registered: Sep 2009
Location: Raleigh, NC
Distribution: Ubuntu, PopOS, Raspbian
Posts: 1,899
Blog Entries: 36

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
I run a mixed environment at home which is why you see Windows (for games).

It is likely being filtered by iptables (comes by default in RedHat) like devilboy suggested. What is the service you're trying to access over 8561? If it is ssh then check the service status for sshd running.
Code:
service sshd status
Also see if you're able to hook the service banner from ssh on the machine as well. From RedHat run,
Code:
telnet localhost 8561
If it returns with your ssh version and other minimal information then it is properly listening and likely the firewall (iptables).

The configuration file for iptables is located in /etc/sysconfig/iptables. You can find extensive documentation on iptables at netfilter.org. Here's possibly a good starting point for you to start researching. These rules were generated on a debian machine I administer (some modified) but it will give you a decent idea.

Code:
# Generated by iptables-save v1.4.4 on Wed Sep 28 08:51:40 2011
*filter
:INPUT ACCEPT [388:68427]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [196:19118]
-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT

#allow ssh over port 22
-A INPUT -p tcp -m tcp -m state --state NEW --dport 22 -j ACCEPT

#allow ping machine
-A INPUT -p icmp --icmp-type 8 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT

#localhost gets everything
-A INPUT -s 127.0.0.1 -j ACCEPT
-A OUTPUT -s 127.0.0.1 -j ACCEPT

#End of rules, drop everything else

-A INPUT -j DROP
-A INPUT -m limit --limit 5/min -j LOG --log-prefix "iptables denied: " --log-level 7

COMMIT
# Completed on Wed Sep 28 08:51:40 2011
Keep in mind those rules may not work for you on your RedHat system but it gives you a general idea from which you could take. Also those rules allow the world on those ports. You should filter ip addresses by using the -s (source) option.

SAM

Last edited by sag47; 02-18-2012 at 04:01 PM.
 
Old 02-18-2012, 07:43 PM   #8
uhelp
Member
 
Registered: Nov 2011
Location: Germany, Bavaria, Nueremberg area
Distribution: openSUSE, Debian, LFS
Posts: 205

Rep: Reputation: 43
You can do this, albeit arguable to do so.

But if you do, than use for each and every file used by this server with absolut pathes.
 
Old 02-20-2012, 01:24 AM   #9
rsheikh
LQ Newbie
 
Registered: Jun 2011
Posts: 14

Original Poster
Rep: Reputation: Disabled
Thank you again, you folks are very kind people. Yes sir, I looked in enough google articles to look if sshd is running (it is). I came across someone's IP table rule, hate to admit went over my head. But I will start looking. RHEL and WIN are both inside my LAN. I do not access internet through them (that does not mean someone could not come in). It is a statistical application which is listerning on 8561 (installed on rhel machine). I was trying to have the web application server (jboss-GA) run on win7. That is where during install, it could not see the rhel machine (where app's metadata service runs).

I will start in the direction you suggested.

Again, heaps of thanks
 
  


Reply



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
Why do I get "bash: chkconfig: command not found" when I try to run chkconfig? non-thrash Fedora 10 05-20-2010 12:31 PM
Chkconfig henkoegema Linux - Software 2 12-19-2009 04:21 AM
chkconfig ?? vonedaddy Linux - Newbie 2 11-07-2007 11:44 PM
chkconfig ?? jchin Linux - Newbie 4 10-16-2003 01:59 AM
Help on chkconfig ztopher Linux - Software 0 04-09-2003 03:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:32 PM.

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
Open Source Consulting | Domain Registration