Channel(/dev/video0)::Open(): Can’t open video device, error “Permission denied”

 

Quick fix until next reboot:

sudo chown root:mythtv /dev/video*

Posted in MythTV | Leave a comment

Pentaho Data Integration Installation Notes – Windows

These are my installation notes for installing Pentaho Data Integration (PDI) so I can repeat it if necessary.

  1. Download, unzip and copy pdi-ce-4.X.0 to it's target location
  2. For SQL Server native JDBC, download the latest version of sqljdbc from Microsoft
  3. The sqljdbc.exe file will simply uncompress into the provided output folder
  4. For Windows 64-bit and java 1.6 I copied the file sqljdbc4.jar to the <PDI install folder>\libext\JDBC
    • Alternatively you could add this file to the PDI class path.  For upgrade purposes this would be batter, but I could bother with it right now
  5. To run the Carte component as a windows service see: Java Apps as Windows Service

Open Issues:

  1. For a server install of the carte component, where does the repository.xml folder go?  On my client install it is in c:\users\<username>\.kettle
  2. Can't get integrated authentication working.
    • Tried copying the 64-but version of sqljdbc_auth.dll into the Windows\System32 directory and a few others with no luck so far
  3. Getting connection errors on java 1.7
Posted in Business Intelligence | Tagged , , | Leave a comment

Java Apps as Windows Service

 

