Mark,
On 01/09/2015 03:25 PM, Mark Johnston wrote:
> Ok on logging, thanks. Sadly, zip happens in the log even DEBUG level
> BUT I wanted to know how to set log level and you 'delivered'. I should
> have just searched ros wiki for that one but again, thanks. I have
> wanted DEBUG in the past, just never dug in yet. Lot of stuff in ROS.
>
> On a little more using netstat -l -p I see that in fact I do have port
> 9090 open BUT it seems no process hanging on the socket listen that 'cares'
> Proto Recv-Q Send-Q Local Address Foreign Address
> State PID/Program name
> tcp 0 0 *:9090 *:*
> LISTEN -
>
> Above seems highly suspicious of a grave issue.
That seems OK to me. To see what program is listening on that port you
may try the following
lsof | grep 9090 | less
It's not possible that port would be open but nothing there to listen.
It could be broken daemon but that should be evident some other way.
You may restart the listening daemon or try to setup debugging session
like this:
infile=/tmp/inflow.$$
outfile=/tmp/outflow.$$
bpipe=/tmp/backpipe.$$
debug_port=8080
port=9090
export infile outfile bpipe debug_port port
start the following command on the server side; all on one command line:
nc -l -p $debug_port < $bpipe | tee -a $infile | nc localhost $port |
tee -a $outfile > $bpipe
From your client side send a request with whatever app you are using,
to server side on $debug_port that will be redirected to your server
daemon and captured into a file at the same time. The nc command will
terminate after each connection.
I tested it with connection to the webserver using appropriate ports as
I do not have ROS system running.
You may inject desired string to netcat from client side as well. Open
two terminals, one for listening on the server side using the above
command, and one for emulating the client:
echo "some string" | nc localhost $debug_port
There are variations on how to use netcat with pipes etc. see man pages ...
I hope it helps.
--
Rafael