Openflow Floodlight: How to force the server to run on a specific interface? - openflow

I've installed Floodlight in a Linux Ubuntu 18 server with multiple Ethernet interfaces. Floodlight is running on the wrong interface, without connectivity to the openflow switches. How can I force Floodlight to run on a specific interface?
I've installed Floodlight (master):
commit 18ef8882180d2f002c3c57c17d270ade885ef479 (HEAD -> master, origin/master, origin/HEAD)
Author: Qing Wang <lucifer0909#gmail.com>
Date: Fri May 10 01:38:54 2019 -0400
Starting it with the following:
sudo java -jar target/floodlight.jar

Related

Getting IoT Edge Agent error trying to run a Linux container on Windows host: "image operating system "linux" cannot be used on this platform"

I am trying to create an Azure IoT Edge device on a Windows host, but running a module built as a Linux container. In a previous experiment, I was able to successfully create an Azure IoT Edge device on a Linux host, and successfully running this same Linux container module.
However, when I deploy the module onto the Windows host, the module shows that it is not running, and when I view the module's log using "iotedge logs camera-capture" I get the following error:
<6> 2019-12-02 13:32:56.016 -08:00 [INF] - Executing command: "Create module camera-capture"
<3> 2019-12-02 13:33:11.674 -08:00 [ERR] - Executing command for operation ["create"] failed.
Microsoft.Azure.Devices.Edge.Agent.Edgelet.EdgeletCommunicationException- Message:Error calling Create module camera-capture: Could not create module camera-capture
caused by: Could not pull image localhost:5000/camera-capture-opencv:1.1.128-amd64
caused by: image operating system "linux" cannot be used on this platform, StatusCode:500, at: at Microsoft.Azure.Devices.Edge.Agent.Edgelet.Version_2019_01_30.ModuleManagementHttpClient.HandleException(Exception exception, String operation) in C:\agent\_work\4\s\edge-agent\src\Microsoft.Azure.Devices.Edge.Agent.Edgelet\version_2019_01_30\ModuleManagementHttpClient.cs:line 194
I have found no results online, or through Microsoft forums, regarding this particular error that was able to resolve my problem. For the record, I have ensured:
I am running a compatible Windows 10 host (17763)
I have Hyper-V and Containers installed
I have VT enabled in the BIOS
I have configured my deployment.template.json to build as "amd64" platform
I have configured my Docker Desktop to run using Linux Containers (and also enabled Experimental mode)
I have tested the basic "hello-world" ubuntu example online, and it works when I run it from Powershell, which proves that a Linux container will run on my Windows host
Any help would be greatly appreciated!
After spending a few days stuck on this issue, I finally found the solution. The problem was with the IoT Edge runtimes on Windows were not configured to handle Linux containers!
As of this writing, the solution is documented here by Microsoft: https://learn.microsoft.com/en-us/azure/iot-edge/how-to-install-iot-edge-windows-with-linux
But in case of a future dead link, you basically have to add additional flags when you install your Azure IoT Edge runtimes to handle linux containers.
. {Invoke-WebRequest -useb aka.ms/iotedge-win} | Invoke-Expression; `
Deploy-IoTEdge -ContainerOs Linux
. {Invoke-WebRequest -useb aka.ms/iotedge-win} | Invoke-Expression; `
Initialize-IoTEdge -ContainerOs Linux
I changed Docker Desktop to Linux container mode and compiled in VSCode. It worked like magic.

VT-x isn't available & No Hyper-V manager on Windows 10

When I used vagrant up to boot a VM, I found the following error ox80004005 (Note that I am using Oracle VM Virtualbox for the virtualization)
kayan#kayan-VirtualBox:~/vagrant/rpm$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'jhcook/fedora27' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["startvm", "769fc6c1-ea8d-46d8-8a7b-16989540d530", "--type", "gui"]
Stderr: VBoxManage: error: VT-x is not available (VERR_VMX_NO_VMX)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component ConsoleWrap, interface IConsole
Screenshot: VT-x isn't available ERROR
I am using 64-bit Windows 10. My processor is Intel(R) Core(TM) i7-7500U CPU # 2.70 GHz.
To solve this error, I was suggested by someone that I should disable Hyper -v on my host windows machine. When I opted to disable Hyper -v feature, I found that there is no Hyper-v in my machine (strange!!!)
Screenshot: No option to enable or disable Hyper-v
I then used this command dism.exe /Online /Enable-Feature:Microsoft-Hyper-V /All to disable the hypervisor and I found this (Note: I run CMD as administrator).
Microsoft Windows [Version 10.0.16299.125]
(c) 2017 Microsoft Corporation. All rights reserved.
C:\WINDOWS\system32>dism.exe /Online /Enable-Feature:Microsoft-Hyper-V /All
Deployment Image Servicing and Management tool
Version: 10.0.16299.15
Image Version: 10.0.16299.125
Error: 0x800f080c
Feature name Microsoft-Hyper-V is unknown.
A Windows feature name was not recognized.
Use the /Get-Features option to find the name of the feature in the image and try the command again.
The DISM log file can be found at C:\WINDOWS\Logs\DISM\dism.log
C:\WINDOWS\system32
Screenshot: 0x800f080c ERROR
My virtual machine configuration:
OS: Ubuntu 16.04.03
RAM: 3072 MB
Storage: 500 GB
storage type: VDI
If you are facing the problem in VirtualBox after the Windows 10 Founder's Update, you need to turn Core Isolation Memory Integrity back off again. The UI is bugged, here's how it can be done via. registry, navigate to below and set 0:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity\Enabled
Hyper-V is not installed/available on windows 10 Home edition, which might be why you aren't seeing it.
https://learn.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v
You need to change your Bios settings to enable Virtualization.
https://www.laptopmag.com/articles/access-bios-windows-10
Once enabled, you'll be good to go with VirtualBox.
(UPDATED)
Oracle VM Virtualbox doesn't support nested 64-bit virtual machines.
My host machine is actually a 64-bit machine. I installed Oracle VM Virtualbox and installed a 64-bit Linux VM there. My target was to install another 64-bit Linux VM on that VM. Unluckily, Oracle VM Virtualbox doesn't provide us that support.
To solve this issue, I used VMWare to install the first VM. Then I installed Oracle VM Virtualbox on that VM and installed the second VM on VirtualBox.
I have same problem when i want to run emulator and thanks to bluedi solved this problem.
just disable Memory Integrity
"Settings" -> "Update & Security" -> "Windows Security" -> "Device Security" -> "Core Isolation" -> Turn it off
I tried these two solutions without luck:
Enabling virtualization in BIOS
Disabling (or enable, then disable) Hyper-V
What finally worked was running this privileged command:
bcdedit /set hypervisorlaunchtype off
Run that command with cmd in Administrator mode and reboot.

FunCube Dongle Pro undetected by the qthid software 4.1

I am struggling trying to use the FCD Pro with Linux.
With the 2.2 Qthid Funcube Dongle Controller software installed, I have segmentation fault issues, the program closes by itself after a few second but the device is detected by the software.
With the 4.1 version though, I don't see the device (FCD not detected) but I do see the device in my usb tree:
Bus 002 Device 015: ID 04d8:fb56 Microchip Technology, Inc.
I have updated the firmware to ver. 18j using Windows SW and the guide suggested http://www.funcubedongle.com/MyImages/FCDFirmwareUpdateGuide.pdf
But using Linux, I just can't make it work.
Of course I copied the rules in /etc/udev/rules, but nothing changed..
I am working with
Linux xxxxx 4.4.0-45-generic #66-Ubuntu SMP Wed Oct 19 14:12:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
Ubuntu 16.04 LTS
any help? Tks
Like you I am seeing the segmentation fault with qthid-2.2 on Debian Buster (Testing at this time) while running qthid 4.1 just shows "No FCD detected" in the status bar.
Until I added my username to the "users" group as the recommended udev rule sets, qthid-2.2 would not seg fault and did show the FCD was not detected in the main pane.
At this time I've no solution except compiling qthid 4.0 from source as version 4.1 is explicitly noted as only working with the FCD+. See:
https://sourceforge.net/projects/qthid/files/4.1/README.txt/download

How to get Sikuli working in headless mode

If we have a headless test server running sikuli (both ubuntu and windows configurations needed), how to get it work without a physical monitor and preferably for as many screen resolutions as possible.
I successfully got sikuli running in headless mode (no physical monitor connected)
Ubuntu: check Xvfb.
Windows: install display driver on the machine (to be headless) from virtualbox guest additions display drivers and use TightVNC to remotely set resolution from another machine.
Detailed steps for windows 7
Assume that:
Machine A: to be headless machine, windows 7, with vnc server ready (e.g. TightVNC server installed and waiting for connections).
Machine B: will be used to remotely setup the virtual display driver on machine A.
steps:
Download virtualbox guest additions iso file on Machine A from here (for latest version check latest version here and download VBoxGuestAdditions_x.y.z.iso)
Extract iso file (possibly with winrar) into a directory (let us call it folder D)
using command prompt cd to D folder
Driver extraction
-To extract the 32-bit drivers to "C:\Drivers", do the following:
VBoxWindowsAdditions-x86 /extract /D=C:\Drivers
-For the 64-bit drivers:
VBoxWindowsAdditions-amd64 /extract /D=C:\Drivers
Goto device manager
add hardware
Restart and connect with VNC viewer, now you should be able to change screen resolution
other valuable info on launchpad.
I got SikuliX working in a true headless mode in GCE with a Windows 2016 client system. It takes some duct tape and other Rube Goldberg contraptions to work, but it can be done.
The issue is that, for GCE (and probably AWS and other cloud environment Windows clients), you don't have a virtual video adapter and display, so, unless there's an open RDP connection to the client, it doesn't have a screen, and SikuliX/OpenCV will get a 1024x768 black desktop, and fail.
So, the question is, how to create an RDP connection without having an actual screen anywhere. I did this using Xvfb (X Windows virtual frame buffer). This does require a second VM, though. Xvfb runs on Linux. The other piece of the puzzle is xfreerdp 2.0. The 2.x version is required for compatibility with recent versions of Windows. 1.x is included with some Linux distros; 2.x may need to be built from sources, depending on what flavor Linux you're using. I'm using CentOS, which did require me to build my own.
The commands to establish the headless RDP session, once the pieces are in place, look something like this:
/usr/bin/Xvfb :0 -screen 0 1920x1080x24 &
export DISPLAY=:0.0
/usr/local/bin/xfreerdp /size:1920x1080 /u:[WindowsUser] /p:"[WindowsPassword]" /v:[WindowsTarget]
In our environment we automated this as part of the build job kicked off by Jenkins. For this to work under the Jenkins slave, it was also necessary to run the Jenkins slave as a user process, rather than a service... this can be accomplished by enabling auto admin login and setting the slave launch script as a run (on logon) command.
For those looking to automate on ec2 windows machines, this worked for me: http://www.allianceglobalservices.com/blog/executing-automation-suite-on-disconnectedlocked-machines
In summary, I used RDC to connect, put the following code in a batch file on remote desktop, double clicked it, and sikulix started working remotely (kicking me out of RDC at the same time). Note that ec2 windows machines default to 1024x768 when tscon takes over which may be too small so TightVnc can be used to increase the resolution to 1280x1024 before running.
tscon.exe 0 /dest:console
tscon.exe 1 /dest:console
tscon.exe 2 /dest:console
tscon.exe 3 /dest:console
START /DC:\Sikulix /WAIT /B C:\Sikulix\runsikulix.cmd -d 3 -r C:\test.sikuli -f C:\Sikulix\log.txt -d C:\Sikulix\userlog.txt
I just figure out a way to resolve similar issue.
My env:
local: windows pc
remote (for running sikulix + app I would like to test): windows ec2 instance
My way:
1.create a .bat file, its contents:
ping 127.0.0.1 -n 15 > nul
for /f "skip=1 tokens=3" %%s in ('query user %USERNAME%') do (
%windir%\System32\tscon.exe %%s /dest:console
)
cd "\path\to\sikulix"
java -jar sikulixide-2.0.5.jar -r /path/to/sikulix -c > logfile.log
prepare your app
run the bat (right click > run as administrator)
ping will give your 10s, so that you can bring your app back to front
you will be disconnnected from rdp connection
Explanation:
ping is like "sleep"
for loop: kick out current user & keep session alive

xquartz: couldn't query security extension and xterm failing

I am using OSX 10.7.5 from my MacBook Air to login to remote Linux workstation, running Suse (/etc/issue: SUSE Linux Enterprise Desktop 11 SP2 (x86_64) - Kernel \r (\l))
Everything was working fine until I started to play with macports latest X11, XQuartz XWindow System (XQuartz 2.7.4 (xorg-server 1.13.0)). By default OSX 10.7.5 comes with XQuartz 2.6.4 (xorg-server 1.10.6), however I've installed and made default XQuartz 2.7.4. I am now observing two issues:
(1) When logging to my remote Suse box (this is done via VPN tunnel btw, not sure if it matters), via 'user1> ssh -X user2#wks01' I am getting
Warning: untrusted X11 forwarding setup failed: xauth key data not generated
This (at least appears) to be traced to the fact that there's no 'Security' extension on the new Xquarts server. Traced via ssh -vvv option, and then due to the fact that xauth is failing, so running it separately on MacBox, or remote Suse gives:
user2#wks04:~> xauth generate "$DISPLAY" .
trustedxauth: (argv):1: couldn't query Security extension on display "localhost:10.0"
'ssh -Y' logs in without warning
(2) What is also interesting, that in both ssh modes -X and -Y I am able to open and forward to my display any X-application that I have checked, including xclock, xlogo, xcalc and even eclipse. However running simple 'xterm' results in a hanging job (i.e. appears running), but xterm never displays on my Mac.
While rolling back to will XQuartz 2.6.4 probably help with the issues above (as all the above operations worked smoothly before), but I am curious now to understand the root of the matter.
Thank you in advance for your help,
Dmitry