Connection failed to hsm luna SA 'C_Initialize' returns 0x30 - hsm

I tried to connect to the luna SA, with the SDK installed and the luna and luna API.
I have access to the moon, and I could open session in putty console.
I used the login that comes in the example, but sends me an error.
code:
public LunaTokenManager tokenManager = null;
tokenManager = LunaTokenManager.getInstance();
try {
tokenManager.Login(password);
}
catch (ProviderException e) {
e.getMessage();
}
to debbug stop in
LunaTokenManager.getInstance();
error:
Exception in thread "main" com.chrysalisits.crypto.LunaCryptokiException: function 'C_Initialize' returns 0x30
at com.chrysalisits.crypto.LunaCryptokiException.ThrowNew(LunaCryptokiException.java:57)
at com.chrysalisits.crypto.LunaAPI.Initialize(Native Method)
at com.chrysalisits.crypto.LunaTokenManager.(LunaTokenManager.java:107)
at com.chrysalisits.crypto.LunaTokenManager.getInstance(LunaTokenManager.java:62)
the documentation says it is not Java error, but I failed to resolve
http://leifj.nordu.net/luna-docs/007-011136-002_lunasa_5-1_webhelp_rev-a/content/sdk/jsp_errors.htm

C_Initialize mentioned in the exception message is a function from PKCS#11 interface - lower level ANSI C API - which is probably used internally by the Java API.
C_Initialize returned 0x30 which is defined as CKR_DEVICE_ERROR which is described as "Some problem has occurred with the token and/or slot". Maybe you did not setup the connection to Luna SA properly?
I remember some certificates needed to be deployed on the client machine but I can't recall the details.

Related

SAP HANA ODBC Connections using SSDT/SSIS

We are migrating our SAP BW instance from MSSQL to HANA DB and have the requirement to use SSIS out of the system. Using SSDT(VS2010), I get a variety of errors when trying to read data from HANA. I have the drivers installed and can connect and query the data in a small C# app I wrote (will post that code below as well).
Similar Stack question here: My settings are:
First error:
Using the .Net Provider for ODBC conncections
I get the following error:
[SSIS.Pipeline] Error: ADO NET Source failed validation and returned error code 0xC0208449.
[SSIS.Pipeline] Error: ADO NET Source failed validation and returned error code 0xC0208449.
Failed Validation? Is this an authorization issue? No
Second Error: Using straight ODBC connection
I get the following errors:
[ODBC Source 4] Error: The AcquireConnection method call to the connection manager HANA_ODBC failed with error code 0xC0014009. There may be error messages posted before this with more information on why the AcquireConnection method call failed.
[SSIS.Pipeline] Error: ODBC Source failed validation and returned error code 0x80004005.
[Connection manager "HANA_ODBC"] Error: There was an error trying to establish an Open Database Connectivity (ODBC) connection with the database server.
Same success on connection manager:
Third Error: Using .NET HANA Provider supplied when you install HANA Client
I don't even see the option for the 32bit DSN. Only the 64bit DSN shows and when user and pass is entered it throws an exception.
64bit DSN:
32bit DSN:
C# that can connect and query data from HANA:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.Odbc;
using System.Data;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
using (OdbcConnection myConnection = new OdbcConnection())
{
string myConnectionString;
myConnectionString = "DSN=HANA32;SERVERNODE=MyHana:30015;UID=SYSTEM;PWD=MyPW;DATABASENAME=DB";
myConnection.ConnectionString = myConnectionString;
try
{
myConnection.Open();
}
catch (System.Data.Odbc.OdbcException ex)
{
Console.Error.WriteLine(ex);
}
if (myConnection.State == ConnectionState.Open)
{
Console.Write("Connection Open");
Console.WriteLine();
OdbcCommand DbCommand = myConnection.CreateCommand();
DbCommand.CommandText = "SELECT \"BATCH\" FROM \"_SYS_BIC\".\"ZBW/ZBATCH_ATTRS\" LIMIT 10";
OdbcDataReader DbReader = DbCommand.ExecuteReader();
while (DbReader.Read())
{
Console.WriteLine(DbReader["BATCH"].ToString());
}
DbReader.Close();
DbCommand.Dispose();
myConnection.Close();
Console.ReadLine();
}
else
{
Console.Write("Failure");
Console.ReadLine();
}
}
}
}
}
Stack question here: Hana and SSIS has an answer but the link in the answer is dead.
Any help on this issue would be greatly appreciated!!
The root cause for this was a bad registry entry on the 32bit driver for HANA ODBC. The correct entries should look like this:
64bit:
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\HDBODBC
32bit:
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBCINST.INI\SAP HANA for MS Excel

