Search This Blog

Tuesday, 17 July 2012

Cannot connect to a SQL Server 2008 on port 1433

I had a problem trying to connect a new SQL Server 2008 R2 Express when setting up an ODBC connection. The problem is all related to the network port that the SQL Server is listening on. This is outlined in the Microsoft Article KB 823938

ODBC Connection

media_1342535534541.png

I have setup an ODBC link to the new SQL Server 2008 R2 instance

Connection Failure

media_1342535543986.png

When I atttemped to connect to the SQL Server I got this error.

Listening Ports

media_1342535573106.png

So next I ran a netstat - na to see if the SQL Server was listening on port 1433 and I could see pretty quick that it was not.

Registry Change

media_1342535596629.png

The next step was to change the port the SQL Server instance was using, this is done in the registry in the key

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\<InstanceName>\MSSQLServer\SuperSocketNetLib\Tcp

The SQL Server was using port 51447 which was dynamically assigned and I wanted to use TCP 1433 which is the default for SQL Server.

Client ODBC

media_1342535673165.png

Back on the client I have changed the connection port in the ODBC wizard to 1433

Connected

media_1342535684893.png

Now I am able to connect to the SQL Server and I can see the databases available in the dropdown.

Test Complete

media_1342535696532.png

Now I can complete the wizard and I have a connection.

Listening on Port 1433

media_1342535742440.png

Back on the SQL Server I used the netstat - na command and this time I could see my server listening on port 1433.

Sunday, 15 July 2012

Sharepoint WSS 3.0 - Microsoft##SSEE is not accessible to missing Windows Internal Database signatures.

I woke up Saturday morning to find that our Sharepoint WSS 3.0 site was no longer available, so here is what you can do if you have the same issue. The process is documented in this Microsoft KB article

HTTP 404 Error

media_1342354635776.png

So here is the problem with my companyweb site, a HTTP 404 page not found error.

Event Logs

media_1342354653933.png

A quick check of the event logs finds this message. Event ID 6800 The database ShareWebDB on SBIZ\Microsoft##SSEE is not accessible to missing Windows Internal Database signatures. What this really means is that a Windows Security Update for Sharepoint has been applied but it cannot complete untl the Sharepoint Configuration Wizard is ran, so this leaves you in limbo. This is why we use monitoring to tell when our websites are offline. We use GFI Remote Management, they are a UK business and we think their software is awesome so go find out.

STSADM

media_1342355216113.png

The MIcrosoft KB states we need to use the STSADM tool, this is located in C:\Program Files\Common Files\Microsoft Shared\Web Server Extensitons\12\bin

Stop Provisioning

media_1342355349683.png

The first step is to stop the provisioning service. stsadm -o provisionservice -action stop -servicetype spwebservice -servicename ""

The second step is to start the provisioning service. stsadm -o provisionservice -action start -servicetype spwebservice -servicename ""

Upgrade the Sharepoint Site

media_1342355465317.png

Now the Sharepoint Site is ready to be upgraded. psconfig -cmd upgrade -inplace b2b -wait -force

Is it one of those days?

media_1342356252158.png

As ever, things do not always go to plan. So when I tried to upgrade the Sharepoint Site, I was presented with this error. What this means is that the upgrade failed and we should consult the logs to find out why. Well it turns out what you need to do is restart the Windows Internal Database Services first.

GUI Version

media_1342355750106.png

I ran the GUI version of the Sharepoint Configuration Wizard so I could see each step and this time the upgrade completed.

Confirm Upgrade

media_1342356226422.png

Once the upgrade is completed, you can confirm this in the Windows Event Log, the event ID is 101.

Friday, 13 July 2012

GFI RM - Offline Agent caused by an Upload error

If you find that a GFI Agent cannot upload and communicate with your dashboard then try this quick check for DNS issues.

Overdue Server

media_1342161727968.png

So here is my issue, this server is overdue. But it is online in LogMeIn so it is not an Internet access issue. So whats up?

Agent

media_1342161738787.png

I check the Agent on the server and here is the issue, Upload error. The Agent cannot communicate with the servers at GFI.

Agent Log

media_1342161745298.png

I check the Agent Connection Log and my thoughts are confirmed, we have an invalid response from server error. Now this doesnt mean that the server gave an invalid response, in fact no response is invalid. Any response that is not the right one is invalid, such is the logic in IT.

Advanced Agent Logs

media_1342161797373.png

We need to check the logs for what is happening when the Agent tries to communicate. These are located in C:\Program Files (x86)\Advanced Monitoring Agent

Debug Log

media_1342161804884.png

The information we need is in the file debug.txt

Inside the log file

media_1342161841043.png

