Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > ORM Profiler> Debugging startup problems
 

Pages: 1
ORM Profiler
Debugging startup problems
Page:1/1 

  Print all messages in this thread  
Poster Message
Benjamin23
User



Location:

Joined on:
15-Nov-2017 15:50:13
Posted:
25 posts
# Posted on: 05-Jul-2019 08:23:47.  
Hello,

we are having problems with the profiler.

All of the required DLL's are loaded and the application is started successfully, however, there's no output in the profiler.

One change that we've made is installed latest dotConnect for PostgreSQL in the last week and updated windows to the latest release of Windows 10.

After that the profiler stopped working, before it was working fine.

Are there any logs that we can inspect or do you have any tips for us on how to troubleshoot this?

We are using LLBLGen 5.3 with PostgreSQL for our development and I've testing with both ORMProfiler 1.5 and 2.0, and none work currently.
  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37561 posts
# Posted on: 05-Jul-2019 09:32:22.  
LLBLGen Pro uses Npgsql for postgresql, so all queries will be executed using that ADO.NET provider. They still should be showing up in the profiler though. dotConnect is from devart, and the DQE doesn't support that one (although if you pass it on .net standard through the RuntimeConfiguration it could work, we just haven't tested that)

You're not specifying whether you're using .net core or .net framework. If the former, you have to wrap the factory using https://www.llblgen.com/Documentation/ORMProfiler/2.0/Getting%20Started/EnablingForProfiling.htm#net-core-2.0 If you're using .net framework, the factories are wrapped by the profiler at app startup, so make sure the interceptor is called before anything else.



Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
Benjamin23
User



Location:

Joined on:
15-Nov-2017 15:50:13
Posted:
25 posts
# Posted on: 05-Jul-2019 16:09:22.  
We are using npgsql also (3.2.6 version to be exact).

I've just reinstalled and still nothing.

The application is a console application written in .Net 4.7.1.

The gudies from the link you posted have been implemented.

In the curren scenarion, we are using the DLL's from:
C:\Program Files (x86)\Solutions Design\ORM Profiler v1.5

And those are
SD.Tools.Algorithmia
SD.Tools.BCLExtensions
SD.Tools.OrmProfiler.Interceptor.EFv6.NET40
SD.Tools.OrmProfiler.Shared

We've also tested with SD.Tools.OrmProfilder.Interceptor.NET45 but still no response.

  Top
Walaa
Support Team



Location:

Joined on:
21-Aug-2005 16:03:48
Posted:
14498 posts
# Posted on: 05-Jul-2019 19:37:30.  
Quote:
I've just reinstalled and still nothing.

What did you install, the ORM Profiler or the npgsql?

Quote:
The gudies from the link you posted have been implemented.

That's only needed for .NET core.

Please open the ORMProfiler.exe.config file and add the npgsql DBProviderFactory, there is a commented sample, so you will know what you should do.


  Top
Benjamin23
User



Location:

Joined on:
15-Nov-2017 15:50:13
Posted:
25 posts
# Posted on: 05-Jul-2019 20:25:37.  
Walaa wrote:
Quote:
I've just reinstalled and still nothing.

What did you install, the ORM Profiler or the npgsql?

npgsql

Quote:
The gudies from the link you posted have been implemented.

That's only needed for .NET core.

Sorry, I didn't express my self correctly. We've done the setup for .Net full according to the site. Meaning, we only added the call to the Initialize method.

Quote:

Please open the ORMProfiler.exe.config file and add the npgsql DBProviderFactory, there is a commented sample, so you will know what you should do.


Tried this, but still not luck.

  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37561 posts
# Posted on: 06-Jul-2019 10:34:40.  
In your app's setup function/method, where you call the Interceptor's initialize method, AFTER the call to the initialize method, try:

var factory = DbProviderFactories.GetFactory("npgsql");
string fullTypeName = factory.GetType().FullName;

'factory' is now a wrapped factory. so fullTypeName should be the profiler factory, not Npgsql's.

If the application itself works fine, but nothing arrives in the client, it might be something's blocking the named pipe from the interceptor to the profiler client. It only works if both run on the same machine. We use windows 10 (1809) and that works fine, also with npgsql, so without a repro case we can't do much else than guess..


Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
Benjamin23
User



Location:

Joined on:
15-Nov-2017 15:50:13
Posted:
25 posts
# Posted on: 08-Jul-2019 08:14:20.  
Otis wrote:
In your app's setup function/method, where you call the Interceptor's initialize method, AFTER the call to the initialize method, try:

var factory = DbProviderFactories.GetFactory("npgsql");
string fullTypeName = factory.GetType().FullName;

'factory' is now a wrapped factory. so fullTypeName should be the profiler factory, not Npgsql's.

If the application itself works fine, but nothing arrives in the client, it might be something's blocking the named pipe from the interceptor to the profiler client. It only works if both run on the same machine. We use windows 10 (1809) and that works fine, also with npgsql, so without a repro case we can't do much else than guess..


I've tested it, and it is, here's the output:

