DHCP fails to work for eth0 on Ubuntu 10.04 

(FYI: Using a Dell Latitude E6400 with Ubuntu 10.04, patched to latest release (July 2010) with network manager doing the work for me)

Very strange problem, around not being able to get an IP address for a wired connection in the house (although wireless was fine).

Ran, dhclient and got this

Internet Systems Consortium DHCP Client V3.1.3
Copyright 2004-2009 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/00:26:b9:a7:60:76
Sending on LPF/eth0/00:26:b9:a7:60:76
Sending on Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 15
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 13
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 21
No DHCPOFFERS received.
No working leases in persistent database - sleeping.


so I logged into the router and discovered that although I had allocated a fixed IP address to my machine, the NAS I also have on the network (which does not have a fixed IP address), had stolen the address, which obviously caused the problems for my machine.

I deleted the old leases and took out the fixed allocation and then restarted network manager using


> sudo restart network-manager


and all was well !


> sudo dhclient eth0

There is already a pid file /var/run/dhclient.pid with pid 2863
killed old client process, removed PID file
Internet Systems Consortium DHCP Client V3.1.3
Copyright 2004-2009 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/00:26:b9:a7:60:76
Sending on LPF/eth0/00:26:b9:a7:60:76
Sending on Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 12
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 9
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 9
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 15
DHCPOFFER of 192.168.1.69 from 192.168.1.254
DHCPREQUEST of 192.168.1.69 on eth0 to 255.255.255.255 port 67
DHCPACK of 192.168.1.69 from 192.168.1.254
bound to 192.168.1.69 -- renewal in 33105 seconds.

[ add comment ] [ 0 trackbacks ] permalink
JODE decompiler for Eclipse in Ubuntu 

Great article here about setting up JODE for use within Eclipse.

I can't live without a Java decompiler !
[ add comment ] [ 0 trackbacks ] permalink
Virtual Box and mounted drives 

Having problems mounting a drive in VBox ? If it used to work and no longer does, try re-installing the Guest additions.

This article explains a little more, but to summarize, check that you have the vboxvfs available by typing

lsmod | grep vbox

also, consider using modprobe to bring it back if it went away ...

sudo modprobe vboxvfs load

Reinstalling Guest additions also fixed the problem I was having with the Host key needing to be pressed even when I have enabled the option to make it seamless.
[ add comment ] [ 0 trackbacks ] permalink
Cancel an apt-get installation 

run

sudo nautilus /var/cache/apt/archives/partial

then remove all files in that directory, but not the directory itself.

Then restart the apt-get operation
[ add comment ] [ 0 trackbacks ] permalink
Maven - some stuff I learnt 

How to set up your settings.xml so that it uses your local Archiva repository as first port of call ... here

If you want to use Maven in your build.xml, you need to do the following;-
- Add the maven-ant-tasks .. get them from here

- Add the following namespace to the <project> tag like this ...
<project name="projname" default="init" basedir="." xmlns:artifact="antlib:org.apache.maven.artifact.ant">

- Think about copying the required libs into a local lib directory prior to compilation like this ...

<target name="resolve" depends='init' description="--> retrieve dependencies with maven">
<!-- Resolve dependencies using local settings.xml -->
<artifact:dependencies filesetId="dependency.fileset" settingsFile="./settings.xml">
<pom file="pom.xml" />
</artifact:dependencies>

<!-- Copy all dependencies to the correct location. -->
<copy todir="${lib}">
<fileset refid="dependency.fileset" />
<!-- This mapper strips off all leading directory information -->
<mapper type="flatten" />
</copy>
</target>

... note the use of the settingsFile attribute for using a local settings.xml

[ add comment ] [ 0 trackbacks ] permalink
Synergy - share a mouse and keyboard across machines 

This is awesome - Synergy here

and the Ubuntu client here, although using

apt-get install quicksynergy

gives you the binary, rather than having to compile it all