Here in the log we can see at 1. that the Agent is trying to resolve the DNS name upload4.systemmonitor.co.uk and that at 2. this is failing. Now I do not know that 0x00002ee7 means a DNS lookup failure, this is a hunch.

Nslookup

media_1342161860408.png

So based on my hunch I use nslookup to see if I can resolve the DNS name and I find I cannot. So this means the Agent cannot and therefore I cannot upload.

Nslookup on a working system

media_1342161871434.png

Here is the same nslookup on my laptop so now I know that DNS is working on the Internet and it is my server that is the issue.

DNS for Agent

media_1342161890496.png

The Agent is running on a network that uses a Windows 2008 R2 Server for DNS, so I check the DNS properties and find there is no forwarder. This means the DNS server cannot lookup domains that it is not responsible for. NB We could talk about Root Hints, but lets not today.

Add Forwarders

media_1342161908614.png

In the DNS properties I add two forwarders, I use Open DNS. You should too, there are awesome.

Nslookup with DNS

media_1342161916557.png

I now run my nslookup on the Agent Server again and we now have the name resolved.

Agent Checks

media_1342162173244.png

I re run the Agent checks and now we have Upload OK. Of course I still have my errors to deal with. I didnt say I was that good.

Wednesday, 11 July 2012

Cisco ASA CSC - Access to certain websites is very slow with the Trend Security Module

Problems when you have a Cisco ASA 5510 and the CSC Module for Malware scanning.

Reference http://www.cisco.com/en/US/docs/security/csc/csc60/administration/guide/csc8.html#wp1052642

Slow Website Access

The initial issue is that a website is not loading quickly, this will be slower than normal and if you test the website from another Internet connection the page loads normally within a few seconds. You find that it only loads slowly from your network where you have the Cisco ASA 5510 and the CSC Module.

Change ACL for the CSC Traffic

There are some websites that will not work well through the HTTP scanning in the CSC Module and so it is necessary to exclude them from being scanned. This is controlled by your ACL for the CSC traffic.
So in this example we want to exclude the website hosted on 192.168.1.1 so we have to change our acl to first deny traffic to the site we want to exclude and then allow all other traffic. When we access the site on 192.168.1.1 this triggers the deny rule and so the traffic is not included in the class map my_csc_class and thefore it is not passed to the CSC Module for HTTP scanning.
! exempt http traffic to 192.168.1.1
access-list 101 deny tcp any host 192.168.1.1 eq http
! catch everything else
access-list 101 permit tcp any any eq http
class-map my_csc_class
match access-list 101
policy-map my_csc_policy
class my_csc_class
csc fail-close
service-policy my_csc_policy interface inside

Cisco ASA logs

media_1342024317689.png
Here you can see the command show access-list csc_out which is the acl for matching the traffic to be scanned, I have added a line
access-list csc_out extended deny tcp 10.0.4.0 255.255.255.192 host 91.206.232.220
The IP address 91.206.232.220 is the actual IP of the site I want to exclude in the real world and now you can see that the hitcount for this is 8 in the deny acl and 150 in the permit acl. So what is happening is that when the site loads the first 4 hits on http are denied as per our acl and then the other hits on http are on our permit acl and are allowed. In this instance the site went from a load of over 2 minutes to under 10 seconds so excluding the IP address of the site in DNS has resolved the issue.

Saturday, 7 July 2012

Anti Virus Removal Tools

Many times I will find that an Anti Virus application did not uninstall correctly and multiple registry entries are left behind and you cannot install a new application. So I have a list of the removal tools for several major application vendors that you can use to remove all traces of the applications.

Kapersky - http://support.kaspersky.com/faq/?qid=208279463

Trend Micro Worry Free Business - http://esupport.trendmicro.com/solution/en-us/1057237.aspx

AVG - http://www.avg.com/ww-en/utilities

Sophos - It would appear Sophos do not have a generic tool for removal at present

Symantec - http://www.symantec.com/business/support/index?page=content&id=HOWTO74877 Symantec require you have a Tech Case with them so this is only going to help if you are under contract :(

Citrix XenApp- LDAP in Merchandising Server

When you setup Active Directory Sync in Merchandising Server, you might find this handy for getting the syntax right.

LDAP Syntax

media_1341413105710.png
When I was setting up the Active Directory sync in the MS, I understoof the Bind DN field to want a format of CN=sa-receiver,OU=cscm,ou=co,ou=uk but I found this did not work, it actually needs to have the format of domain\username Then you have to make sure the Base DN looks to the OU you have all your tenants located. This may save you some googling and you can spend that time having a brew or some such.

Sharepoint - Missing the PDF icon

Are you missing that PDF icon in your Sharepoint Site? It is not included by default so you have to get a GIF image and then follow this guide from Microsoft.

http://support.microsoft.com/kb/832809