Project

General

Profile

Bug #22

[Client/Server] Debug Log

Added by Anonymous almost 9 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
fixed

Description

After some tests,
It seems to be impossible to display Debug Log in Client/Serveur mode.

History

#1 Updated by rdnzl almost 9 years ago

I use it all the time, do you only miss the debug log, or do the others (speak and program) also don't work?

Is UDP broadcast enabled? (under settings, XMLRPC)

If you already had it enabled what does your startup log say?

2010/02/15 12:01:38 XML-RPC server listening on Port 9009
2010/02/15 12:01:38 UDP Broadcasts are enabled on Port 19009

#2 Updated by Anonymous almost 9 years ago

I only miss the debug log in Client, I don't have any speak so I can't say for this one and I've some logs for program.

Client and Server are on the same server.

From server log:

2010/02/15 14:02:50 XML-RPC server listening on Port 9009
2010/02/15 14:02:50 UDP Broadcasts are enabled on Port 19009

From Client log:
2010/02/15 14:05:33 This DomotiGa instance is running in client/server mode.
2010/02/15 14:05:33 The XMLRPC server URL is 'http://localhost:9009/'
2010/02/15 14:05:33 Broadcast UDP Client enabled.
2010/02/15 14:05:33 UDP client listening on port 19009

Debug tab of client is desesperatly empty.

#3 Updated by rdnzl almost 9 years ago

Which version of Gambas are you running, it's should be one the latest version 2.19. Which Linux version/distro are you using? When your GUI client runs please check if it's listening by doing:

$ netstat -an |grep 19009
udp        0      0 0.0.0.0:19009           0.0.0.0:*

You should see the same result.

#4 Updated by Anonymous almost 9 years ago

I use a Fedora release 12 (Constantine) with Gambas 2.19

I test GUI Client and everything seems to be ok about udp:


netstat -an |grep 19009
udp        0      0 0.0.0.0:19009               0.0.0.0:*

#5 Updated by rdnzl almost 9 years ago

$ sudo tcpdump port 19009
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
17:22:56.625993 IP server.domain.nl.54301 > 192.168.1.255.19009: UDP, length 14
17:22:56.825616 IP server.domain.nl.43215 > 192.168.1.255.19009: UDP, length 14
17:22:59.259322 IP server.domain.nl.41634 > 192.168.1.255.19009: UDP, length 14
17:22:59.449716 IP server.domain.nl.44635 > 192.168.1.255.19009: UDP, length 14

And if you check with tcpdump?

#6 Updated by Anonymous almost 9 years ago

Ok then, everything is suddenly clear.

I use an Online Server to run DomotiGa.
My rfxcom is connected on the web and send data to DomotiGa over the Web.

So, Broadcast is not possible (everybody on the web is not interested by my debug log ^^ )

I will try to re-route UDP to localhost.

If, maybe, you could change UDP to a TCP - Client / Server Mode, it would be wonderful ;)

#7 Updated by rdnzl almost 9 years ago

  • Resolution set to invalid

I have to think about a way to do this.

#8 Updated by Anonymous almost 9 years ago

I solve my problem and made a change in Main.module (BroadcastEvent) to be more dynamic about broadcast adress :

  ' [[BroadCast]] IP
  SHELL "/sbin/ifconfig | grep Bcast |awk -F':' '{print $3}'|awk '{print $1}'" TO sHost
  aIPs = Split(Trim$(sHost), " ")
  FOR EACH sIP IN aIPs
    athisIP = Split(sIP, ".")
    IF CInt(athisIPr0) = 127 THEN CONTINUE
    hBroadcastEvent.TargetHost = athisIPr0 & "." & athisIPr1 & "." & athisIPr2 & "." & athisIPr3
    aIPBdCast = hBroadcastEvent.TargetHost
    WRITE #hBroadcastEvent, sMessage, Len(sMessage)
  NEXT

I change my broadcast ip to be the same as my IP and everything work like a charm.

#9 Updated by rdnzl almost 9 years ago

  • Status changed from Closed to Feedback
  • Resolution deleted (invalid)

What does hostname -i return on your server?

hostname -i
127.0.1.1 192.168.1.61

#10 Updated by Anonymous almost 9 years ago

hostname -i return my public ip adress only.

#11 Updated by rdnzl almost 9 years ago

  • Status changed from Feedback to Closed
  • Resolution set to fixed

The broadcast addresses now only get looked for at startup, not at every UDP packets broadcast.

Also available in: Atom PDF