I was looking for an easy and cheap way to setup a java application (in this case Pentaho's Carte) to run as a Windows service.  After reviewing a few options I went with "Yet Another Java Service Wrapper"
(YAJSW) which is based on Tanuki's Java Service Wrapper (JSW).  JSW is the basis, but the YAJSW spin off offers a LGPL  version for 64-bit Windows which JSW did not.

Be sure to reference the YAKSW web site for the installation details, but they are pretty straight forward:

 

  • Unpack the zip file to a folder <yajsw>.
  • Start the application you would like to wrap. NOTE: we need the pid of the application not the batch file which started the application.
  • Goto yajsw/bat and execute genConfig.bat <pid>
  • Edit the wrapper.conf in YAJSW conf folder to give the service a meaningful name.  For example:
    • wrapper.ntservice.name=pdi-carte
    • wrapper.ntservice.displayname=PDI Carte
    • wrapper.ntservice.description=Carte is a simple web server that allows you to execute transformations and jobs remotely
  • Execute your wrapped application as console application by calling: runConsole.bat
  • To Install the application as service call: installService.bat
  • To start the service: startService.bat
  • To stop the service: stopService.bat
  • To uninstall the service: uninstallService.bat

I was concerned about handling application upgrades without breaking the service so I placed the application in a non-version specific folder. eg. pdi as opposed to pdi-ce-4.3.0.  I also put the YAJSW directory in the same parent folder as the application and give it a name to show it is the service for pdi, so pdi-service.  Now to perform upgrade I do the following:

  • stop the service: pdi-service\bat\stopService.bat
  • To uninstall the service: pdi-service\bat\uninstallService.bat
  • Rename pdi to pdi-old
  • Create a new pdi fodler
  • Copy the enw application into the new pdi folder
  • Reinstall the service: pdi-service\bat\installService.bat
  • Restart the service: pdi-service\bat\startService.bat

Note 1: That when you reinstall the service it will be set to start automatically, so if that is not the desired setup you'll need to go into Control Panel -> Administrative Tools -> Service and find the yajsw service and change it's start up option.

Note 2: These upgrade steps may be overkill, but so far they seem to work.  I'll update the instructions if I find a better way.

Note 3: If you upgrade java (eg. 1.6 to1.7) then you'll likely need to reconfigure the service since it references the java path, in my case c:\Program Files\Java\jre6

I couldn't find the author's name, but YAJSW seems like a great app, THANK YOU!

Posted in Windoze | 1 Comment

Synergy Software Keyboard/Video Switch

I have a pretty typically computer environment at home with a personal and a work computer (both laptops in my case).  I frequently work from home and find myself going back forth between them.  With laptops this isn't the end of the world since you can pull the one you need close to switch from one to the other.  Where is starts to get messy is if you add a full size keyboard and external mouse which is my preference.  Suddenly there is a lot crowding up the desk.

For servers I use KVM (Keyboard/Video/Mouse) switches so I can access multiple machines, but I'm not sure how well video switching would work with laptops.

Long boring intro to the problem, but there is a great category of utilities known as Software Keyboard/Mouse Switches.  I have been using a FOSS package called Synergy which has been a great solution.  It allows me to attach the keyboard/mouse to one laptop and drag the mouse to the laptop sitting next to it begin working as though I am directly connected.  Even better, they can be different OSs. For work I'm stuck with Windoze, but my home laptop is Ubuntu and it works seamless together. 

There are a few issues I've run into, but all very minor:

  1. You need to install the utility on each machine.  No way around it since it is a software solution.  Linux, Windoze and OS X are supported. 
  2. It is VERY insecure by default.  I'm sure you can tighten it down with something like SSH tunnels.  For me, I DO NOT set it start automatically and only have a need for it at home, so security isn't a big concern
  3. When the Windows screen locks you can't control it to unlock it.  Not a big deal since the the laptop keyboard is still close.  You might be able to run Synergy as Windows service to get past the limitation if you so desired.

Great for desktops/laptops, but I don't think this is as useful for managing remote servers.  My servers sit headless in the next room so I generally connect to them via SSH, RDP or VNC depending on the OS and server configuration.  This addresses 95% of my access to the servers.  The remaining 5% is when the server is not network accessible from some reason, I need to get into the BIOS or see the boot progress.  Then I go back over back to the monitor, keyboard and mouse hooked to the faithful KVM switch then to the servers.

Posted in Linux General | Tagged , | Leave a comment

SME Kernel and/or VirtualBox Update

Initial install done using great How To on Contribs.org.  After the initial installation if you want to upgrade VirtualBox or the SME kernel is upgraded you need to rebuild VirtualBox against the SME kernel.

Get the VirtualBox rpm you need (for SME 8 beta 7 it is RHEL5/CentoOS 5 version) from VirtualBox.org.

Gently reinstall (as opposed to Force)

rpm -vi --replacepkgs VirtualBox-4.1-4.1.8_75467_rhel5-1.i386.rpm

That should take some time and rebuild what you need.

Edit the following file: /etc/vbox/vbox.cfg so it contains:

VBOXWEB_USER='root'
VBOXWEB_HOST=127.0.0.1
VBOXWEB_PORT=18083

If you upgraded VirtualBox then get the latest extensions too:

wget http://download.virtualbox.org/virtualbox/4.1.2/Oracle_VM_VirtualBox_Extension_Pack-4.1.2-73507.vbox-extpack
vboxmanage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.1.2-73507.vbox-extpack

Finally for safe measures:

signal-event post-upgrade
signal-event reboot
Posted in SME Server | Tagged | Leave a comment

VirtualBox Guest Additions Stopped Working for Ubuntu Guest

After a kernel update the vboxsf mounts would no longer mount.
Error message:

Device not found

Solution:

sudo apt-get install dkms


Posted in SME Server | Tagged | 1 Comment

Password Management – KeePass

I reluctantly gave up on Iiumsoft's eWallet for password management. After over the years buying/running it on Windows, Palm, PocketPC, Smartphone, iPhone and Android when in stopped working under Wine for Linux I decided it was time for a change. The beauty of eWallet was the syncing between my laptop and phone, but I really needed syncing between the different computers I use and my phone. If I add a password in one place and it isn't on the next computer then it isn't helping. After spending way too much time looking at options I decided in KeePass2 for password management and UbuntuOne for keeping everything in sync. I looked briefly at LastPass, but to get phone syncing you need premium version. For some reason I can't explain, I'd much rather donate $20 voluntarily toward something like KeePass2 then pay the fee for LastPass. Anyway KeePass2 works great on Win32 with Firefox, OK with FireFox on Linux with PassIFox add-in and OK on Android (it is read-only on Android, but so far that hasn't been an issue). All of the platforms run UbuntuOne and sync and KeePass folder that only contains the encrypted KeePass database. It's small enough that if I make a change and then shutdown the computer the change has already been propagated to the cloud. Installation (Linux):

