Sponsored Content
Operating Systems Linux Red Hat Restart of services if port no is changed in /etc/services in RHEL Post 302794865 by RHCE on Wednesday 17th of April 2013 12:27:29 AM
Old 04-17-2013
Thanks Corona688 for your answer. But, my question is how to change port of SSL which is 443 by default.

Also, can you please clarify with the help of an example how changing /etc/services is going to mislabel the netstat listings?

Regards
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

services

I have an application service running on an AIX server Client application is able to connect to the server machine. Strange thing is when i do "netstat -a | grep servicename" I get no output but when i do "ps -ef | grep service name", I am able to see the service running I... (1 Reply)
Discussion started by: bryan
1 Replies

2. AIX

how to check status of various services and port?

How can i check which service is activated on my AIX Box? how one can check particular port is open or not (like ftp/telnet port)? I dont have admin rights (1 Reply)
Discussion started by: ashish4422
1 Replies

3. Solaris

etc/services

Need help from the unix admins out there. I am trying to telnet from a windoze machine to a sun machine. It won't let me connect. I looked at etc/services and I found the port that telnet was listening on. But, how can I tell if its actually up and available? is there a unix command I can issue?... (15 Replies)
Discussion started by: Harleyrci
15 Replies

4. UNIX for Advanced & Expert Users

Opinion on auto-restart of failed apps/services

I'm becoming a dying breed where I work. More and more sys admins are advocating automatically restarting failed services such as tomcat, jboss, etc. I've always been against doing this except with buggy apps that can't be fixed or avoided. My main argument is that I feel it's a trick used by... (9 Replies)
Discussion started by: mglenney
9 Replies

5. AIX

problem to restart services from /etc/inittab in AIX6.1

hello, i have an AIX6.1.7.2 machine that it was upgraded recently from AIX5.3.9.4. when i kill system services that should restart automatically like /usr/sbin/cron it doesnt start. i checked my /etc/inittab file and i confirmed that this service is in respawn status so when i kill this process... (2 Replies)
Discussion started by: omonoiatis9
2 Replies

6. Ubuntu

what port number is used for SSH communication and HTTPS services

I am trying to find out what port number is used for SSH communication and HTTPS services in my Ubuntu OS. Thank you, Crim (1 Reply)
Discussion started by: crimputt
1 Replies

7. Shell Programming and Scripting

Need script to restart the services

Hi Guys, I need bash script to restart the service. 1. Disable the service called SASM svcadm disable sasm 2. if service went to maintenance mode then it shuld clear it with below command svcadm clear sasm 3.or else it should restart the mysql service /etc/init.d/mysql stop... (1 Reply)
Discussion started by: bapu1981
1 Replies

8. Shell Programming and Scripting

Script to Start services based on dependent services on other AIX machine

Hi, I just started working on a script. After my research, i found a command which can help me: AIM: To build a script which starts the services (Services 1) on server 1 automatically whenever its down. And it has a dependency on other service (Service 2) on Server 2. So my script has to... (4 Replies)
Discussion started by: draghun9
4 Replies

9. SuSE

Fetch port services from LDAP server

Hi, We have a ldap server configured with services (port) and want to know how to fetch that to the ldap clients: # cat /etc/nsswitch.conf|grep -i services services: files sss (neither sss nor ldap works) by doing "#getent services" I am getting only the result from /etc/services but I... (1 Reply)
Discussion started by: Sridaran
1 Replies

10. Debian

How do i correct restart network-services in Debian?

Hello, I would like to do follow steps. Set a static IP-Adress on eth0 (For Testing) Set DHCP on eth0 All steps should be done without a single reboot. /etc/network/interfaces iface eth0 inet static address 192.0.2.7/24 gateway 192.0.2.254How do i perform... (3 Replies)
Discussion started by: int3g3r
3 Replies
Net::SSLeay::Handle(3pm)				User Contributed Perl Documentation				  Net::SSLeay::Handle(3pm)