SQL Reporting Services, The request failed with HTTP status 404: Not Found

A .net application works at a server which SQL Server 2005 , now we relocate the application to the new server which is SQL Server 2008.
Below is the error when I try to get a report from application:
Server Error in '/Importal' Application.
The request failed with HTTP status 404: Not Found. Description: An
unhandled exception occurred during the execution of the current web
request. Please review the stack trace for more information about the
error and where it originated in the code.
Exception Details: System.Net.WebException: The request failed with
HTTP status 404: Not Found.
Source Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.
Stack Trace:
[WebException: The request failed with HTTP status 404: Not Found.]
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
message, WebResponse response, Stream responseStream, Boolean
asyncCall) +431225
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters) +204
Microsoft.SqlServer.ReportingServices2005.Execution.ReportExecutionService.LoadReport(String
Report, String HistoryID) +69
Microsoft.SqlServer.ReportingServices2005.Execution.RSExecutionConnection.LoadReport(String
Report, String HistoryID) +67
[MissingEndpointException: The attempt to connect to the report server
failed. Check your connection information and that the report server
is a compatible version.]
Microsoft.SqlServer.ReportingServices2005.Execution.MissingEndpointException.ThrowIfEndpointMissing(WebException
e) +4027725
Microsoft.SqlServer.ReportingServices2005.Execution.RSExecutionConnection.LoadReport(String
Report, String HistoryID) +107
Microsoft.Reporting.WebForms.ServerReport.GetExecutionInfo() +121
Microsoft.Reporting.WebForms.ServerReport.SetParameters(IEnumerable`1
parameters) +67 ImportPerformanceKPI.btnList_Click(Object sender,
EventArgs e) +425
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
System.Web.UI.WebControls.Button.RaisePostBackEvent(String
eventArgument) +110
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
+36 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+1565
You will need to configure Reporting Services on your new SQL Server if it's not configured.
You've probably done that.
Inside the error, we have:
[MissingEndpointException: The attempt to connect to the report server failed. Check your connection information and that the report server is a compatible version. ]
Next make sure that your application is pointed at the new instance of SQL Server (it was looking for a 2005 instance). And then check that your application will work with SSRS 2008.

COM Exception with Hummingbird DM API x64

I have a web application which severs as a SAML bridge to Authenticate between the Google Search Appliance and Hummingbird. I am using the Open Text eDOCS DM 5.1 Extensions (x84) PCDClient.dll to connect
For some reason I keep getting
Retrieving the COM class factory for component with CLSID {BAE80C14- D2AC- 11D0 - 8384 - 00A0C92018F4} failed due to the following error: 80040154
When my code makes a call to a login function in the API.
login = new PCDLogin();
Please help..
That's a 'Class not Registered' error. You may need to reinstall the software that created the COM object or use some other method to ensure that the CLSID is there.
If you check the registry for
HKEY_CLASSES_ROOT\CLSID\{BAE80C14- D2AC- 11D0 - 8384 - 00A0C92018F4}
to see if it exists it will give you an idea.
HKCR\CLSID is the registry of 64-bit COM objects, and HKCR\Wow6432Node\CLSID is the registry of 32-bit COM objects. A 32-bit process cannot load a 64-bit DLL into its address space; that's why the two registries are separate.
If the object you're looking for is 64bit but you are trying to load it from 32-bit client, you would get this error.

Google drive Dredit sample app for dotnet

I was following exact the same steps as described in this article to test the dotnet app.
https://developers.google.com/drive/examples/dotnet
My env is visual studio 2010 and IIS 7
Everything was fine. The app deployment was successful and I could see the login screen and the "allow access" dialog. However once I granted access, I saw the following error.
Can anyone help?
Thanks,
Qiang
Server Error in '/' Application.
Failed to find or load the registered .Net Framework Data Provider.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Configuration.ConfigurationErrorsException: Failed to find or load the registered .Net Framework Data Provider.
Source Error:
Line 82: {
Line 83: StoredCredentialsDBContext db = new StoredCredentialsDBContext();
Line 84: StoredCredentials sc = db.StoredCredentialSet.FirstOrDefault(x => x.UserId == userId);
Line 85: if (sc != null)
Line 86: {
Source File: C:\Qiang\DrEdit\Models\Utils.cs Line: 84
You have to install Microsoft SQL Server Compact 4.0, which is used by the Entity Framework to map model classes into database entities.

MS CRM 2011 Install Failure "Action Microsoft.Crm.Setup.Server.InstallConfigDatabaseAction failed."

I'm trying to install MS CRM 2011, and I continually get the
"Action Microsoft.Crm.Setup.Server.InstallConfigDatabaseAction failed.--->System.Security.Authentication.AuthenticationException: Logon failure: unknown user name or bad password.---> System.DirectoryServices.DirectoryServicesCOMException: Logon failure: unknown user name or bad password."
Error. I've tried to uninstall and Reinstall SQL 2008. I have to apply the SP1 patch to it everytime I create an instance - which goes through ok. I don't get any errors in the wizard until it actually starts the installation process. Afterward I continually get this error. Here is a copy of the log:
11:49:22| Error| Installer Complete: ConfigDBInstaller - Error encountered
11:49:22|Warning| Error reported while configuring _Deployment. Attempting rollback
11:49:22| Info| ConfigDBInstaller: Beginning uninstall operation
11:49:22| Info| Executing Uninstall action:Microsoft.Crm.Setup.Server.UnregisterRoleAction
11:49:22| Info| UnregisterRoleAction does not apply since _Deployment is not a explicit server role.
11:49:22| Info| CrmAction execution time; UnregisterRoleAction; 00:00:00.0050000
11:49:22| Info| ConfigDBInstaller: Uninstall completed
11:49:22| Error| Install exception.System.Exception: Action Microsoft.Crm.Setup.Server.InstallConfigDatabaseAction failed. ---> System.Security.Authentication.AuthenticationException: Logon failure: unknown user name or bad password.
---> System.DirectoryServices.DirectoryServicesCOMException: Logon failure: unknown user name or bad password.
at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
at System.DirectoryServices.DirectoryEntry.Bind()
at System.DirectoryServices.DirectoryEntry.get_AdsObject()
at System.DirectoryServices.PropertyValueCollection.PopulateList()
at System.DirectoryServices.PropertyValueCollection..ctor(DirectoryEntry entry, String propertyName)
at System.DirectoryServices.PropertyCollection.get_Item(String propertyName)
at System.DirectoryServices.ActiveDirectory.PropertyManager.GetPropertyValue(DirectoryContext context, DirectoryEntry directoryEntry, String propertyName)
--- End of inner exception stack trace ---
at System.DirectoryServices.ActiveDirectory.PropertyManager.GetPropertyValue(DirectoryContext context, DirectoryEntry directoryEntry, String propertyName)
at System.DirectoryServices.ActiveDirectory.Domain.GetDomain(DirectoryContext context)
at Microsoft.Crm.Admin.AdminService.ConfigDBSecurity.SystemUserService.GetCaseSafeName(String domain, String accountName)
at Microsoft.Crm.Admin.AdminService.ConfigDBSecurity.SystemUserService.GetCaseSafeName(String name)
at Microsoft.Crm.Admin.AdminService.ConfigDBSecurity.SystemUserService.Create(String name, Guid defaultOrganizationId)
at Microsoft.Crm.Setup.Database.StandardConfigSqlStrategy.AddInitialUser()
at Microsoft.Crm.Setup.Database.DatabaseInstallerBase.Install()
at Microsoft.Crm.Setup.Server.InstallConfigDatabaseAction.Do(IDictionary parameters)
at Microsoft.Crm.Setup.Common.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
--- End of inner exception stack trace ---
at Microsoft.Crm.Setup.Common.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
at Microsoft.Crm.Setup.Common.Installer.Install(IDictionary stateSaver)
at Microsoft.Crm.Setup.Server.ServerRoleInstaller.Install(IDictionary stateSaver)
at Microsoft.Crm.Setup.Common.ComposedInstaller.InvokeInstall(Installer installer, IDictionary stateSaver)
at Microsoft.Crm.Setup.Common.ComposedInstaller.InternalInstall(IDictionary stateSaver)
at Microsoft.Crm.Setup.Common.ComposedInstaller.Install(IDictionary stateSaver)
at Microsoft.Crm.Setup.Server.ServerSetup.Install(IDictionary data)
at Microsoft.Crm.Setup.Common.SetupBase.ExecuteOperation()
11:49:22|Verbose| Method exit: Microsoft.Crm.Setup.Server.ServerSetup.ExecuteOperation
11:49:22| Info| ActivatePage(ServerSetupFinishPage)
Thanks, any and all help is much appreciated!
edit CRM 4.0 Was installed and working perfectly fine. I tried fresh install and upgrade of 2011 edition and im having these problems
Are you an administrator on your domain? The CRM setup process adds some groups to AD, so you'll need access on the domain to create those groups if you are the one running the setup process.
Figured out the problem. I had to reassign the Webserver and application roles on the server, then reinstall sql server. That fixed the issue. For some reason the sql server thought the name had changed or something - despite numerous reinstallations. Not sure why or how - but that fixed it