[Date Prev] [Date Index] [Date Next] [Thread Prev] [Thread Index] [Thread Next]

Re: First time user having problems with common errors (getservbyname)

John Stoffel john.stoffel@taec.toshiba.com
Wed, 28 Mar 2012 14:15:32 GMT


Chris> I recently installed conserver and I am trying to run it and I
Chris> keep getting the common (judging by the posts and FAQ) error of
Chris> "getservbyname"

Chris> Here is the output when I try to run conserver:

Chris> [Tue Mar 27 19:07:50 2012] conserver (2710): ERROR: ParseFile():
Chris> fopen(full;): No such file or directory
Chris> [Tue Mar 27 19:07:50 2012] conserver (2710): ERROR: ParseFile():
Chris> fopen(xyplex;): No such file or directory
Chris> [Tue Mar 27 19:07:50 2012] conserver (2710): ERROR:
Chris> getservbyname(conserver) failed

Can you post your conserver.cf file?  

I assume this error is when you are running 'conserver -d' or when
you're running the 'console <hostname>' command?  More details please! 

Chris> I looked around and saw a few things and tried to edit my
Chris> /etc/services and this is what I added:

Chris> # Local services
Chris> conserver       782/TCP                         #conserver

You shouldn't need to do this at all.  

Chris> I also edited my /etc/hosts file and added this:

Chris> 127.0.0.1   localhost.localdomain   localhost       conserver
Chris> console

Did you install a pre-compiled package?  It might be simpler to just
download the source and compile your own version.  

Chris> Finally, since I have not seen many examples of sample configs
Chris> and such (I plan to make a tutorial after I get everything set
Chris> up to help future new (see dumb) users like myself) I was
Chris> wondering if conserver will even do what I want.

It's really pretty easy to get conserver up and running, post your
config and we'll help you out.

Chris>  I am trying to set up a spare laptop as a server (running
Chris> crunchbang) and have 3 USB-serial converters on it, each going
Chris> to a Cisco switch.  Then I want to "dial" in to conserver so
Chris> that I can access each cisco switch through it's console cable
Chris> in my garage test network.  I am using to study for CCNA.  Each
Chris> USB-serial device is currently working and they are
Chris> /dev/ttyUSB0, USB1, & USB2, respectively.  (If it is not
Chris> possible to do this this way, please let me know if at all
Chris> possible.)

Absolutely, this is completely possible and I do stuff like this all
the time at work where I run conserver to manage serial consoles for
Rackable Systems hardware, Cisco and Dell switches and some other
random Serial stuff.

So let's assume your crunchbang server is named 'crunchbang', just to
make it simple.  And that we're only interested in one port right
now.  

Your /tmp/conserver.cf file would look something like this:

   console switch1	{ 
     master crunchbang;
     rw *;
     type device;
     device ttyUSB0;
     baud 9600;
     # See the conserver.cf man page for details...
     options autoreinit;
     logfile /tmp/switch1.log;
   }

You would start the server with:

    conserver -C /tmp/conserver.cf

And you would access it with:

    console -M crunchbang switch1

You would use your local username/password on crunchbang, the system
hosting the conserver daemon, to get access.  It's wide open in the
above config (the rw *;) so that anyone can attach and do stuff.  

So let us know if this works for you.

John