Category Archives: Servers

VMware ESX : Failed to connect ethernet0

You may encounter this error on VMware ESX / ESXi server on a guest event console (on vSphere Client) :

Error message from host.domain.tld: Failed to connect ethernet0

Of course, the guest system have no functional network.

This probably happen if you actually rename a Virtual Network that was previously used by the guest. Changes does not apply automatically on guests.

To solve this, simply do :

- Go to Summary tab > Click on Edit settings
- Click on Network adapter 1 > and select the proper Network label inside the Network connection section.

Linux : Install Webmin from YUM repository

Webmin and Usermin can be installed and updated directly through YUM. To achieve this, we need to setup manually the repository.

First, create the .repo file for YUM :

vi /etc/yum.repos.d/webmin.repo

Copy, paste and save the following :

[Webmin]
name=Webmin Distribution Neutral#baseurl=http://download.webmin.com/download/yum
mirrorlist=http://download.webmin.com/download/yum/mirrorlist
enabled=1

Save the PGP key :

wget http://www.webmin.com/jcameron-key.asc

Import the key :

rpm –import jcameron-key.asc

You are now all set to install the software :

yum install webmin

yum install usermin

(Packages will be automatically updated each time you run a “yum update”)

OpenVPN : Unable to obtain Session ID

Using OpenVPN Server on Linux as well as Windows machine, you may encounter this error trying to connect a client :

Unable to obtain Session ID from “vpn.domain.tld”, port(s)=443: XML-RPC: TimeoutError

This happen because HTTPS (SSL) port (TCP-443) is closed either on the server or firewall (server-side).

You also need the following ports open in order to get OpenVPN working :

TCP-943
TCP-1194
UDP-1194

Windows : Microsoft.ACE.OLEDB provider is not registered on the local machine

Trying to import Excel datasheet into MSSQL database using .NET application and get this error?

The ‘Microsoft.ACE.OLEDB.12.0′ provider is not registered on the local machine

This indicate you are required to install the two following component on the server : Access Database Engine as well as Excel.

http://www.microsoft.com/download/en/details.aspx?id=13255

Windows : Asp.NET test page

Just like php, you can create a test page in order to verify if .NET is installed and working properly. The following will also display the running version.

Simply create plain text file using Notepad or your favorite text editor :

test.aspx

And insert this code :

<%@ Page Language=”VB” %>

<script runat=”server”>
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
lblVersion.Text = “Your server is running ASP.NET and the version is ” & System.Environment.Version.ToString()
End Sub
</script>

<html>
<head>
<title>ASP.NET Version</title>
</head>
<body>
<form id=”form1″ runat=”server”>
<asp:Label ID=”lblVersion” runat=”server”></asp:Label>
</form>
</body>
</html>

Linux : Increase maximum open file descriptors

On most heavy usage servers, you probably need to override the maximum open file descriptors in order to handle the load! Do not play with this setting blindly, make sure you know what you’re doing! In most case, you will be warned in log wit message like this : Too many open files

You may have a look at the current value using the following command :

cat /proc/sys/fs/file-max

To increase it right away without reboot the server simply type (replace the value according your needs) :

sysctl -w fs.file-max=100000

Okay, now you need to add it to sysctl in order to make your new setting permanent (the above command will actually not make the setting survive to reboot) :

vi /etc/sysctl.conf

And add :

fs.file-max = 100000

 

The above was to set the maximum file descriptor system wide. Setting it for specific user is not much difficult.

Edit :

/etc/security/limits.conf

And add :

user soft nofile 8192
user hard nofile 16384

(Replace “user” with the designated username and the number according your needs.)

Linux : mptbase ioc0 WARNING IOC is in FAULT state

Inside system logs (/var/log/messages), you may see some message like this on a system running a RAID controller (this one is from a PERC 5/i on a Dell PowerEdge server) :

mptbase: ioc0: WARNING – IOC is in FAULT state (1600h)!!!
mptbase: ioc0: WARNING – Issuing HardReset from mpt_fault_reset_work!!
mptbase: ioc0: Initiating recovery
mptbase: ioc0: WARNING – IOC is in FAULT state!!!
mptbase: ioc0: WARNING – FAULT code = 1600h
mptbase: ioc0: Recovered from IOC FAULT
mptbase: ioc0: WARNING – mpt_fault_reset_work: HardReset: success

This indicate either a drive is failing or a driver bug. May not be critical at all, but should be taken seriously! Some time the system may hang after displaying this.

If you see a failed message about the recovery/hard reset or a device offlined soon after this message, it’s definitely a failed hard disk. In any situation, have a look at the storage device manager for more information (in this case, since this is a Dell server, we may have a look at OpenManage).

Web : zend_mm_heap corrupted

You may notice this error in the Apache logs : zend_mm_heap corrupted

Try to enable or increase this parameter either in your Apache config, htaccess or php.ini file :

output_buffering = 4096

Active Directory : Change the default display name format for user and contact objects

Here is how to change the default display name format for user and contact objects in Active Directory. By default, it display “Last name and First name”. We want to revert this to “First name, Last name”.

Before doing this step, make sure your user is a member of either “Enterprise Admins” or “Domain Admins” group!

First, open up ADSI Edit console (Start > Run) :

adsiedit.msc

Then, connect to your Domain Controller using the “Configuration mode”.

Expand the following container :

cn=DisplaySpecifiers

Double-click on :

CN=409.NOTE

(This is the code for en-US language. You must change the value matching your language)

Then, right-click and click on Properties on the contextual menu of the following object :

createDialog

Set value to :

%<sn>. %<givenName>

 

Linux : Partition and format external hard drive as ext3 filesystem

This tutorial is about partitioning a USB external hard drive as good for internal drive.

First, list devices on your system using one of the following commands :

dmesg

(USB drive should appear as SCSI drive)

fdisk -l | grep ‘^Disk’

Now, assuming your new drive is “sdb”, use the following command to invoke the fdisk partition utility :

fdisk /dev/sdb

To create a new partition (assuming this is a new unused drive), just type “n“. Then, save your work typing “w” and “q” to exit the utility.

Any doubt or need help about fdisk utility, just type “m“.

Let’s format the partition as traditional EXT3 Linux file system :

mkfs.ext3 /dev/sdb1

Okay, the hard disk partitioning and formatting is done now.

Create a directory where you want to have your drive mounted (replace all “external_hd” value with the name you want to use ) :

mkdir /mnt/external_hd

Mount the drive :

mount /dev/sdb1 /mnt/external_hd

You’re now ready to use it! However, this mount will not survive to a reboot. To make it permanent, you need to edit fstab :

vi /etc/fstab

And add the following line :

/dev/sdb1               /mnt/external_hd           ext3    defaults        1 2

NOTE : If you manually mount the drive instead doing the fstab way, do not forget to manually unmount it before unplug it! Serious data loss problem may occur if you skip this step!

umount /dev/sdb1