Mailing List Archive

macosx 10.2.1, getservbyname: conserver: Undefined error: 0
I installed conserver 7.2.4 on macosx 10.2.1. After installation I had to add /usr/local/sbin to my PATH and to the conserver.rc script.

My goal is to communicate to an external serial device operating at 9600 bps, one stop, no parity, no handshaking. The device is connected through the USB serial port at /dev/tty.USA19QW11P1.

I am getting the following error when starting up:

conserver: getservbyname: conserver: Undefined error: 0

I have included below the output from conserver -V, and the files conserver .cf, conserver.passwd, and conserver.rc.

Thanks for any help!

------------------------------------------------------------------------

[bash stephen:/usr/local/etc]conserver -V
conserver: conserver.com version 7.2.4
conserver: default access type `r'
conserver: default escape sequence `^Ec'
conserver: configuration in `/usr/local/etc/conserver.cf'
conserver: password in `/usr/local/etc/conserver.passwd'
conserver: logfile is `/var/log/conserver'
conserver: pidfile is `/var/run/conserver.pid'
conserver: limited to 16 members per group
conserver: getservbyname: conserver: Undefined error: 0
conserver: secondary channel base port 0 (referenced as `0')
conserver: options: none
conserver: built with `./configure '

[bash stephen:/usr/local/etc]cat conserver.cf
#
# conserver.cf
#
routera:/dev/tty.USA19QW11P1.1:9600p:&:

[bash stephen:/usr/local/etc]cat conserver.passwd
#
# conserver.passwd
#
stephen:*passwd*:any

[bash stephen:/usr/local/etc]cat conserver.rc
#!/bin/sh
#
# Startup for conserver
#

PATH=/usr/bin:/usr/local/bin:/usr/local/sbin

case "$1" in
'start')
echo "Starting console server daemon"
conserver -d
;;

'stop')
master=`ps -ef | grep conserver | awk '$3 == "1"{print $2}'`
[ "$master" ] && kill -TERM $master
;;

*)
echo "Usage: $0 { start | stop }"
;;

esac
exit 0

--

-s
RE: macosx 10.2.1, getservbyname: conserver: Undefined error: 0 [ In reply to ]
Greetings Stephen,
You need to add conserver to your /etc/services file (or wherever
MacOSX keeps it...) That error means that it can't find the port number to
use for the conserver service.
I hope that this helps,
Adam

-----Original Message-----
From: Stephen Bannasch [mailto:stephen@concord.org]
Sent: Tuesday, November 05, 2002 10:26 AM
To: users@conserver.com
Subject: macosx 10.2.1, getservbyname: conserver: Undefined error: 0



I installed conserver 7.2.4 on macosx 10.2.1. After installation I had to
add /usr/local/sbin to my PATH and to the conserver.rc script.

My goal is to communicate to an external serial device operating at 9600
bps, one stop, no parity, no handshaking. The device is connected through
the USB serial port at /dev/tty.USA19QW11P1.

I am getting the following error when starting up:

conserver: getservbyname: conserver: Undefined error: 0

I have included below the output from conserver -V, and the files conserver
.cf, conserver.passwd, and conserver.rc.

Thanks for any help!

------------------------------------------------------------------------

[bash stephen:/usr/local/etc]conserver -V
conserver: conserver.com version 7.2.4
conserver: default access type `r'
conserver: default escape sequence `^Ec'
conserver: configuration in `/usr/local/etc/conserver.cf'
conserver: password in `/usr/local/etc/conserver.passwd'
conserver: logfile is `/var/log/conserver'
conserver: pidfile is `/var/run/conserver.pid'
conserver: limited to 16 members per group
conserver: getservbyname: conserver: Undefined error: 0
conserver: secondary channel base port 0 (referenced as `0')
conserver: options: none
conserver: built with `./configure '

[bash stephen:/usr/local/etc]cat conserver.cf
#
# conserver.cf
#
routera:/dev/tty.USA19QW11P1.1:9600p:&:

[bash stephen:/usr/local/etc]cat conserver.passwd
#
# conserver.passwd
#
stephen:*passwd*:any

[bash stephen:/usr/local/etc]cat conserver.rc
#!/bin/sh
#
# Startup for conserver
#

PATH=/usr/bin:/usr/local/bin:/usr/local/sbin

case "$1" in
'start')
echo "Starting console server daemon"
conserver -d
;;

