Monday, December 28, 2015

OpenVPN Add Route requires Run As Administrator

By Steve Endow

I use OpenVPN to connect to my network when I'm remote.  There was quite a learning curve getting it setup and configured, but now that I've been through that gauntlet, it works pretty well.  I can use it on my Windows laptops, as well as my iPhone and iPad, which is a nice bonus.  So I have the option to pull out my iPhone, connect to my network, connect to my desktop or VM servers, and take care of a quick fix.

I recently bought a Surface Pro 4 and got it all configured, including OpenVPN.  It worked fine when I connected from my work network, so I thought I was all set.

I'm up at Lake Tahoe this week and I'm somewhat futilely attempting to get some work done when the kids are asleep.



When I used OpenVPN, it would connect to my VPN server, but for some reason I couldn't connect to any of the machines on my network.

Looking at the log, I noticed a bunch of error messages.


"ERROR: Windows route add command failed"

I also saw that "Access is denied" was also listed in the log.  Although it did connect to my VPN server, I was unable to connect to the machines on my network.

Based on the "Access is denied" message, on a hunch, I set the OpenVPN GUI to run using Run As Administrator and then connected again.

It connected fine, there were no more error messages, and I was able to connect to my VM servers just fine.


I've seen UAC and the whole Run As Administrator feature result in so many frustrating errors, even when logged in as a local Administrator.  You just never know when it is causing a problem, so you always have to try it to rule it out as the cause of an issue.

Steve Endow is a Microsoft MVP for Dynamics GP and a Dynamics GP Certified IT Professional in Los Angeles.  He is the owner of Precipio Services, which provides Dynamics GP integrations, customizations, and automation solutions.

You can also find him on Google+ and Twitter

http://www.precipioservices.com

Wednesday, December 23, 2015

eConnect imports invalid Inventory Transaction causing divide by zero error when posting

By Steve Endow

I have the privilege of seeing lots of strange things in Dynamics GP.

I had a call with a customer who was having a problem posting a batch using Post Master Enterprise.  Other batches would post fine, but one batch kept failing at 97%, without any specific error message.

After resetting the batch status, we opened the batch in GP and reviewed the batch Edit List report.  No errors.  Everything looked fine.

We then attempted to post the batch within GP and at the same 97% mark, we received this error:


EXCEPTION_CLASS_SCRIPT_DIVIDE_BY_ZERO

Now we were making some progress!

The good thing about Divide by Zero errors is that you know what to look for:  A zero.

We then queried the IV10001 table and behold there was the culprit.


The QTYBSUOM field had a value of zero, while every other row had a value of 1.

Once we changed the field value to 1, the batch posted successfully.

The client imports the IV transactions with eConnect, so obviously eConnect is not validating something and is importing the record with an invalid value.

We queried the IV10001 table for other records with this issue and found several more.  All were related to the same item number, so it seems to be isolated to a single item number.

The client is going to research that item setup to try and identify the root cause.

Fun times!


Steve Endow is a Microsoft MVP for Dynamics GP and a Dynamics GP Certified IT Professional in Los Angeles.  He is the owner of Precipio Services, which provides Dynamics GP integrations, customizations, and automation solutions.

You can also find him on Google+ and Twitter






Monday, December 7, 2015

SQL Server Express idle feature causes .NET SQL error: TCP Provider The specified network name is no longer available

By Steve Endow

I just spoke with a partner who is testing Post Master Enterprise, which is a .NET application that automatically posts Dynamics GP batches.

Post Master Enterprise would run fine for a while, but would then log this error:

A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - The specified network name is no longer available.) 


On the surface, this is indicating that Post Master is unable to find or connnect with the SQL Server.  This is very strange, since Post Master was working fine, was communicating with the server, and the error seems to occur randomly.

I asked the partner to check the SQL Server logs.  When he opened the logs from SQL Server Management Studio, we saw hundreds of these events.


"Server resumed execution after being idle 1792 seconds: user activity awakened the server"

The time stamp on the events corresponded with the network error that Post Master was receiving.

What in the world does that message mean?  Why would SQL Server be "idle", and since when does SQL need to be "awakened"?

When I searched for this message, I found this MSDN blog post:

http://blogs.msdn.com/b/sqlexpress/archive/2008/02/22/sql-express-behaviors-idle-time-resources-usage-auto-close-and-user-instances.aspx

It appears that SQL Server Express has a "feature" where it will become "idle" after some period of inactivity.  It looks like the feature was added under the guise of performance to somewhat cripple SQL Express.

I asked the GP partner if he was using SQL Server Express in his test environment, and he didn't think so, but when he checked @@VERSION, sure enough, it was Express.


So SQL Server Express was going to sleep, and when Post Master attempted to query the database, it took so long for Express to wake up that Post Master received a network error.

Lesson:  Don't use SQL Express, even for a test environment.

I can't remember the last time I used Express or even saw Express installed anywhere.


Steve Endow is a Microsoft MVP for Dynamics GP and a Dynamics GP Certified IT Professional in Los Angeles.  He is the owner of Precipio Services, which provides Dynamics GP integrations, customizations, and automation solutions.

You can also find him on Google+ and Twitter