Server 2016 security

Started by PaulSamuelson, June 10, 2017, 01:33:01 PM

Previous topic - Next topic

PaulSamuelson

I have a script that needs to run on Windows Server 2016. It does some FTP stuff, then uses ODBC to report it's status. The FTP stuff works fine, but it is unable to make an ODBC connection to report the status.

The following code works on other computers, but not the server, where I get a 1261 error.

I have allowed the port in-bound and out-bound access.
I have allowed the application in-bound and out-bound access.
I have turned off the Windows Firewall altogether.
The application is signed.
I have tried all 4 levels of UAC requested execution levels.

Connections attempts fail whether connecting to it's own ODBC or another ODBC server, both of which work from other machines.

What am I missing?

Thanks,

Paul Samuelson


DBServer="192.168.1.128"
Database="WorkFlowPlus"
User="ODBC"
Pass="xxxx"


cConn=ObjectCreate("ADODB.Connection")
cConn.CursorLocation=3;adUseClient
RS1 = ObjectCreate('ADODB.Recordset')

cConn.ConnectionString='DRIVER={FileMaker ODBC};SERVER=':DbServer:';DATABASE=':Database:';UID=':User:';PWD=':Pass:';'

errormode(@off)
cConn.Open()
errormode(@cancel)
Error = LastError()
Terminate(Error !=0,"oops",dbserver:@lf:"Error Code: ":Error)
Message("Success","Connected to: ":dbserver)

td

You have done a decent job of trying to solve the problem but, unfortunately, I don't have any very helpful recommendations.  The most obvious point of failure is the connection string.  For example, is the appropriate ODBC driver installed?  Are the credentials correct?  Is the driver 32-bit, 64-bit or are there both?

When you have a recent version of WinBatch, many 1261 errors come with the "More Error Info" button enabled on the error message box.  If it is enabled, that information that results from clicking that button could explain a lot.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

JTaylor

Not sure if the following will provide any additional error info over what you are provided now but for what it is worth.   Also, you might try setting up an ODBC Data Source and see if that tests successfully and if so try it in your script.   I realize if you are wanting to connect remotely then that might not be a good solution but it will tell if there are issues with the Driver and the local server connecting.  Been a while since I have done anything with FileMaker so low on other suggestions.   Since it works on other machines I am guessing this isn't the issue but some ObjectOriented stuff gets confused with the ":" concatenator.

Jim

Code (winbatch) Select


ForEach errLoop In cConn.Errors
      strError = "Error #":errLoop.Number:@CRLF:"   ":errLoop.Description:@CRLF:"   (Source: ":errLoop.Source:")":@CRLF:"   (SQL State: ":errLoop.SQLState:")":@CRLF:"   (NativeError: ":errLoop.NativeError:")":@CRLF
      If errLoop.HelpFile == ""
         strError = strError:"   No Help file available"
      Else
         strError = strError:"   (HelpFile: ":errLoop.HelpFile:")":@CRLF:"   (HelpContext: ":errLoop.HelpContext:")"
      EndIf
      Pause('error', strError)
  Next


PaulSamuelson

It was the driver! I assumed with installation of both client and server, there would have been ODBC drivers. I was wrong.

Thanks for quickly solving my problem.

Paul