sudo apt-get install mono-devel

  • Install KeePass2 from the Ubuntu Repo (this get the menu setup for you)
  • KeePass 2.17 is not in the Ubuntu repos at this time, so download the Portable version for the web site.
  • Copy zip contents to over the version installed from the repo (/usr/lib/keepass2)
  • Get Newtonsoft.Json.dll and KeePassHttp.dll from the KeePassHttp and copy them into the same path. These are required for the Linux Firefox Plugin PassIFox.
  • Make sure the dependencies are installed
  • Open FireFox and install the PassIFox plugin
Posted in Linux General | Tagged | Leave a comment

Ubuntu 11.10 – 12.04 Tweaks

Many of these things aren't 11.10 specific, but since I find myself applying the same changes to each machine I install a list seemed prudent. Without a list I wind up trying to figure out why X works on one computer but not another. Play encrypted DVDs

sudo apt-get install libdvdread4

sudo /usr/share/doc/libdvdread4/install-css.sh

Add Medibuntu Repository

sudo wget –output-document=/etc/apt/sources.list.d/medibuntu.list http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list &&sudo apt-get –quiet update && sudo apt-get –yes –quiet –allow-unauthenticated install medibuntu-keyring && sudo apt-get –quiet update

Classic Menu

http://www.noobslab.com/2011/07/classic-menu-indicator-on-ubuntu-1104.html

Menu Editor (and other Gnome stuff)

sudo apt-get install gnome-session-fallback

Allow stuff so display in top panel

gsettings set com.canonical.Unity.Panel systray-whitelist "['all']"

Kdenlive Latest Version My Favorite Video Editor

sudo add-apt-repository ppa:sunab/kdenlive-release && sudo apt-get update && sudo apt-get install kdenlive

sudo apt-get upgrade {this will get the new MLT packages}

Posted in Linux General | Tagged , , | Leave a comment

Removing open_basedir restriction from an iBay

Taken from: http://contribs.org/modules/phpwiki/index.php/TroubleshootingFAQ

* PHP Warning: (…) open_basedir restriction if installing anything PHP related in ibay

Related to open_basedir setting in php.ini file. SME does not allow PHP in /tmp or /usr/share. This is a security measure. PHP values are set per ibay in the template:

/etc/httpd/conf/httpd.conf/95AddType00PHP2ibays

There you can set the basedir (or the includedir) for all ibays by changing the template.

These commands solves it, tmp could be another location where PHP wants to write.

/sbin/e-smith/db accounts setprop PHPBaseDir /home/e-smith/files/ibays//:/tmp
/sbin/e-smith/signal-event ibay-modify

Posted in SME Server | Leave a comment

PERC 5/i Array Management

Dell Open Management System Administration doesn’t work on the PERC 5/i

Dell SAS Storage Manager can’t add drives to an existing array

LSI MegaRAID Storage Mananger is the key

Download here

Command Line Cheat Sheet

Add Drive to existing Array

1. Connect the new drive to the controller. You may connect it while your server is working if you have how swap bays.

2. Open MegaRAID storage manager. You may also do the following procedure from BIOS but I would not recommend that because the procedure may take many hours (10+) and you dont want your server off-line for that long.
3. Click “Logical”
4. Right click on the virtual disc with the 3*1.5TB disks and select Advanced Reconstruction Wizard.
5. Click Add drive
6. Select the new disk and click “Add”.
7. Make sure that the correct RAID level is selected (RAID 0 or RAID 1).
8. Click next (or accept).

I just done this procedure. The perc is reconstructing the array on the fly. I can access my files while it is reconstructing the array.

Configuration backup

If the perc5 dies you have to find another perc5 with the same or newer firmware and the same configuration.

It is highly recommended that you save the configuration on a safe place (usb stick, email, CD-R). You may save the configuration file using MegaRAID storage manager.

I cleared the perc5 configuration once by accident and I was not able to recover the array data because I did not have the configuration file. I was lucky I made that mistake on my personal computer and not on a working server.

Posted in SME Server | Leave a comment