NAME
Net::SSLeay::Handle - Perl module that lets SSL (HTTPS) sockets be handled as standard file handles. SYNOPSIS
use Net::SSLeay::Handle qw/shutdown/; my ($host, $port) = ("localhost", 443); tie(*SSL, "Net::SSLeay::Handle", $host, $port); print SSL "GET / HTTP/1.0 "; shutdown(*SSL, 1); print while (<SSL>); close SSL; DESCRIPTION
Net::SSLeay::Handle allows you to request and receive HTTPS web pages using "old-fashion" file handles as in: print SSL "GET / HTTP/1.0 "; and print while (<SSL>); If you export the shutdown routine, then the only extra code that you need to add to your program is the tie function as in: my $socket; if ($scheme eq "https") { tie(*S2, "Net::SSLeay::Handle", $host, $port); $socket = *S2; else { $socket = Net::SSLeay::Handle->make_socket($host, $port); } print $socket $request_headers; ... FUNCTIONS
shutdown shutdown(*SOCKET, $mode) Calls to the main shutdown() don't work with tied sockets created with this module. This shutdown should be able to distinquish between tied and untied sockets and do the right thing. debug my $debug = Net::SSLeay::Handle->debug() Net::SSLeay::Handle->debug(1) Get/set debuging mode. Always returns the debug value before the function call. if an additional argument is given the debug option will be set to this value. make_socket my $sock = Net::SSLeay::Handle->make_socket($host, $port); Creates a socket that is connected to $post using $port. It uses $Net::SSLeay::proxyhost and proxyport if set and authentificates itself against this proxy depending on $Net::SSLeay::proxyauth. It also turns autoflush on for the created socket. USING EXISTING SOCKETS One of the motivations for writing this module was to avoid duplicating socket creation code (which is mostly error handling). The calls to tie() above where it is passed a $host and $port is provided for convenience testing. If you already have a socket connected to the right host and port, S1, then you can do something like: my $socket *S1; if ($scheme eq "https") { tie(*S2, "Net::SSLeay::Handle", $socket); $socket = *S2; } my $last_sel = select($socket); $| = 1; select($last_sel); print $socket $request_headers; ... Note: As far as I know you must be careful with the globs in the tie() function. The first parameter must be a glob (*SOMETHING) and the last parameter must be a reference to a glob (*SOMETHING_ELSE) or a scaler that was assigned to a reference to a glob (as in the example above) Also, the two globs must be different. When I tried to use the same glob, I got a core dump. EXPORT None by default. You can export the shutdown() function. It is suggested that you do export shutdown() or use the fully qualified Net::SSLeay::Handle::shutdown() function to shutdown SSL sockets. It should be smart enough to distinguish between SSL and non-SSL sockets and do the right thing. EXAMPLES
use Net::SSLeay::Handle qw/shutdown/; my ($host, $port) = ("localhost", 443); tie(*SSL, "Net::SSLeay::Handle", $host, $port); print SSL "GET / HTTP/1.0 "; shutdown(*SSL, 1); print while (<SSL>); close SSL; TODO
Better error handling. Callback routine? CAVEATS
Tying to a file handle is a little tricky (for me at least). The first parameter to tie() must be a glob (*SOMETHING) and the last parameter must be a reference to a glob (*SOMETHING_ELSE) or a scaler that was assigned to a reference to a glob ($s = *SOMETHING_ELSE). Also, the two globs must be different. When I tried to use the same glob, I got a core dump. I was able to associate attributes to globs created by this module (like *SSL above) by making a hash of hashes keyed by the file head1. Support for old perls may not be 100%. If in trouble try 5.6.0 or newer. CHANGES
Please see Net-SSLeay-Handle-0.50/Changes file. KNOWN BUGS
If you let this module construct sockets for you with Perl versions below v.5.6 then there is a slight memory leak. Other upgrade your Perl, or create the sockets yourself. The leak was created to let these older versions of Perl access more than one Handle at a time. AUTHOR
Jim Bowlin jbowlin@linklint.org SEE ALSO
Net::SSLeay, perl(1), http://openssl.org/ perl v5.14.2 2006-09-14 Net::SSLeay::Handle(3pm)
All times are GMT -4. The time now is 10:07 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy