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

ERROR: [ttyb] tcgetattr(/dev/term/b(6)): Timer expired: forcing down

Netcool Netcool leo.netcool@gmail.com
Tue, 27 Sep 2005 13:06:48 -0700 (PDT)


Hi,

I need to read from a serial port (and redirect to a soket), in raw mode.

I have setup the tty in conserver.cf as:

console ttyb {
        type device;
        device /dev/term/b;
        protocol raw;
        baud 9600;
        parity odd;
        options cstopb;
}

However, I am getting the following error in the daemon:

[Tue Sep 27 15:52:39 2005] conserver (19612): ERROR: [ttyb]
tcgetattr(/dev/term/b(6)): Timer expired: forcing down

the console shows:
bash-2.05# /usr/local/bin/console -D ttyb
console: DEBUG: [cutil.c:2203] ProbeInterfaces(): ifc_len==64 max_count==2
console: DEBUG: [cutil.c:2242] ProbeInterfaces(): name=lo0 addr=127.0.0.1
console: DEBUG: [cutil.c:2242] ProbeInterfaces(): name=bge0 addr=192.1.1.12
console: DEBUG: [cutil.c:354] AllocString(): 0x33898 created string #3
console: DEBUG: [cutil.c:354] AllocString(): 0x338b8 created string #4
console: DEBUG: [cutil.c:354] AllocString(): 0x338d8 created string #5
console: DEBUG: [console.c:520] GetPort: hostname=netcool (netcool),
ip=192.1.1.12, port=5000

and with -u, nothing... it just stays there...

bash-2.05# /usr/local/bin/console -Du
console: DEBUG: [cutil.c:2203] ProbeInterfaces(): ifc_len==64 max_count==2
console: DEBUG: [cutil.c:2242] ProbeInterfaces(): name=lo0 addr=127.0.0.1
console: DEBUG: [cutil.c:2242] ProbeInterfaces(): name=bge0 addr=192.1.1.12
console: DEBUG: [cutil.c:354] AllocString(): 0x33898 created string #3
console: DEBUG: [cutil.c:354] AllocString(): 0x338b8 created string #4
console: DEBUG: [cutil.c:354] AllocString(): 0x338d8 created string #5
console: DEBUG: [console.c:520] GetPort: hostname=netcool (netcool),
ip=192.1.1.12, port=5000

I really don't know what could be wrong. Of course, I CAN access the
serial port using tip or cat < /dev/term/b...

ah! I am running everycommand as root.

Below are the files needed, including log files in debug mode.

Thanks for any help and pointer You could give me.

Regards,

Leo

$ cat conserver.cf
### set up global access
default full    { rw *; }

### set up some custom break sequences
break 4 { string "+\d+\d+"; delay 300; }
break 5 { string "\033c"; }

### set the defaults for all the consoles
# these get applied before anything else
default * {
        # The '&' character is substituted with the console name
        logfile /var/log/&;
        # timestamps every hour with activity and break logging
        timestamp 1hab;
        # include the 'full' default
        include full;
        # master server is localhost
        master localhost;
}

# connect to /dev/ttyb
console ttyb {
        type device;
        device /dev/term/b;
        protocol raw;
        baud 9600;
        parity odd;
        options cstopb;
}

### define a group of users
group sysadmin {
    users root, netcool;
}