You can download a binary setup for Windows from the SF site

Set the windows machine as the client and connect the keyboard and mouse to the Linux box.

There's also a DMG for Apple machines as well

Works a treat !
[ add comment ] [ 0 trackbacks ] permalink
ReadyNAS and shares in Windows 

Using the NoSMBDisconnect addon from here seems to have helped with disconnection issues I had with Windows.

Previously I was getting a lot of  "The specified network name is no longer avaliable" messages, which is a little frustrating.
[ add comment ] [ 0 trackbacks ] permalink
Cheeky script to create a SVN repository 

$SVN_ROOT=/svn_location
$MY_SVN_USER=svnuser

mkdir $SVN_ROOT/$1
mkdir /tmp/$1
mkdir /tmp/$1/branches
mkdir /tmp/$1/tags
mkdir /tmp/$1/trunk
svnadmin create $SVN_ROOT/$1
svn import /tmp/$1 file://$SVN_ROOT/$1 -m "initial import for $1"
rm -rf /tmp/$1

sudo chown -R $MY_SVN_USER:$MY_SVN_USER $SVN_ROOT/$1
sudo chmod 2770 -R $SVN_ROOT/$1


[ add comment ] ( 1 view ) [ 0 trackbacks ] permalink
Setting up subversion for access  

Found this document (in an email thread) quite useful ...

and this one about users and passwords http://scorreiait.wordpress.com/2009/06/11/svnssh/
[ add comment ] ( 1 view ) [ 0 trackbacks ] permalink
Find in unix 

Still haven't found what you're looking for ?

Try this

Useful find sequences for Unix


[ add comment ] ( 1 view ) [ 0 trackbacks ] permalink
Dumping a SQL Server table to SQL statements 

This useful utility will extract the contents of tables in SQL Server and dump them to a file ... I've found it useful when I've been wanting to dump a subset of data from one environment to another ...

MS Database Publishing Wizard

Kudos to this blog entry for pointing me in the right direction !
[ add comment ] ( 3 views ) [ 0 trackbacks ] permalink
Unknown Source shows up instead of line numbers in a Java stack trace 

If you get a stack trace in a piece of code that is difficult to debug through Eclipse (or simialr) and you rely on the stack trace to tell you where an exception is occuring, you may sometimes see (Unknown Source) instead of a line number ... never fear, to get the line numbers to appear, make sure you switch the debugging information on for a class when it is compiled. i.e. don't specify the '-g:none' flag when compiling, or, in Ant, make sure you set the following attribute for the javac task;

<javac srcdir="${src}" destdir="${build}" debug="true">
[ add comment ] ( 3 views ) [ 0 trackbacks ] permalink
Find out your user details in PHP 

Use these lines to fidn out various information about your process in a PHP file;

echo 'Id: ' . getmyuid() . '<br />';
echo 'Gid: ' . getmygid() . '<br />';
echo nl2br(print_r(stat('index.php'), true));


often comes in handy when you're writing to a file in a Unix environment and it just won't work !

[ add comment ] ( 3 views ) [ 0 trackbacks ] permalink
Smarty, Unix permissions, pain, woe, grief 

As it says ...

had a custom function in Smarty called 'currency'

the owner of the directory was 'fred', the group was 'fred'. Cushty.

Kept getting this message;

Fatal error: Smarty error: [in school_search.tpl line 100]: [plugin] unknown tag - 'currency' (core.load_plugins.php, line 118) in /opt/lampp/lao/libs/Smarty.class.php on line 1095

Turns out the group and other permissions have to be set to 'r' as well ...

obvious to a Unix guru ! Less obvious to a pleb like me :-(
[ add comment ] ( 4 views ) [ 0 trackbacks ] permalink
MDI MS-DOS 

[ add comment ] ( 4 views ) [ 0 trackbacks ] permalink

| 1 | 2 | 3 | Next> Last>>