With a little side of applesauce...

Tuesday, August 24, 2010

Eclipse - Unable to create editor ID org.cfeclipse.cfml.editors.CFMLEditor: Editor could not be initialized. java.lang.StackOverflowError

The answer is to increase the memory stack size by adding the following line to your eclipse.ini:

-Xss2048k

The answer was here:
http://bitkickers.blogspot.com/2009/08/cfeclipse.html

Tuesday, August 17, 2010

PPTP - NetworkManager config issue with MPPE encryption?

I just found this VPN issue when connecting Ubuntu 10.04 LTS to a POPTOP PPTP server. I'm not sure what is causing it exactly, but it appears that when setting NetworkManager->VPN Name->Advanced->Use Point-to-Point Encryption (MPPE) to 'All Available (default)', the connection handshake will not check 'All Available' encryption levels:
Aug 17 20:51:05 mycomputer NetworkManager: <info>  Starting VPN service 'org.freedesktop.NetworkManager.pptp'...
Aug 17 20:51:05 mycomputer NetworkManager: <info> VPN service 'org.freedesktop.NetworkManager.pptp' started (org.freedesktop.NetworkManager.pptp), PID 2294
Aug 17 20:51:05 mycomputer NetworkManager: <info> VPN service 'org.freedesktop.NetworkManager.pptp' just appeared, activating connections
Aug 17 20:51:05 mycomputer NetworkManager: <info> VPN plugin state changed: 1
Aug 17 20:51:05 mycomputer NetworkManager: <info> VPN plugin state changed: 3
Aug 17 20:51:05 mycomputer NetworkManager: <info> VPN connection 'stolaf' (Connect) reply received.
Aug 17 20:51:05 mycomputer pppd[2296]: Plugin /usr/lib/pppd/2.4.5//nm-pptp-pppd-plugin.so loaded.
Aug 17 20:51:05 mycomputer pppd[2296]: pppd 2.4.5 started by root, uid 0
Aug 17 20:51:05 mycomputer pppd[2296]: Using interface ppp0
Aug 17 20:51:05 mycomputer pppd[2296]: Connect: ppp0 <--> /dev/pts/1
Aug 17 20:51:05 mycomputer NetworkManager: SCPlugin-Ifupdown: devices added (path: /sys/devices/virtual/net/ppp0, iface: ppp0)
Aug 17 20:51:05 mycomputer NetworkManager: SCPlugin-Ifupdown: device added (path: /sys/devices/virtual/net/ppp0, iface: ppp0): no ifupdown configuration found.
Aug 17 20:51:05 mycomputer pptp[2301]: nm-pptp-service-2294 log[main:pptp.c:314]: The synchronous pptp option is NOT activated
Aug 17 20:51:05 mycomputer pptp[2314]: nm-pptp-service-2294 log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 1 'Start-Control-Connection-Request'
Aug 17 20:51:05 mycomputer pptp[2314]: nm-pptp-service-2294 log[ctrlp_disp:pptp_ctrl.c:739]: Received Start Control Connection Reply
Aug 17 20:51:05 mycomputer pptp[2314]: nm-pptp-service-2294 log[ctrlp_disp:pptp_ctrl.c:773]: Client connection established.
Aug 17 20:51:06 mycomputer pptp[2314]: nm-pptp-service-2294 log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 7 'Outgoing-Call-Request'
Aug 17 20:51:06 mycomputer pptp[2314]: nm-pptp-service-2294 log[ctrlp_disp:pptp_ctrl.c:858]: Received Outgoing Call Reply.
Aug 17 20:51:06 mycomputer pptp[2314]: nm-pptp-service-2294 log[ctrlp_disp:pptp_ctrl.c:897]: Outgoing call established (call ID 0, peer's call ID 2688).
Aug 17 20:51:09 mycomputer pptp[2301]: nm-pptp-service-2294 log[decaps_gre:pptp_gre.c:414]: buffering packet 5 (expecting 4, lost or reordered)
Aug 17 20:51:09 mycomputer pppd[2296]: CHAP authentication succeeded
Aug 17 20:51:10 mycomputer pppd[2296]: LCP terminated by peer (MPPE required but peer negotiation failed)
Aug 17 20:51:10 mycomputer pptp[2314]: nm-pptp-service-2294 log[pptp_read_some:pptp_ctrl.c:544]: read returned zero, peer has closed
Aug 17 20:51:10 mycomputer pptp[2314]: nm-pptp-service-2294 log[callmgr_main:pptp_callmgr.c:258]: Closing connection (shutdown)
Aug 17 20:51:10 mycomputer pptp[2314]: nm-pptp-service-2294 log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 12 'Call-Clear-Request'
Aug 17 20:51:10 mycomputer pptp[2314]: nm-pptp-service-2294 log[pptp_read_some:pptp_ctrl.c:544]: read returned zero, peer has closed
Aug 17 20:51:10 mycomputer pptp[2314]: nm-pptp-service-2294 log[call_callback:pptp_callmgr.c:79]: Closing connection (call state)
Aug 17 20:51:10 mycomputer pppd[2296]: Modem hangup
Aug 17 20:51:10 mycomputer pppd[2296]: Connection terminated.
Aug 17 20:51:10 mycomputer NetworkManager: <info> VPN plugin failed: 1
Aug 17 20:51:10 mycomputer NetworkManager: SCPlugin-Ifupdown: devices removed (path: /sys/devices/virtual/net/ppp0, iface: ppp0)
Aug 17 20:51:10 mycomputer pppd[2296]: Exit.
Aug 17 20:51:10 mycomputer NetworkManager: <info> VPN plugin failed: 1
Aug 17 20:51:10 mycomputer NetworkManager: <info> VPN plugin failed: 1
Aug 17 20:51:10 mycomputer NetworkManager: <info> VPN plugin state changed: 6
Aug 17 20:51:10 mycomputer NetworkManager: <info> VPN plugin state change reason: 0
Aug 17 20:51:10 mycomputer NetworkManager: <WARN> connection_state_changed(): Could not process the request because no VPN connection was active.
Aug 17 20:51:10 mycomputer NetworkManager: <info> Policy set 'Auto blah' (wlan0) as default for routing and DNS.

I actually succeed with my connection when explicitly setting the value to '128-bit (most secure)':
Aug 17 20:56:46 mycomputer NetworkManager: <debug> [1282096606.002379] ensure_killed(): waiting for vpn service pid 2371 to exit
Aug 17 20:56:46 mycomputer NetworkManager: <debug> [1282096606.002579] ensure_killed(): vpn service pid 2371 cleaned up
Aug 17 20:57:14 mycomputer NetworkManager: <info> Starting VPN service 'org.freedesktop.NetworkManager.pptp'...
Aug 17 20:57:14 mycomputer NetworkManager: <info> VPN service 'org.freedesktop.NetworkManager.pptp' started (org.freedesktop.NetworkManager.pptp), PID 2396
Aug 17 20:57:14 mycomputer NetworkManager: <info> VPN service 'org.freedesktop.NetworkManager.pptp' just appeared, activating connections
Aug 17 20:57:14 mycomputer NetworkManager: <info> VPN plugin state changed: 1
Aug 17 20:57:14 mycomputer NetworkManager: <info> VPN plugin state changed: 3
Aug 17 20:57:14 mycomputer NetworkManager: <info> VPN connection 'stolaf' (Connect) reply received.
Aug 17 20:57:14 mycomputer pppd[2398]: Plugin /usr/lib/pppd/2.4.5//nm-pptp-pppd-plugin.so loaded.
Aug 17 20:57:14 mycomputer pppd[2398]: pppd 2.4.5 started by root, uid 0
Aug 17 20:57:14 mycomputer pppd[2398]: Using interface ppp0
Aug 17 20:57:14 mycomputer pppd[2398]: Connect: ppp0 <--> /dev/pts/1
Aug 17 20:57:14 mycomputer NetworkManager: SCPlugin-Ifupdown: devices added (path: /sys/devices/virtual/net/ppp0, iface: ppp0)
Aug 17 20:57:14 mycomputer NetworkManager: SCPlugin-Ifupdown: device added (path: /sys/devices/virtual/net/ppp0, iface: ppp0): no ifupdown configuration found.
Aug 17 20:57:14 mycomputer pptp[2403]: nm-pptp-service-2396 log[main:pptp.c:314]: The synchronous pptp option is NOT activated
Aug 17 20:57:14 mycomputer pptp[2416]: nm-pptp-service-2396 log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 1 'Start-Control-Connection-Request'
Aug 17 20:57:14 mycomputer pptp[2416]: nm-pptp-service-2396 log[ctrlp_disp:pptp_ctrl.c:739]: Received Start Control Connection Reply
Aug 17 20:57:14 mycomputer pptp[2416]: nm-pptp-service-2396 log[ctrlp_disp:pptp_ctrl.c:773]: Client connection established.
Aug 17 20:57:15 mycomputer pptp[2416]: nm-pptp-service-2396 log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 7 'Outgoing-Call-Request'
Aug 17 20:57:16 mycomputer pptp[2416]: nm-pptp-service-2396 log[ctrlp_disp:pptp_ctrl.c:858]: Received Outgoing Call Reply.
Aug 17 20:57:16 mycomputer pptp[2416]: nm-pptp-service-2396 log[ctrlp_disp:pptp_ctrl.c:897]: Outgoing call established (call ID 0, peer's call ID 3072).
Aug 17 20:57:19 mycomputer pppd[2398]: CHAP authentication succeeded
Aug 17 20:57:19 mycomputer pppd[2398]: MPPE 128-bit stateless compression enabled
...

Some config info is:
speeves@mycomputer:~$ dpkg -l | grep ppp | grep Point-to-Point
ii ppp 2.4.5~git20081126t100229-0ubuntu3 Point-to-Point Protocol (PPP) - daemon
speeves@mycomputer:~$ uname -a
Linux mycomputer 2.6.32-24-generic #39-Ubuntu SMP Wed Jul 28 06:07:29 UTC 2010 i686 GNU/Linux

I'm not sure if this has to do with our POPTOP configuration, a kernel upgrade, or my ppp daemon, so am not submitting this as a bug.

Wednesday, August 11, 2010

Firefoxtester - easily install multiple versions of Firefox

Just found this very cool Firefox add-on, FoxTester, which simplifies testing in multiple versions of Firefox. I haven't tested it more than installing it, and then installing and uninstalling a version of Firefox, but I see the potential.

Firefox 4 Beta 3 on Ubuntu Lucid 10.04 LTS

It is very easy to setup the new beta release of firefox. Essentially, visit ftp://ftp.mozilla.org/pub/firefox/releases/4.0b3/, click either linux-i686, or linux-x86_64, then your preferred language, and the File:firefox-4.0b3.tar.bz2 (linux-i686/en-US/), (which saves it to ~/Downloads). Then perform the following:

speeves@mycomputer:~/Downloads$ tar xjvf firefox-4.0b3.tar.bz2 
tar: Record size = 8 blocks
firefox/
firefox/mozilla-xremote-client
firefox/platform.ini
firefox/README.txt
firefox/libsoftokn3.chk
firefox/libnssckbi.so
...
speeves@mycomputer:~/Downloads$ sudo mv /opt/firefox /opt/firefox4b2
speeves@mycomputer:~/Downloads$ sudo mv firefox /opt/
speeves@mycomputer:~/Downloads$ ln -s /opt/firefox/firefox ~/bin/firefox4
speeves@mycomputer:~/Downloads$ firefox4

I setup a link to firefox4, so that I could move back and forth between my production version and the new beta.

Tuesday, August 10, 2010

Eclipse - installing PDT (PHP) on Helios

Finally, I have found directions for installing PDT without the all-in-one or easyeclipse packages:
http://wiki.eclipse.org/PDT/Installation#Installation_Flow

Friday, August 6, 2010

Javascript - parse MS SQL timestamp for creating a Date object in Javascript

I wrote this Javascript function to aid in creating the equivalent Javascript Date object:
function getJsTimestamp( timeString ) {
// split the mssql timestamp, and return it so that we
// can create a date in javascript
var arrMssqldate = timeString.split( ' ' );
var arrDate = arrMssqldate[0].split( '-', 3 );
var arrTime = arrMssqldate[1].split( ':', 2);

var timeObject = new Object;
timeObject.year = arrDate[0];
timeObject.month = arrDate[1];
timeObject.day = arrDate[2];
timeObject.hour = arrTime[0];
timeObject.minute = arrTime[1];
timeObject.second = '00';

return timeObject;

}


It is quick and dirty, and defaults seconds to '00'. The example MS SQL Server timestamp string looks like '2010-06-01 07:00:00.0'.

Here is the example Javascript usage:
var timeObject = getJsTimestamp( "2010-06-01 07:00:00.0" );
d1[0][0] = new Date(timeObject.year, timeObject.month, timeObject.day, timeObject.hour, timeObject.minute, timeObject.second);

Wednesday, August 4, 2010

Microsoft Wireless Notebook Optical Mouse 4000

I love Microsoft mice. They just really do them right :) I'm still using the one that I got as a gift from my manager a few years ago, and just needed to do a bit of troubleshooting. This knowledge base article was a big help:
http://support.microsoft.com/kb/838398

Tuesday, August 3, 2010

CFINPUT - autosuggest right-align

Just a note that right-align in <td>
will right align the results in the autosuggest drop-down. The fix is to remove the right align from <td>
.

Google knows I am using Firebug...