Thursday, September 24, 2015

Configuring Mininet with Floodlight Controller

Configuring Mininet with Floodlight controller is pretty straight-forward.

First, download and build Floodlight.

$ git clone git://github.com/floodlight/floodlight.git
$ cd floodlight
$ git checkout stable
$ ant
$ sudo mkdir /var/lib/floodlight
$ sudo chmod 777 /var/lib/floodlight

Once built, you can execute Floodlight by,
$ java -jar target/floodlight.jar

Execute Mininet and connect to the controller.
sudo mn --arp --topo tree,3,2 --mac --switch ovsk --controller remote,ip=127.0.0.1

Now if you connect to the Floodlight UI in browser, you may view the nodes emulated by Mininet.
http://127.0.0.1:8080/ui/index.html

Floodlight Dashboard

Network Topology




$ java -jar target/floodlight.jar
$ git clone git://github.com/floodlight/floodlight.git $ cd floodlight $ git checkout stable $ ant; $ sudo mkdir /var/lib/floodlight $ sudo chmod 777 /var/lib/floodlight - See more at: http://www.projectfloodlight.org/getting-started/#sthash.SaGU01pP.dpuf
$ git clone git://github.com/floodlight/floodlight.git $ cd floodlight $ git checkout stable $ ant; $ sudo mkdir /var/lib/floodlight $ sudo chmod 777 /var/lib/floodlight - See more at: http://www.projectfloodlight.org/getting-started/#sthash.SaGU01pP.dpuf
$ git clone git://github.com/floodlight/floodlight.git $ cd floodlight $ git checkout stable $ ant; $ sudo mkdir /var/lib/floodlight $ sudo chmod 777 /var/lib/floodlight - See more at: http://www.projectfloodlight.org/getting-started/#sthash.SaGU01pP.dpufss
$ git clone git://github.com/floodlight/floodlight.git $ cd floodlight $ git checkout stable $ ant; $ sudo mkdir /var/lib/floodlight $ sudo chmod 777 /var/lib/floodlight - See more at: http://www.projectfloodlight.org/getting-started/#sthash.SaGU01pP.dpuf

Sunday, September 13, 2015

Quick trips are the best.

The view from the balcony in Portimão.
[12th - 13th, September] Nothing beats a quick trip to a beach resort in the summer. However, autumn is good too, with lesser tourists and cheaper rates, as long as it does not rain. Visiting Portimão end of the summer was good, with sun and beach, still abundantly available.

Thursday, September 3, 2015

Delete Skype History in Ubuntu 14.04 LTS

If you are a Skype user in Linux, you would have noticed that there is no way of deleting the chat history, which is readily available in Windows. This has already been reported to Skype team by a few users before.

If you are wondering how to remove the history locally, this below answer from askubuntu.com will be helpful.

I was instructed by Skype customer service to do following:
  1. Go to Options -> Privacy and set "Keep chat history for.." to Disable History, then sign out & sign in.
  2. Go to $HOME/.Skype/my_skype_name/ and delete only main.db. Sign out & Sign in.
It worked.


Not sure why this was not the accepted answer. Works perfectly without a windows VM. However, it is strange that Skype team did not attempt to fix this glitch yet.

Memories of Croatia

View from the apartment in Rijeka
I often find it hard to fix my mind on whether to visit a new place, or a place that I have visited and enjoyed a lot once more. I visited Stockholm for the 3rd time recently for the EMDC Summer Event 2015. That was the last EMDC event as 2014 was the last intake of EMDC. I stayed in Stockholm for just 4.5 months. Still it left very nice memories, and going back early this summer in May and now again in August gave life to strong memories of 2013.

So far I have lived in Colombo, Lisbon, and Stockholm. Since I am still in Lisbon, I do not miss it right now. I also have lived in Rijeka, Croatia for 22 days. Though that was a very short period, I had a routine life with cooking, working, and going to the nearest super market. I also had some time to travel during the weekends, to the nearest cities. It was a short-stay. But Rijeka is clearly recorded in my mind. In the future, if I ever go back to Rijeka, I will get the memories back. I do not think I will ever go back to Rijeka, as I do not foresee the reason. But I cannot say for sure. In 2013, I never would have guessed that I would go back to Fejan in 2015 for another summer event.

My memories of Croatia includes working with my computer with the noise of frogs, while sitting outside the University of Rijeka in the stair case, in the mid night! They just close the faculty by 10 pm, and I did not have internet connection in my big and beautiful apartment (that was supposed to be a professors apartment. The topmost floor of the students' dormitory. Loved it). All the COST actions of the same program are listed here, including mine.

During my second trip to Stockholm, I did not pay a visit to KTH main campus. This time, I did. However, I did not visit Kista even this time. Kista is where I lived during my stay of 4.5 months in Stockholm. I stayed in the student apartments in the upper floors above a shopping mall.

In 2013, I came back to Lisbon two times for short trips, from Stockholm. In 2015, it is from Lisbon to Stockholm, two times. I admire the random patterns that appear in my life.

ShareLatex and local compilation of Latex

ShareLatex is good at swallowing the compilation errors and still producing the correct PDF. However, when locally compiling, the local errors often prevent the compilation. For example, TexStudio often fails for similar or same errors. Typing "Enter" upon encountering such errors will make the compilation proceed, regardless of such error reports.



! Missing $ inserted.
> Check empty or blank lines between the \begin{equation} and \end{equation} tags.

! You can't use `\eqno' in horizontal mode.
> Check the closing braces in the equations.

! Missing $ inserted.

                $
l.112 $\forall$ n $\in$ $\mathbb{Z}$^{+}: $C_
                                             {Nn}$ represents the coordinato...

> Changing
$\forall$ n $\in$ $\mathbb{Z}$^{+}: $C_ 

into
$\forall$ n $\in$ $\mathbb{Z} ^{+}$: $C_
fixed this.

Wednesday, September 2, 2015

A lunch can never get unhealthier

The lunch at Trst, Italy
I am a big fan of summer. Most probably because I live in a country where the summer is sunny and pleasant, where winter and autumn are cold and wet. Spring is just the anticipation to summer. We never really have well-defined seasons in Sri Lanka, unlike Europe. It is easier to remember the events with the right month that happened thanks to the seasons.

This summer was considerably hot in this part of Europe. I came to Europe for my masters program EMDC, when the summer was almost finishing, in 2012. I was in Sri Lanka during most part of the 2013 summer. I was in Europe for 2014 summer completely, completing my EMDC and beginning my PhD, EMJD-DC. So in fact, 2015 was just my second complete summer in Europe.

My short trip to Trst, Italy was remarkable. It was terribly hot in Trst. I never thought that I would experience a weather hotter than Colombo, in Europe. I was proven wrong. I am not a fan of Italian food. I however was eating all unhealthy food and ice cream during my short trip. :)

Tuesday, September 1, 2015

Sexism in the viral social media "motivational quotes"

My Sri Lankan Version *
Your naked body should only belong to those who fall in love with your naked soul.” ― Charles Chaplin.

The above is a message circulated as a viral image by many in Facebook. The message comes written on top of a considerably attractive female, subtly sexualized and directing this advice towards the female members of the network.

As pointed out by many, your body belongs to you; not to anyone else. Nevertheless, just to balance, I have  composed and released this image, which is a Sri Lankan and less sexist version of the original post.

The original viral image

We have a long way to go, to grow up and overcome this imbalance.

 * Special thanks to Kusa Paba crew for the image of the man in the photo. No copyright violations intended.

Google+ cannot get creepier

Google+ just keeps repeating,
"Complete your profile
Are you in a relationship?
Have a special someone? Let the world know."
Why should I "let the world know"?

They should at least have made it less creepier by mentioning "let your friends know". Also showing 75% just to induce you to make it 100%.

Wrong input in features.xml of OpenDaylight and the adventure with error logs. :)