SD.Tools.OrmProfiler.Interceptor.ProfilerDbProviderFactory`1[[Npgsql.NpgsqlFactory, Npgsql, Version=3.2.6.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7]]

I did some research for the named pipe that you mentioned.

When I do an export in Powershell using: [System.IO.Directory]::GetFiles("\\.\\pipe\\")

I get the \\.\\pipe\\SD.Tools.OrmProfiler enrtry

However, when I use Process Explorer (https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer) I don't see that entry.

My guess is that something is preventing my application from pushing data into that pipe, any suggestions on how I can debug that? Regular Smiley

  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37561 posts
# Posted on: 08-Jul-2019 10:10:09. Goto attachments  
If the interceptor can't connect to the pipe, it stops silently, as in production code you don't want exceptions to flood some log just because a client isn't available.

If the client is up and on the same machine, in process explorer you should see:
File    \Device\NamedPipe\SD.Tools.OrmProfiler

If you're using the latest ormprofiler client (2.0.1) it's recommended that you use the v2.0 interceptor as well.

The factory is properly wrapped so messages should be send. What I'm a bit puzzled about is your remark: "installed latest dotConnect for PostgreSQL". The factory that's wrapped is v3.2.6, which is definitely not the latest npgsql (if that's what you meant with dotconnect for postgresql).

If the only other thing that has changed is windows 10 latest version it might be something with the firewall in windows, but then again, I have a bit of doubt why that would be a problem with a named pipe.

Additionally, the user the app runs under, is that the same as the ormprofiler client? Perhaps it doesn't have the right ACL to access the named pipe, although we never had problems with that.

I've attached a debug build of the interceptor for .net full (profiler 2.0) which will rethrow the exception if it runs into one while connecting. This might give more insight in why this is. If you're using R# or Rider, you could step into the code of the InterceptorCore.Initialize() method and see what's going on when it tries to connect in NamedPipeChannel.ConnectToPipeThreadBody



Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
Benjamin23
User



Location:

Joined on:
15-Nov-2017 15:50:13
Posted:
25 posts
# Posted on: 08-Jul-2019 14:02:47.  
I've checked your .dll and it's not throwing any exceptions, everything runs fine.

I've swithed the other DLL's for the final version and got rid of everything from the 1.5 version of ORM profiler.

dotConnect is used in our other projects, it this particular project we are using npgSQL. My reference to dotConnect what that that and the Windows update were the only changes made in the last week.

I've tried disabling the Firewall and my anti virus software, but still nothing.

Could you attach the pdb file of the dll you attacheds so I can debug it from VS? If it's not a problem?

I've restarted everything and now I saw the named pipe in the Process Explorer.
  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37561 posts
# Posted on: 08-Jul-2019 14:55:52. Goto attachments  
Sure, it's attached.

Weird problem though, I have no idea why this suddenly fails...


Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
Benjamin23
User



Location:

Joined on:
15-Nov-2017 15:50:13
Posted:
25 posts
# Posted on: 09-Jul-2019 16:08:41.  
Where can we download the latest version of the ORM Profiler? On the My Account page we can se only LLBLGen download links.
  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37561 posts
# Posted on: 09-Jul-2019 21:06:45.  
Under My account -> Downloads, it's the top link Regular Smiley

Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
Benjamin23
User



Location:

Joined on:
15-Nov-2017 15:50:13
Posted:
25 posts
# Posted on: 10-Jul-2019 07:54:53. Goto attachments  
Otis wrote:
Under My account -> Downloads, it's the top link Regular Smiley


Maybe I'm partially blind, but I don't see it Laugh

I've attached a screenshot of the dropdown
  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37561 posts
# Posted on: 10-Jul-2019 09:11:04.  
Oh my bad, you have to have a valid subscription to download it. (as it's free for people with an active subscription). I was under the assumption you were using v2.0.1 of the orm profiler. Sorry for this confusion. Embarrassed

Anyway, v1.5 should work with .net full (if you use the v1.5 interceptor). The build I gave is for 2.0, not 1.5. In your start post you said you tested with orm profiler 2.0 so I assumed you had the 2.0 client.



Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
Benjamin23
User



Location:

Joined on:
15-Nov-2017 15:50:13
Posted:
25 posts
# Posted on: 10-Jul-2019 09:22:34.  
Otis wrote:
Oh my bad, you have to have a valid subscription to download it. (as it's free for people with an active subscription). I was under the assumption you were using v2.0.1 of the orm profiler. Sorry for this confusion. Embarrassed

Anyway, v1.5 should work with .net full (if you use the v1.5 interceptor). The build I gave is for 2.0, not 1.5. In your start post you said you tested with orm profiler 2.0 so I assumed you had the 2.0 client.



I had 2.0 Beta installed so I wanted to upgrade it to 2.0, but if it's not available, that's fine.

Could you please send me debug dll and pdb file for 1.5? If it's not a problem?
  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37561 posts
# Posted on: 10-Jul-2019 11:47:00. Goto attachments  
I've attached the normal and .net45 interceptor for 1.5 (debug build) with pdbs. I've also augmented the code so it'll throw the exception if it catches any during connect.



Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
Benjamin23
User



Location:

Joined on:
15-Nov-2017 15:50:13
Posted:
25 posts
# Posted on: 10-Jul-2019 12:42:40.  
Thanks for the files, I've tested on the current project and it's still not working and there are not errors Dissapointed

However, I've tested on another (older) project, and everything is working, I can see output in the ORM Profiler Dissapointed

I'll try and compare what are the differences between the two of them and let you know if I find anything.

Thanks for all the help.
  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37561 posts
# Posted on: 10-Jul-2019 14:27:27.  
Hmm. Very strange! Hopefully you'll find something. These things can get hairy to debug... if we have to provide more info about code etc., let us know.

Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.