'stop')
master=`ps -ef | grep conserver | awk '$3 == "1"{print $2}'`
[ "$master" ] && kill -TERM $master
;;

*)
echo "Usage: $0 { start | stop }"
;;

esac
exit 0

--

-s
_______________________________________________
users mailing list
users@conserver.com
https://www.conserver.com/mailman/listinfo/users

****************************************************************************
This message is intended for the sole use of the individual and entity to
whom it is addressed, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law. If you are
not the intended addressee, nor authorized to receive for the intended
addressee, you are hereby notified that you may not use, copy, disclose or
distribute to anyone the message or any information contained in the
message. If you have received this message in error, please immediately
advise the sender by reply email and delete the message. Thank you very
much.
Re: macosx 10.2.1, getservbyname: conserver: Undefined error: 0 [ In reply to ]
and, if you don't want to use /etc/services (or equivalent) lookups,
you can use the --with-port=<number> option to configure to hardcode a
port number (--with-port=7777).

Bryan

On Tue, Nov 05, 2002 at 10:30:14AM -0800, Morris, Adam wrote:
> Greetings Stephen,
> You need to add conserver to your /etc/services file (or wherever
> MacOSX keeps it...) That error means that it can't find the port number to
> use for the conserver service.
> I hope that this helps,
> Adam
RE: macosx 10.2.1, getservbyname: conserver: Undefined error: 0 [ In reply to ]
At 10:30 AM -0800 11/5/02, Morris, Adam wrote:
>Greetings Stephen,
> You need to add conserver to your /etc/services file (or wherever
>MacOSX keeps it...) That error means that it can't find the port number to
>use for the conserver service.
>
> Here is the lines from my console server...
>
># Conserver port - Console Server
>console 782/tcp conserver
>
> If you want to format them the same then you should try
>console 782/tcp conserver # Conserver port - Console Server
>
> I hope that this helps,
> Adam

That did help. Thanks.

And if I had more carefully read the FAQ instead of just the INSTALL I would have known this!

I needed to edit conserver.rc because ps on macosx doesn't support -f.

The FAQ also helps partially with my next question

> 6) What does "console: gethostbyname: console: host lookup error"
> mean (or something close to that)?
>
> When the console command was compiled, it was told to use the
> hostname "console" (what came after gethostbyname:) as the master
> conserver host. You'll need to either recompile console with the
> appropriate name of your conserver host or add an alias of "console".
> In most cases, adding an alias is my suggestion.

How do I tell what the appropriate name is of my conserver host?

Or where should the alias be added and what should it look like?

Thanks again!
--

-s
RE: macosx 10.2.1, getservbyname: conserver: Undefined error: 0 [ In reply to ]
At 1:56 PM -0800 11/5/02, Morris, Adam wrote:
>Greetings Stephen,
> You can add an alias to /etc/hosts. That should have lines like
>
>127.0.0.1 localhost
>194.176.68.211 frankenstein.mutant.net frankenstein
>
>If you're only going to use console from the same machine then you can add
>it as an alias to the end of the localhost line.
>
>127.0.0.1 localhost console
>
>The appropriate name would be the name of the machine running the server.
>
>I hope that this helps,
> Adam
>
>p.s. I've never used MacOS X, just various versions of Unix so I'm assuming
>that most of the same functionality is there.

Thanks Adam,

I went to /etc/hosts and in the comments it states that it is only used in single user mode and at other times the information is handled by lookupd which gets information from NetInfo. I'm not familiar with lookupd and Netinfo so I'll need to dig a bit.

--

-s