Sunday, November 23, 2008

Where is the log file of Eclipse TPTP Agent Controller?

I have a problem to use the integrated agent controller, which RAServer.sh reported that it has actually been running. Still finding and just learned that the logs are available at:

$TPTP_AC_HOME/config/servicelog.log

yc

Wednesday, November 12, 2008

Firefox works offline due to NetworkManager interfaces being inactive

There's one improvement in Ubuntu 8.10 which is causing me some problems - NetworkManager can now detect my HSDPA. But it doesn't work and here's the log:

Nov 12 22:32:40 kimmy pppd[9724]: Plugin /usr/lib/pppd/2.4.4/nm-pppd-plugin.so loaded.
Nov 12 22:32:40 kimmy pppd[9724]: pppd 2.4.4 started by root, uid 0
Nov 12 22:32:40 kimmy pppd[9724]: Using interface ppp0
Nov 12 22:32:40 kimmy pppd[9724]: Connect: ppp0 <--> /dev/ttyUSB0
Nov 12 22:32:40 kimmy NetworkManager: (ttyUSB0): device state change: 5 -> 6
Nov 12 22:32:40 kimmy pppd[9724]: CHAP authentication succeeded
Nov 12 22:32:40 kimmy pppd[9724]: CHAP authentication succeeded
Nov 12 22:32:40 kimmy NetworkManager: (ttyUSB0): device state change: 6 -> 7
Nov 12 22:32:40 kimmy kernel: [ 2143.619828] PPP BSD Compression module registered
Nov 12 22:32:40 kimmy kernel: [ 2143.681813] PPP Deflate Compression module registered
Nov 12 22:32:42 kimmy pppd[9724]: Modem hangup
Nov 12 22:32:42 kimmy NetworkManager: (ttyUSB0): device state change: 7 -> 9
Nov 12 22:32:42 kimmy NetworkManager: [1226500362.016832] nm_serial_device_close(): Closing device 'ttyUSB0'
Nov 12 22:32:42 kimmy pppd[9724]: Connection terminated.


Then, the supposingly working gnome-ppp will start hanging up too and in order to bring it back to live, I have to run the vodafone-mobile-connect-card-driver-for-linux:

Nov 12 22:34:03 kimmy pppd[9843]: pppd 2.4.4 started by yclian, uid 1000
Nov 12 22:34:03 kimmy pppd[9843]: using channel 7
Nov 12 22:34:03 kimmy pppd[9843]: Using interface ppp0
Nov 12 22:34:03 kimmy pppd[9843]: Connect: ppp0 <--> /dev/ttyUSB0
Nov 12 22:34:03 kimmy pppd[9843]: Warning - secret file /etc/ppp/pap-secrets has world and/or group access
Nov 12 22:34:03 kimmy pppd[9843]: sent [LCP ConfReq id=0x1 ]
Nov 12 22:34:03 kimmy pppd[9843]: rcvd [LCP ConfReq id=0x12 ]
Nov 12 22:34:03 kimmy pppd[9843]: sent [LCP ConfRej id=0x12 ]
Nov 12 22:34:03 kimmy pppd[9843]: rcvd [LCP ConfAck id=0x1 ]
Nov 12 22:34:03 kimmy pppd[9843]: rcvd [LCP ConfReq id=0x13 ]
Nov 12 22:34:03 kimmy pppd[9843]: sent [LCP ConfAck id=0x13 ]
Nov 12 22:34:03 kimmy pppd[9843]: sent [LCP EchoReq id=0x0 magic=0x0]
Nov 12 22:34:03 kimmy pppd[9843]: rcvd [LCP DiscReq id=0x14 magic=0xe0777e]
Nov 12 22:34:03 kimmy pppd[9843]: rcvd [CHAP Challenge id=0x1 <5053860912aec751b049750c32c838e8>, name = "UMTS_CHAP_SRVR"]
Nov 12 22:34:03 kimmy pppd[9843]: Warning - secret file /etc/ppp/chap-secrets has world and/or group access
Nov 12 22:34:03 kimmy pppd[9843]: sent [CHAP Response id=0x1 <2fb0aedcf34cb0db311ad1a157c5be04>, name = "admin"]
Nov 12 22:34:03 kimmy pppd[9843]: rcvd [LCP EchoRep id=0x0 magic=0xe0777e 00 00 00 00]
Nov 12 22:34:03 kimmy pppd[9843]: rcvd [CHAP Success id=0x1 ""]
Nov 12 22:34:03 kimmy pppd[9843]: CHAP authentication succeeded
Nov 12 22:34:03 kimmy pppd[9843]: CHAP authentication succeeded
...
Nov 12 22:34:08 kimmy pppd[9843]: local IP address 121.120.201.243
Nov 12 22:34:08 kimmy pppd[9843]: remote IP address 10.64.64.64
Nov 12 22:34:08 kimmy pppd[9843]: primary DNS address 58.71.136.10
Nov 12 22:34:08 kimmy pppd[9843]: secondary DNS address 58.71.132.10
Nov 12 22:34:08 kimmy pppd[9843]: Script /etc/ppp/ip-up started (pid 9845)

Now, disconnecting it again, connecting with gnome-ppp will start working:

Nov 12 22:34:24 kimmy pppd[9936]: pppd 2.4.4 started by yclian, uid 1000
Nov 12 22:34:24 kimmy pppd[9936]: using channel 8
Nov 12 22:34:24 kimmy pppd[9936]: Using interface ppp0
Nov 12 22:34:24 kimmy pppd[9936]: Connect: ppp0 <--> /dev/ttyUSB0
Nov 12 22:34:24 kimmy pppd[9936]: Warning - secret file /etc/ppp/pap-secrets has world and/or group access
Nov 12 22:34:24 kimmy pppd[9936]: sent [LCP ConfReq id=0x1 ]
Nov 12 22:34:24 kimmy pppd[9936]: rcvd [LCP ConfReq id=0x15 ]
Nov 12 22:34:24 kimmy pppd[9936]: sent [LCP ConfRej id=0x15 ]
Nov 12 22:34:24 kimmy pppd[9936]: rcvd [LCP ConfAck id=0x1 ]
Nov 12 22:34:24 kimmy pppd[9936]: rcvd [LCP ConfReq id=0x16 ]
Nov 12 22:34:24 kimmy pppd[9936]: sent [LCP ConfAck id=0x16 ]
Nov 12 22:34:24 kimmy pppd[9936]: sent [LCP EchoReq id=0x0 magic=0x0]
Nov 12 22:34:24 kimmy pppd[9936]: rcvd [LCP DiscReq id=0x17 magic=0xe0cb68]
Nov 12 22:34:24 kimmy pppd[9936]: rcvd [CHAP Challenge id=0x1 <7c2c8c8e00cabc94481272f65eb30ebb>, name = "UMTS_CHAP_SRVR"]
Nov 12 22:34:24 kimmy pppd[9936]: Warning - secret file /etc/ppp/chap-secrets has world and/or group access
Nov 12 22:34:24 kimmy pppd[9936]: sent [CHAP Response id=0x1 , name = "maxis"]
Nov 12 22:34:24 kimmy pppd[9936]: rcvd [LCP EchoRep id=0x0 magic=0xe0cb68 00 00 00 00]
Nov 12 22:34:24 kimmy pppd[9936]: rcvd [CHAP Success id=0x1 ""]
Nov 12 22:34:24 kimmy pppd[9936]: CHAP authentication succeeded
Nov 12 22:34:24 kimmy pppd[9936]: CHAP authentication succeeded
...
Nov 12 22:34:27 kimmy pppd[9936]: local IP address 121.120.187.27
Nov 12 22:34:27 kimmy pppd[9936]: remote IP address 10.64.64.64
Nov 12 22:34:27 kimmy pppd[9936]: primary DNS address 58.71.136.10
Nov 12 22:34:27 kimmy pppd[9936]: secondary DNS address 58.71.132.10
Nov 12 22:34:27 kimmy pppd[9936]: Script /etc/ppp/ip-up started (pid 9938)

That's not annoying enough. NetworkManager now marks my network as inactive unless I'm connected either to eth0 or wifi0, which I did not have to do in the past. The consequence? Every time when I start Firefox, it works offline.

I found out that there're other users that are facing similar issue, like in question #28829. I did not use the NetworkManager.conf workaround as suggested in the page since I'm not familiar with the dbus stuff, but looking at the file gave me a clue that running Firefox as root would fix the problem. That was right but who would want to do that? ;-)

A better solution would definitely be altering Firefox settings. Question #96 suggests to set network.online to true but it already is! Then I saw toolkit.networkmanager.disable and toggled it to true, restarted Firefox and.. Yes, this is the solution, it disables Firefox from consulting the NetworkManager.

Read the knowledge base if you want to know more about it.

- yc

Saturday, November 8, 2008

Steve Ballmer is.. funny but great

Went to the FOSS.my 2008 and one of the sessions that I attended was Microsoft on Open Source and Silverlight. When the speaker, Chris Levanes, talked about the open source involvement of Microsoft and their peguins and lab, I remembered Steve Ballmer's "Linux is a cancer" comment. I found it irony, but.. then again, business is business and Ballmer said that like 7 years ago. The world has changed.

Ballmer (the monkey boy that most guys would call) is a passionate guy and that's the quality he has. These videos are amusing and they will really make you to remember him.
Now.. before we laugh at him, here're some facts:
  • Ballmer is the CEO of Microsoft.
  • Ballmer is fucking passionate, or, he can really express himself in a crazy manner.
  • Ballmer is one of the richest men in the world.
Can you do better than him?

- yc

Thursday, November 6, 2008

Profiling a Remote Application in Eclipse

I came across this guide which mentioned about attaching the Eclipse profiler to a remote Java application. I was stuck for some hours, asked my question in #java and #eclipse but got no response.. then, realized that, the instructions are old!

Instead, I visited the TPTP site, downloaded the Agent Controller and followed the instructions in this page to get things up and running. Basically,
  • Add $TPTP_AC_HOME/lib:$TPTP_AC_HOME/bin:$TPTP_AC_HOME/plugins/org.eclipse.tptp.javaprofiler to $LD_LIBRARY_PATH
  • Add $TPTP_AC_HOME/bin to $PATH
  • Run SetConfig.sh to configure the AC
  • Run ACStart.sh to start AC
  • Add '-agentlib:JPIBootLoader=JPIAgent:server=enabled;CGProf' to your JAVA_OPTS (ldd and nm are good commands)
  • Start your Java application
  • Profile and hook into the application by selecting "Attach to Agent" in the Eclipse's dialog
- yc