### list of clients we allow
access * {
        allowed netcool;
        allowed 10.0.0.0/8 192.168.0.0/16;
        trusted 127.0.0.1;
}
$ cat conserver.passwd
*any*:*passwd*
$ cat conserver_daemon_debug.txt
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [cutil.c:354]
AllocString(): 0x4e418 created string #1
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [cutil.c:354]
AllocString(): 0x4e438 created string #2
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [cutil.c:354]
AllocString(): 0x4e458 created string #3
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [main.c:1343]
main(): bind address set to `0.0.0.0'
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [cutil.c:2203]
ProbeInterfaces(): ifc_len==64 max_count==2
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [cutil.c:2242]
ProbeInterfaces(): name=lo0 addr=127.0.0.1
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [cutil.c:2242]
ProbeInterfaces(): name=bge0 addr=192.1.1.12
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [cutil.c:354]
AllocString(): 0x4e478 created string #4
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [cutil.c:354]
AllocString(): 0x4e498 created string #5
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [cutil.c:354]
AllocString(): 0x4e4b8 created string #6
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [cutil.c:354]
AllocString(): 0x4e4d8 created string #7
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [cutil.c:354]
AllocString(): 0x4e4f8 created string #8
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [cutil.c:354]
AllocString(): 0x4e518 created string #9
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [cutil.c:354]
AllocString(): 0x4e538 created string #10
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [cutil.c:354]
AllocString(): 0x4e558 created string #11
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [cutil.c:354]
AllocString(): 0x4e578 created string #12
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [cutil.c:354]
AllocString(): 0x4e598 created string #13
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [cutil.c:2856]
ReadCfg(): got keyword 'default' [/usr/local/etc/conserver.cf:1]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [readcfg.c:774]
DefaultBegin(full) [/usr/local/etc/conserver.cf: 2]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [cutil.c:2939]
got keyword 'rw' [/usr/local/etc/conserver.cf:2]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [readcfg.c:1994]
DefaultItemRw(*) [/usr/local/etc/conserver.cf:2]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [readcfg.c:1952]
ProcessRoRw(*) [/usr/local/etc/conserver.cf:2]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [readcfg.c:801]
DefaultEnd() [/usr/local/etc/conserver.cf:2]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [cutil.c:2856]
ReadCfg(): got keyword 'break' [/usr/local/etc/conserver.cf:2]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [readcfg.c:188]
BreakBegin(4) [/usr/local/etc/conserver.cf:5]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [cutil.c:354]
AllocString(): 0x4e5b8 created string #14
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [cutil.c:2939]
got keyword 'string' [/usr/local/etc/conserver.cf:5]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [readcfg.c:268]
BreakItemString(+\d+\d+) [/usr/local/etc/conserver.cf:5]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [cutil.c:2939]
got keyword 'delay' [/usr/local/etc/conserver.cf:5]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [readcfg.c:286]
BreakItemDelay(300) [/usr/local/etc/conserver.cf:5]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [readcfg.c:211]
BreakEnd() [/usr/local/etc/conserver.cf:5]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [cutil.c:2856]
ReadCfg(): got keyword 'break' [/usr/local/etc/conserver.cf:5]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [readcfg.c:188]
BreakBegin(5) [/usr/local/etc/conserver.cf:6]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [cutil.c:2939]
got keyword 'string' [/usr/local/etc/conserver.cf:6]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [readcfg.c:268]
BreakItemString(\033c) [/usr/local/etc/conserver.cf:6]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [readcfg.c:211]
BreakEnd() [/usr/local/etc/conserver.cf:6]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [cutil.c:2856]
ReadCfg(): got keyword 'default' [/usr/local/etc/conserver.cf:6]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [readcfg.c:774]
DefaultBegin(*) [/usr/local/etc/conserver.cf: 10]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [cutil.c:2939]
got keyword 'logfile' [/usr/local/etc/conserver.cf:10]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [readcfg.c:1382]
DefaultItemLogfile(/var/log/&) [/usr/local/etc/conserver.cf:12]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [cutil.c:2939]
got keyword 'timestamp' [/usr/local/etc/conserver.cf:12]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [readcfg.c:2143]
DefaultItemTimestamp(1hab) [/usr/local/etc/conserver.cf:14]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [readcfg.c:2102]
ProcessTimestamp(): mark spec of `1' parsed: factor=3600, value=3600,
activity=1, bactivity=1
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [cutil.c:2939]
got keyword 'include' [/usr/local/etc/conserver.cf:14]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [readcfg.c:1287]
DefaultItemInclude(full) [/usr/local/etc/conserver.cf:16]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [cutil.c:2939]
got keyword 'master' [/usr/local/etc/conserver.cf:16]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [readcfg.c:1510]
DefaultItemMaster(localhost) [/usr/local/etc/conserver.cf:18]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [readcfg.c:801]
DefaultEnd() [/usr/local/etc/conserver.cf:18]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [cutil.c:2856]
ReadCfg(): got keyword 'console' [/usr/local/etc/conserver.cf:19]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [readcfg.c:2201]
ConsoleBegin(ttyb) [/usr/local/etc/conserver.cf:22]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [cutil.c:2939]
got keyword 'type' [/usr/local/etc/conserver.cf:22]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [readcfg.c:3611]
ConsoleItemType(device) [/usr/local/etc/conserver.cf:23]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [cutil.c:2939]
got keyword 'device' [/usr/local/etc/conserver.cf:23]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [readcfg.c:3272]
ConsoleItemDevice(/dev/term/b) [/usr/local/etc/conserver.cf:24]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [cutil.c:2939]
got keyword 'protocol' [/usr/local/etc/conserver.cf:24]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [readcfg.c:3551]
ConsoleItemProtocol(raw) [/usr/local/etc/conserver.cf:25]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [cutil.c:2939]
got keyword 'baud' [/usr/local/etc/conserver.cf:25]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [readcfg.c:3248]
ConsoleItemBaud(9600) [/usr/local/etc/conserver.cf:26]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [cutil.c:2939]
got keyword 'parity' [/usr/local/etc/conserver.cf:26]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [readcfg.c:3479]
ConsoleItemParity(odd) [/usr/local/etc/conserver.cf:27]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [cutil.c:2939]
got keyword 'options' [/usr/local/etc/conserver.cf:27]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [readcfg.c:3467]
ConsoleItemOptions(cstopb) [/usr/local/etc/conserver.cf:28]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [readcfg.c:2236]
ConsoleEnd() [/usr/local/etc/conserver.cf:28]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [cutil.c:2856]
ReadCfg(): got keyword 'group' [/usr/local/etc/conserver.cf:29]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [readcfg.c:372]
GroupBegin(sysadmin) [/usr/local/etc/conserver.cf:32]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [cutil.c:354]
AllocString(): 0x4e5d8 created string #15
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [cutil.c:2939]
got keyword 'users' [/usr/local/etc/conserver.cf:32]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [readcfg.c:502]
GroupItemUsers(root, netcool) [/usr/local/etc/conserver.cf:33]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [readcfg.c:396]
GroupEnd() [/usr/local/etc/conserver.cf:33]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [cutil.c:2856]
ReadCfg(): got keyword 'access' [/usr/local/etc/conserver.cf:34]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [readcfg.c:3732]
AccessBegin(*) [/usr/local/etc/conserver.cf:37]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [cutil.c:354]
AllocString(): 0x4e618 created string #16
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [cutil.c:2939]
got keyword 'allowed' [/usr/local/etc/conserver.cf:37]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [readcfg.c:4062]
AccessItemAllowed(netcool) [/usr/local/etc/conserver.cf:38]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [cutil.c:2939]
got keyword 'allowed' [/usr/local/etc/conserver.cf:38]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [readcfg.c:4062]
AccessItemAllowed(10.0.0.0/8 192.168.0.0/16)
[/usr/local/etc/conserver.cf:39]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [cutil.c:2939]
got keyword 'trusted' [/usr/local/etc/conserver.cf:39]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [readcfg.c:4086]
AccessItemTrusted(127.0.0.1) [/usr/local/etc/conserver.cf:40]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [readcfg.c:3757]
AccessEnd() [/usr/local/etc/conserver.cf:40]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [readcfg.c:240]
BreakDestroy() [/usr/local/etc/conserver.cf:41]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [cutil.c:328]
DestroyString(): 0x4e5b8 string destroyed (count==15)
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [readcfg.c:434]
GroupDestroy() [/usr/local/etc/conserver.cf:41]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [readcfg.c:328]
DestroyParserGroup(): sysadmin
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [cutil.c:328]
DestroyString(): 0x4e5d8 string destroyed (count==14)
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [readcfg.c:845]
DefaultDestroy() [/usr/local/etc/conserver.cf:41]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [readcfg.c:542]
DestroyParserDefaultOrConsole(): full
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [readcfg.c:542]
DestroyParserDefaultOrConsole(): *
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [readcfg.c:2904]
ConsoleDestroy() [/usr/local/etc/conserver.cf:41]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [cutil.c:354]
AllocString(): 0x4e5b8 created string #15
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [cutil.c:354]
AllocString(): 0x4e5d8 created string #16
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [readcfg.c:3803]
AccessDestroy() [/usr/local/etc/conserver.cf:41]
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [readcfg.c:3841]
AccessDestroy(): adding ACL `*'
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [cutil.c:328]
DestroyString(): 0x4e618 string destroyed (count==15)
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [readcfg.c:3672]
DestroyParserAccess(): *
[Tue Sep 27 15:52:24 2005] conserver (19611): DEBUG: [readcfg.c:4247]
ConfigDestroy() [/usr/local/etc/conserver.cf:41]
[Tue Sep 27 15:52:24 2005] conserver (19612): DEBUG: [cutil.c:354]
AllocString(): 0x4e5f8 created string #16
[Tue Sep 27 15:52:24 2005] conserver (19612): DEBUG: [cutil.c:934]
FileOpen(): opened `/var/log/ttyb' as fd 5
[Tue Sep 27 15:52:24 2005] conserver (19612): DEBUG: [cutil.c:354]
AllocString(): 0x4e638 created string #17
[Tue Sep 27 15:52:24 2005] conserver (19612): DEBUG: [cutil.c:1191]
FileWrite(): sending `[-- ' to fd 5
[Tue Sep 27 15:52:24 2005] conserver (19612): DEBUG: [cutil.c:1191]
FileWrite(): sending `Console up' to fd 5
[Tue Sep 27 15:52:24 2005] conserver (19612): DEBUG: [cutil.c:1187]
FileWrite(): sending ` -- Tue Sep 27 15:52:24 2005]^M'... to fd 5
[Tue Sep 27 15:52:24 2005] conserver (19612): DEBUG: [cutil.c:1346]
FileWrite(): wrote 45 bytes to fd 5
[Tue Sep 27 15:52:24 2005] conserver (19612): DEBUG: [cutil.c:354]
AllocString(): 0x4e658 created string #18
[Tue Sep 27 15:52:24 2005] conserver (19612): DEBUG: [cutil.c:780]
FileOpenFD(): encapsulated fd 6 type 0
[Tue Sep 27 15:52:25 2005] conserver (19611): DEBUG: [cutil.c:354]
AllocString(): 0x4e5f8 created string #16
[Tue Sep 27 15:52:25 2005] conserver (19611): DEBUG: [cutil.c:354]
AllocString(): 0x4e638 created string #17
[Tue Sep 27 15:52:25 2005] conserver (19611): DEBUG: [cutil.c:354]
AllocString(): 0x4e658 created string #18
[Tue Sep 27 15:52:25 2005] conserver (19611): DEBUG: [cutil.c:354]
AllocString(): 0x4e678 created string #19
[Tue Sep 27 15:52:39 2005] conserver (19612): ERROR: [ttyb]
tcgetattr(/dev/term/b(6)): Timer expired: forcing down
[Tue Sep 27 15:52:39 2005] conserver (19612): DEBUG: [cutil.c:1025]
FileClose(): closed fd 6
[Tue Sep 27 15:52:39 2005] conserver (19612): DEBUG: [cutil.c:328]
DestroyString(): 0x4e658 string destroyed (count==17)
[Tue Sep 27 15:52:39 2005] conserver (19612): DEBUG: [cutil.c:1191]
FileWrite(): sending `[-- ' to fd 5
[Tue Sep 27 15:52:39 2005] conserver (19612): DEBUG: [cutil.c:1191]
FileWrite(): sending `Console down' to fd 5
[Tue Sep 27 15:52:39 2005] conserver (19612): DEBUG: [cutil.c:1187]
FileWrite(): sending ` -- Tue Sep 27 15:52:39 2005]^M'... to fd 5
[Tue Sep 27 15:52:39 2005] conserver (19612): DEBUG: [cutil.c:1346]
FileWrite(): wrote 47 bytes to fd 5
[Tue Sep 27 15:52:39 2005] conserver (19612): DEBUG: [cutil.c:1025]
FileClose(): closed fd 5
[Tue Sep 27 15:52:39 2005] conserver (19612): DEBUG: [cutil.c:328]
DestroyString(): 0x4e5f8 string destroyed (count==16)
[Tue Sep 27 15:52:39 2005] conserver (19612): DEBUG: [cutil.c:354]
AllocString(): 0x4e658 created string #17
[Tue Sep 27 15:52:39 2005] conserver (19612): DEBUG: [cutil.c:354]
AllocString(): 0x4e5f8 created string #18
[Tue Sep 27 15:52:39 2005] conserver (19612): DEBUG: [cutil.c:354]
AllocString(): 0x4e698 created string #19
[Tue Sep 27 15:52:39 2005] conserver (19612): DEBUG: [cutil.c:354]
AllocString(): 0x4e6b8 created string #20
[Tue Sep 27 15:52:39 2005] conserver (19612): DEBUG: [cutil.c:354]
AllocString(): 0x4e6d8 created string #21
[Tue Sep 27 15:52:39 2005] conserver (19612): DEBUG: [cutil.c:354]
AllocString(): 0x4e6f8 created string #22
[Tue Sep 27 15:52:39 2005] conserver (19612): DEBUG: [group.c:4358]
Kiddie(): select timeout of 45 seconds

--- end of file...