make all
/opt/confd//bin/confdc --fail-on-warnings -c -o ports.fxs ports.yang
/opt/confd//bin/confdc --emit-h ports.h ports.fxs
cc -c -o portstatus.o portstatus.c -Wall -g -I/opt/confd//include -DLinux
cc -o portstatus portstatus.o /opt/confd//lib/libconfd.a -lpthread -lm
mkdir -p ./confd-cdb
cp /opt/confd//var/confd/cdb/aaa_init.xml ./confd-cdb
ln -s /opt/confd//etc/confd/ssh ssh-keydir
Build complete
root@mars01> make start
Killing any confd daemon and portstatus daemon
/opt/confd//bin/confd --stop || true
killall portstatus || true
portstatus: no process found
/opt/confd//bin/confd -c confd.conf --addloadpath /opt/confd//etc/confd
* In another terminal window, run queries
(try ‘make query’ for an example)
* In this window, the portstatus daemon now starts:
./portstatus
TRACE Connected (maapi) to ConfD
TRACE MAAPI_LOAD_ALL_NS
TRACE MAAPI_LOAD_HASH_DB
TRACE Connected (dp) to ConfD
TRACE Received daemon id 0
TRACE Connected (dp) to ConfD
TRACE Picked up old user session: 10 for user:system ctx:system
TRACE Picked up old user session: 1 for user:system ctx:system
stuck up at poll system call -> (poll(set, sizeof(set)/sizeof(set[0]), -1) < 0)
Added timeout for 5secs and it went on polling for every 5 secs.
Can anyone tell us whats the problem here.
And this had worked for the first time, from second time onwards this problem is seen.
The old user session message indicates that your portstatus daemon has reconnected to a ConfD daemon that is already running.
Try “make stop” to stop the confd daemon and run “confd --status” to insure that the confd daemon is indeed no longer running. Then run “make clean all start” to start the entire project again and see if this works.
/opt/confd//bin/confd --stop || true
connection refused (stop)
killall portstatus || true
portstatus: no process found
/opt/confd//bin/confd -c confd.conf --addloadpath /opt/confd//etc/confd
* In another terminal window, run queries
(try ‘make query’ for an example)
* In this window, the portstatus daemon now starts:
./portstatus
TRACE Connected (maapi) to ConfD
TRACE MAAPI_LOAD_ALL_NS
TRACE MAAPI_LOAD_HASH_DB
TRACE Connected (dp) to ConfD
TRACE Received daemon id 0
TRACE Connected (dp) to ConfD
TRACE Picked up old user session: 10 for user:system ctx:system
TRACE Picked up old user session: 1 for user:system ctx:system
The output from your devel.log looks fine at this point. The poll call inside of main( ) in the portstatus daemon should be waiting for the file descriptions to become ready to perform I/O. Is this wait that is happening what you meant by “stuck up”?
The same procedure will also work with what you are calling the normal flow as shown in the following output:
localhost:find_next $ make clean all start
rm -rf \
*.o *.a *.xso *.fxs *.xsd *.ccl \
*_proto.h \
./confd-cdb *.db aaa_cdb.* \
rollback*/rollback{0..999} rollback{0..999} \
host.key host.cert ssh-keydir \
*.log confderr.log.* \
etc *.access \
running.invalid global.data _tmp*
rm -rf ports.h portstatus 2> /dev/null || true
$CONFD_DIR/bin/confdc --fail-on-warnings -c -o ports.fxs ports.yang
$CONFD_DIR/bin/confdc --emit-h ports.h ports.fxs
cc -c -o portstatus.o portstatus.c -Wall -g -I$CONFD_DIR/include -I/opt/local/include -DDarwin
cc -o portstatus portstatus.o $CONFD_DIR/lib/libconfd.a -lpthread -lm -L/opt/local/lib
mkdir -p ./confd-cdb
cp $CONFD_DIR/var/confd/cdb/aaa_init.xml ./confd-cdb
ln -s $CONFD_DIR/etc/confd/ssh ssh-keydir
Build complete
### Killing any confd daemon and portstatus daemon
$CONFD_DIR/bin/confd --stop || true
killall portstatus || true
No matching processes belonging to you were found
$CONFD_DIR/bin/confd -c confd.conf --addloadpath $CONFD_DIR/etc/confd
### * In another terminal window, run queries
### (try 'make query' for an example)
### * In this window, the portstatus daemon now starts:
./portstatus
TRACE Connected (maapi) to ConfD
TRACE MAAPI_LOAD_ALL_NS
TRACE MAAPI_LOAD_HASH_DB
TRACE Connected (dp) to ConfD
TRACE Received daemon id 0
TRACE Connected (dp) to ConfD
TRACE Picked up old user session: 10 for user:system ctx:system
TRACE Picked up old user session: 1 for user:system ctx:system
^Z
[1]+ Stopped make clean all start
localhost:find_next waitai1$ bg
[1]+ make clean all start &
localhost:find_next $ make cli-c
$CONFD_DIR/bin/confd_cli --user=admin --groups=admin \
--interactive || echo Exit
Welcome to ConfD Basic
The CLI may only be used during product development.
Commercial use of the CLI is prohibited.
You must disable the CLI in confd.conf for production.
For more information, visit http://www.tail-f.com.
admin connected from 127.0.0.1 using console on localhost
localhost# show port
SLOT PORT STATUS
----------------------
1 0 disabled
1 1 active
1 2 error
2 1 disabled
2 2 active
4 0 error
4 2 disabled
localhost#
Based on the discussion of this thread so far, the symptom of your problem is still not very clear. Can you expand on what you are actually experiencing and the accompanied devel.log output with the trace level enabled?