Technical FAQs

Ask a Question

PME 8.x - Server Error in '/Web' Application: The server was unable to process the request due to an internal error.

Issue
The server was unable to process the request due to an internal error.  For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the configuration behavior) on the server in order to send the exception information back to the client or turn on tracing as per the Microsoft .NET Framework SDK documentation and inspect the server trace logs.



The following error is observed in the Windows Event Log Application:

A problem occurred while updating device nodes. There was no endpoint listening at [..] that could accept the message.



Product Line
StruxureWare Power Monitoring Expert

Environment
Power Monitoring Expert 8.x
Multiple references to more than one PME server in the database. That is, the [Inventory] tables in the ApplicationModules database had entries for the old server as well as the new one following a side by side upgrade or server name change.

Resolution
**Warning: Irreparable database damage can occur. This procedure should only be performed by users familiar with SQL Server Management Studio. Databases should be backed up prior to performing this procedure.

Specific changes are required in order to use an ApplicationModules database on a different server that it was created on. Execute the SQL script 'ApplicationModules-FixInventoryEntries.sql' attached to this article. This script will clear all the extra table entries except the ones required for the current server.

1. Stop the ApplicationModules Host and ION services.
2. Start SQL Server Management Studio and log into the PME instance (default is ION).
3. Backup the ION_Network, ION_Data and ApplicationModules SQL databases.
4. Start a 'New Query' and select the ApplicationModules database.
5. Copy/Paste the query below into SQL Server Management Studio.
6. Execute the query.
7. Verify that the changes within the databases have taken effect successfully and then restart the ApplicationModules Host and ION services.

Execute the following query in SQL: 

USE ApplicationModules
SELECT TOP 1000 [ServerId]
      ,[Name]
  FROM [ApplicationModules].[Inventory].[ApplicationServer]

Ensure that the there is one entry in the table where 'ServerId' is 1 and the current servername is located in the 'Name' field.

8. Re-attempt to log onto Web Applications.

SQL Query:

-- Fixing the entries in the [ApplicationModules].[Inventory] tables.

-- NOTE:  If necessary, change the following line to match the actual name of the ApplicationModules database on the system.
USE [ApplicationModules]

-- Delete all the Inventory entries that got created for any other servers besides the main one.
BEGIN TRY
    BEGIN TRAN

    -- Find the ID of the main server by name.
    DECLARE @CustomerApplicationServerId INT
    SET @CustomerApplicationServerId = (SELECT [ServerId] FROM [Inventory].[ApplicationServer] WHERE [Name] = N'SERVERNAME') --ENTER SERVER NAME

    -- Start with deleting the extra HostedService entries.
    DELETE FROM
        [Inventory].[HostedService]
    WHERE
        [HostId] IN (SELECT [HostId] FROM [Inventory].[Host] WHERE [ServerId] <> @CustomerApplicationServerId)

    -- Delete all the Host entries that got created for any other servers than the correct one.
    DELETE FROM
        [Inventory].[Host]
    WHERE
        [ServerId] <> @CustomerApplicationServerId

    -- Delete all the ApplicationServer entries that got created for any other servers than the correct one.
    DELETE FROM
        [Inventory].[ApplicationServer]
    WHERE
        [ServerId] <> @CustomerApplicationServerId

    IF (@@TRANCOUNT > 0)
    BEGIN
        COMMIT TRAN
    END
END TRY
BEGIN CATCH
    -- Because the deletions failed in some way, roll back the transaction.
    IF (@@TRANCOUNT > 0)
    BEGIN
        ROLLBACK
    END
    
    -- Output error information to describe what went wrong.
    SELECT
        ERROR_NUMBER() AS ErrorNumber,
        ERROR_SEVERITY() AS ErrorSeverity,
        ERROR_STATE() AS ErrorState,
        ERROR_PROCEDURE() AS ErrorProcedure,
        ERROR_LINE() AS ErrorLine,
        ERROR_MESSAGE() AS ErrorMessage;
END CATCH

 
Was this helpful?
What can we do to improve the information ?