Latest Posts »
Latest Comments »
Popular Posts »

Bleeding edge of development – upgrading system and ANT stops working

Written by Toomas Römer on December 28, 2009 – 5:32 pm

I run Debian Unstable as my main desktop system. I shoot myself in the foot couple of times a year with the upgrades but I like using the bleeding edge of development.

Today after my “regular” upgrade I noticed that one of the ANT tasks did not perform as I would have expected.

/home/toomasr/workspace/project/build.xml:459: The following error occurred while executing this line:
/home/toomasr/workspace/project/changelogic-build.xml:72: Please check the correctness of the root url property. The server returned HTTP response code 300 or above for the URL http://172.17.57.242/lib/changelogic-build.xml

A quick ant -debug did not help me much.

/home/toomasr/workspace/project/build.xml:459: The following error occurred while executing this line:
/home/toomasr/workspace/project/changelogic-build.xml:72: Please check the correctness of the root url property. The server returned HTTP response code 300 or above for the URL http://172.17.57.242/lib/changelogic-build.xml                                                                                                                                       
        at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:508)                                                                                   
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:369)                                                                                                                  
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)                                                                                                     
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)                                                                                                              
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)                                                                                            
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)                                                                                    
        at java.lang.reflect.Method.invoke(Method.java:597)                                                                                                                         
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)                                                                                              
        at org.apache.tools.ant.Task.perform(Task.java:348)                                                                                                                         
        at org.apache.tools.ant.Target.execute(Target.java:357)                                                                                                                     
        at org.apache.tools.ant.Target.performTasks(Target.java:385)                                                                                                                
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
        at org.apache.tools.ant.Main.runBuild(Main.java:758)
        at org.apache.tools.ant.Main.startAnt(Main.java:217)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Caused by: /home/toomasr/workspace/project/changelogic-build.xml:72: Please check the correctness of the root url property. The server returned HTTP response code 300 or above for the URL http://172.17.57.242/lib/changelogic-build.xml
        at org.apache.tools.ant.taskdefs.Exit.execute(Exit.java:142)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:142)
        at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:93)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:367)
        ... 17 more
--- Nested Exception ---
/home/toomasr/workspace/project/changelogic-build.xml:72: Please check the correctness of the root url property. The server returned HTTP response code 300 or above for the URL http://172.17.57.242/lib/changelogic-build.xml
        at org.apache.tools.ant.taskdefs.Exit.execute(Exit.java:142)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:142)
        at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:93)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:367)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
        at org.apache.tools.ant.Main.runBuild(Main.java:758)
        at org.apache.tools.ant.Main.startAnt(Main.java:217)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
 
Total time: 3 seconds

The access log on the server did not show anything for the request. Browsing to the url with FireFox worked just fine. Where to even start debugging this? The simple env did not show any proxies configured either. Quite lost.

At last I decided to trace the problem with strace. strace -f ant my_target > result 2>&1 produced 35 892 lines of output. Searching for the ip showed me the message

35596 [pid 13544] connect(46, {sa_family=AF_INET6, sin6_port=htons(80), inet_pton(AF_INET6, "::ffff:172.17.57.242", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = -1 ENETUNR      EACH (Network is unreachable)

Weehah, I’m getting somewhere! Googling a bit showed me multiple solutions. Either a system wide sysctl -w net.ipv6.bindv6only=0 or just -Djava.net.preferIPv4Stack=true will do the trick. I hope this helps somebody.


Tags: , ,
Posted in tips | No Comments »

It is possible to run Chrome under Linux

Written by Toomas Römer on March 24, 2009 – 7:01 pm

Although very unstable and not that functional there exist Ubuntu packages (they work under Debian also) for Google Chrome (named chromium-browser though), see https://launchpad.net/~chromium-daily/+archive/ppa


Tags:
Posted in cool | No Comments »

When a machine does not boot and is across the Atlantic

Written by Toomas Römer on September 15, 2008 – 4:45 pm

I’m no administrator but I do have to keep an eye on some machines and do some administrative tasks. I was able to bring a machine down by doing a dist-upgrade and accidentally upgrading a kernel without a necessary network module. I learned a lot from this experience :)

I’m in Estonia and the server is in the US. I didn’t know what my options were, I imagined that somebody would go to the server room and boot it up with a Live CD. Once network gets configured I’m let in.

Nope. I was sent email instructions to a KVM (Keyboard – Video – Mouse) frontend and the machine was rebooted.

KVM is a physical switch int the server room which takes the input/output of the server and lets you use that input/output over the network.

The frontend presents you with a Java applet where you can see the video output of the machine. Keyboard and mouse work as usual.

The frontend even lets you mount an ISO from your HDD that will be mounted by the machine as an USB drive. This is really sloooooow. The other option is mounting an ISO from the network as an USB drive, faster. So starting from a Live CD is something you can do yourself.

I mounted an ISO with the necessary module, ran it as a Live CD, mounted the HDDs, chrooted to the old root and was able to do a simple dpkg -i packageName from the CD.

Administrators do have cool tools and it is possible to administrate machines over the Atlantic even when they don’t boot up :)


Tags:
Posted in cool | No Comments »

Wow, Commandline Tools Evolved

Written by Toomas Römer on March 9, 2008 – 1:51 pm

There is a nice piece, Sexy clones of classic Unix tools. Even if you are happy with top (display Linux tasks) just give htop a try and be amazed.


Tags:
Posted in tips | No Comments »