So I was working on OpenDaylight, and the below error was blocking me from building the messaging4transport project locally with maven successfully.
[INFO] Processing feature: odl-messaging4transport
Sep 27, 2015 2:26:12 AM org.apache.bsf.BSFManager eval
SEVERE: Exception: 
java.security.PrivilegedActionException: org.apache.bsf.BSFException: exception from Groovy: java.lang.ArrayIndexOutOfBoundsException: 2
 at java.security.AccessController.doPrivileged(Native Method)
 at org.apache.bsf.BSFManager.eval(BSFManager.java:442)
 at com.alexecollins.maven.plugin.ExecuteMojo.execute2(ExecuteMojo.java:119)
 at com.alexecollins.maven.plugin.ExecuteMojo.execute(ExecuteMojo.java:52)
 at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
 at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
 at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
 at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
 at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
 at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
 at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
 at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:606)
 at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
 at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
 at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
 at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.bsf.BSFException: exception from Groovy: java.lang.ArrayIndexOutOfBoundsException: 2
 at org.codehaus.groovy.bsf.GroovyEngine.eval(GroovyEngine.java:98)
 at org.apache.bsf.BSFManager$5.run(BSFManager.java:445)
 ... 25 more

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] messaging4transport-api ........................... SUCCESS [11.182s]
[INFO] messaging4transport-impl .......................... SUCCESS [11.951s]
[INFO] messaging4transport-features ...................... FAILURE [2.738s]
[INFO] messaging4transport-karaf ......................... SKIPPED
[INFO] messaging4transport-artifacts ..................... SKIPPED
[INFO] messaging4transport ............................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 27.619s
[INFO] Finished at: Sun Sep 27 02:26:12 WEST 2015
[INFO] Final Memory: 110M/771M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.alexecollins.maven.plugin:script-maven-plugin:1.0.0:execute (add-version-to-features) on project messaging4transport-features: exception from Groovy: java.lang.ArrayIndexOutOfBoundsException: 2 -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn  -rf :messaging4transport-features
Since this does not give much clue, I built again with -X flag.
[DEBUG] -- end configuration --
[INFO] executing groovy script
[INFO] Updating repository declarations
[INFO] Processing feature: odl-messaging4transport-api
[INFO] Processing feature: odl-messaging4transport
Sep 27, 2015 12:13:14 PM org.apache.bsf.BSFManager eval
SEVERE: Exception: 
java.security.PrivilegedActionException: org.apache.bsf.BSFException: exception from Groovy: java.lang.ArrayIndexOutOfBoundsException: 2
 at java.security.AccessController.doPrivileged(Native Method)
 at org.apache.bsf.BSFManager.eval(BSFManager.java:442)
 at com.alexecollins.maven.plugin.ExecuteMojo.execute2(ExecuteMojo.java:119)
 at com.alexecollins.maven.plugin.ExecuteMojo.execute(ExecuteMojo.java:52)
 at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
 at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
 at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
 at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
 at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
 at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
 at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
 at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:606)
 at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
 at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
 at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
 at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.bsf.BSFException: exception from Groovy: java.lang.ArrayIndexOutOfBoundsException: 2
 at org.codehaus.groovy.bsf.GroovyEngine.eval(GroovyEngine.java:98)
 at org.apache.bsf.BSFManager$5.run(BSFManager.java:445)
 ... 25 more

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] messaging4transport-api ........................... SUCCESS [11.099s]
[INFO] messaging4transport-impl .......................... SUCCESS [13.164s]
[INFO] messaging4transport-features ...................... FAILURE [3.496s]
[INFO] messaging4transport-karaf ......................... SKIPPED
[INFO] messaging4transport-artifacts ..................... SKIPPED
[INFO] messaging4transport ............................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 29.693s
[INFO] Finished at: Sun Sep 27 12:13:14 WEST 2015
[INFO] Final Memory: 109M/762M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.alexecollins.maven.plugin:script-maven-plugin:1.0.0:execute (add-version-to-features) on project messaging4transport-features: exception from Groovy: java.lang.ArrayIndexOutOfBoundsException: 2 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.alexecollins.maven.plugin:script-maven-plugin:1.0.0:execute (add-version-to-features) on project messaging4transport-features: exception from Groovy: java.lang.ArrayIndexOutOfBoundsException: 2
 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
 at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
 at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
 at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
 at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
 at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
 at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
 at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:606)
 at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
 at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
 at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
 at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: exception from Groovy: java.lang.ArrayIndexOutOfBoundsException: 2
 at com.alexecollins.maven.plugin.ExecuteMojo.execute(ExecuteMojo.java:56)
 at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
 ... 19 more
Caused by: org.apache.bsf.BSFException: exception from Groovy: java.lang.ArrayIndexOutOfBoundsException: 2
 at org.codehaus.groovy.bsf.GroovyEngine.eval(GroovyEngine.java:98)
 at org.apache.bsf.BSFManager$5.run(BSFManager.java:445)
 at java.security.AccessController.doPrivileged(Native Method)
 at org.apache.bsf.BSFManager.eval(BSFManager.java:442)
 at com.alexecollins.maven.plugin.ExecuteMojo.execute2(ExecuteMojo.java:119)
 at com.alexecollins.maven.plugin.ExecuteMojo.execute(ExecuteMojo.java:52)
 ... 21 more
[ERROR] 
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn  -rf :messaging4transport-features
This gave me some clue on what went wrong. It is the features.xml entry. I found the wrong entry in my code-
    wrap:mvn:org.opendaylight.controller.config.api/{{VERSION}} 
I fixed it as below.
    wrap:mvn:org.opendaylight.controller/config-api/{{VERSION}}
It was of course a careless mistake. But the error log was crazy and interesting. :-)