For me, without tooltalk datbase running, ttsession dangerously was hanging
on kevent(2), hanging a whole X session. Also not good.

Here is how I got it working AKA quick ToolTalk troubleshooting guide.
All of this should apply to Linux and other OS's as well, only commands will
be different.

1. Exit X
2. Kill inetd (service inetd stop)
3. Kill rpcbind (service rpcbind stop)
4. Make sure no rpc.ttdbserver or rpc.cmsd or ttsession process is running 
(ttsession needs to be killed with "kill -9" if hanging on kevent(2)).

5. "rpcinfo -p" should say:

# rpcinfo -p
rpcinfo: can't contact portmapper: RPC: Port mapper failure - RPC: Success

6. Make sure your hostname is in /etc/hosts:

# grep `hostname` /etc/hosts
127.0.0.1               localhost localhost.my.domain poniatowski
# hostname
poniatowski
# 

7. Build ToolTalk example app:

% cd cdesktopenv-code/cde/examples/tt
% make -f Makefile.FreeBSD clean 
rm -f broadcast broadcast.o
% make -f Makefile.FreeBSD 
clang -c  -O -g -I/usr/dt/include -I/usr/local/include broadcast.c
clang -o broadcast  broadcast.o -L/usr/dt/lib -ltt -L/usr/local/lib -lXm 
-L/usr/local/lib -lXt -lX11 

8. Verify types.xdr:

% ls -l /etc/tt/types.xdr 
-rw-r--r--  1 root  wheel  16084 Jul 28  21:23 /etc/tt/types.xdr

9. Verify inetd configuration:

% grep rpc /etc/inetd.conf | grep /usr/dt
cmsd/2-5 dgram rpc/udp4 wait root /usr/dt/bin/rpc.cmsd rpc.cmsd
ttdbserver/1 stream rpc/tcp4 wait root /usr/dt/bin/rpc.ttdbserver 
/usr/dt/bin/rpc.ttdbserver

10. Start rpcbind (service rpcbind start)
11. rpcinfo -p should now say:

% rpcinfo -p
   program vers proto   port  service
    100000    4   tcp    111  rpcbind
    100000    3   tcp    111  rpcbind
    100000    2   tcp    111  rpcbind
    100000    4   udp    111  rpcbind
    100000    3   udp    111  rpcbind
    100000    2   udp    111  rpcbind
    100000    4 local    111  rpcbind
    100000    3 local    111  rpcbind
    100000    2 local    111  rpcbind

12. Start inetd (service inetd start)

13. rpcinfo -p should now say:

% rpcinfo -p
   program vers proto   port  service
    100000    4   tcp    111  rpcbind
    100000    3   tcp    111  rpcbind
    100000    2   tcp    111  rpcbind
    100000    4   udp    111  rpcbind
    100000    3   udp    111  rpcbind
    100000    2   udp    111  rpcbind
    100000    4 local    111  rpcbind
    100000    3 local    111  rpcbind
    100000    2 local    111  rpcbind
    100068    2   udp  47699  cmsd
    100068    3   udp  47699  cmsd
    100068    4   udp  47699  cmsd
    100068    5   udp  47699  cmsd
    100083    1   tcp  43859  ttdbserver

cmsd (calendar daemon) and ttdbserver should be registered.
Their processes (rpc.cmsd rpc.ttdbserver) do not have to run at this point.

14. Start non-CDE X session (anything, the simplest the better, I am using dwm)

15. Verify there are no ToolTalk properties:

% xprop -root | grep TT_SESSION && echo "ToolTalk trash present" || echo "No 
ToolTalk trash"
No ToolTalk trash

16. If you are troubleshooting again and there is some stale TT registration 
(ttsession is not running)
remove the registrations using:

% xprop -root -remove _SUN_TT_SESSION
% xprop -root -remove TT_SESSION 
% xprop -root | grep TT_SESSION && echo "ToolTalk trash present" || echo "No 
ToolTalk trash"
No ToolTalk trash
% 


17. STARTING TOOLTALK

% /usr/dt/bin/ttsession -s
% 

15. Check properties:

% xprop -root TT_SESSION
TT_SESSION(STRING) = "01 66877 1342177279 1 1 169 127.0.0.1 4"

169 is UID of the user

66877 is a PID and should match:

% ps ax |grep ttsession | grep -v grep
66877  2  I      0:00,02 /usr/dt/bin/ttsession -s

1342177279 is the RPC service address.

16. Check rpcinfo -p:

% rpcinfo -p
   program vers proto   port  service
    100000    4   tcp    111  rpcbind
    100000    3   tcp    111  rpcbind
    100000    2   tcp    111  rpcbind
    100000    4   udp    111  rpcbind
    100000    3   udp    111  rpcbind
    100000    2   udp    111  rpcbind
    100000    4 local    111  rpcbind
    100000    3 local    111  rpcbind
    100000    2 local    111  rpcbind
    100068    2   udp  47699  cmsd
    100068    3   udp  47699  cmsd
    100068    4   udp  47699  cmsd
    100068    5   udp  47699  cmsd
    100083    1   tcp  43859  ttdbserver
1342177279    4   tcp  29536
1342177279    1   tcp  29536

ttdbserver must be present - if it is not, check the /var/log/messages if it is 
crashing

1342177279 should be the RPC service address from the ttsession

It should now listen on TCP port 29536:

% nc -v localhost 29536
nc: connect to localhost port 29536 (tcp) failed: Connection refused
Connection to localhost 29536 port [tcp/*] succeeded!
^C

If you have than two entries like 1342177279 (four, six)... this means
stale tooltalk sessions are registered with RPC.
Remove them with "rpcinfo -d" or better yet restart troubleshooting
- back to point 1.

17. At this point ttsession should be assumed healthy. Start "broadcast" to 
verify:

% cd cdesktopenv-code/cde/examples/tt
% ./broadcast

A ToolTalk Sample 1 X11 window should open

If it does not pop up, or just hangs - something of the above is wrong.

There should be to sliders:
- "Send" with value 0
- "Received:" with value 0
and a button "Broadcast"

Shift "Send" to 5
Press "Broadcast"

"Send" and "Received" should jump to 6

Congratulations! ToolTalk is running.

18. Exit X
19. stop inetd
20. stop rpcbind
21. make sure no rpc.cmsd or rpc.ttdbserver processes are running.

22. start rpcbind
23. start inetd

startx /usr/dt/bin/Xsession

Must work at this point :)

Marcina Cieślak

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel

Reply via email to