Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Login failure error while running the application on Mac #4

Open
nouphal opened this issue Mar 23, 2021 · 17 comments
Open

Login failure error while running the application on Mac #4

nouphal opened this issue Mar 23, 2021 · 17 comments
Labels
help wanted Extra attention is needed

Comments

@nouphal
Copy link

nouphal commented Mar 23, 2021

Set up SQL Server and Couchbase Server on Mac.
Run SqlServerToCouchbase application.

Screen Shot 2021-03-23 at 12 34 17 PM

@mgroves
Copy link
Owner

mgroves commented Mar 23, 2021

Are you running the sample console application (SqlServerToCouchbase.Console)? Would you mind pasting the appsettings.config that you're using, or at least the connection string?

@nouphal
Copy link
Author

nouphal commented Mar 23, 2021

Yes, here's the appsettings.json file
{
"SqlServer": {
"ConnectionString": "Server=localhost;Database=master;Trusted_Connection=False;"
},
"CouchbaseServer": {
"ConnectionString": "couchbase://localhost",
"Username": "Administrator",
"Password": "password",
"Bucket": "AdventureWorks2016",
"TargetBucketRamQuotaMB": 1024,
"DefaultUserPassword": "ChangeThisPassword*123"
},
"UseSchemaForScope": true,
"UseDefaultScopeForDboSchema": true,
"TableNameToCollectionMapping": {
"ProductModelProductDescriptionCulture": "ProductModelProductDescCult",

"Production_ProductListPriceHistory": "Production_ProductListPrHist",
"Production_ProductModelIllustration": "Production_ProductModelIllus",
"Production_ProductModelProductDescriptionCulture": "Production_ProdMoProdDesCult",
"Production_TransactionHistoryArchive": "Production_TransactHisArch",
"HumanResources_EmployeeDepartmentHistory": "HumanResources_EmpDeptHist",
"HumanResources_EmployeePayHistory": "HumanResources_EmpPayHistory",
"Sales_SalesOrderHeaderSalesReason": "Sales_SalesOrderHeadSalRea"

},
"Instructions": {
"ValidateNames": true,
"CreateBucket": true,
"CreateCollections": true,
"CreateUsers": true,
"CreateData": true,
"CreateIndexes": true
},
"Sampling" : {
"SampleIndexes": true,
"SampleData" : true
}
}

@mgroves
Copy link
Owner

mgroves commented Mar 23, 2021

For the connection string:

"ConnectionString": "Server=localhost;Database=master;Trusted_Connection=False;"

You'll need a username/password. For example:

Server=localhost;Database=yourDbName;User Id=myUsername;Password=myPassword;

I also noticed that you've pointed to master. I'd recommend pointing to a database other than master. There are a bunch of samples you can find (here's a few that DanylkoWeb has listed) Master is a system database. It might work, but it might not, and it won't be very interesting even if it does.

@nouphal
Copy link
Author

nouphal commented Mar 23, 2021

Updated user id and password in the appsettings.json. Here's the latest error screenshot.
Screen Shot 2021-03-23 at 12 49 34 PM

@mgroves
Copy link
Owner

mgroves commented Mar 23, 2021

Okay, that one looks like you're running one of the web projects, not the console app? Can you verify which one you're running?

If you ARE running the console app, it looks like I did leave some HTTP stuff in there that I don't need anymore (I was looking at using some of the Couchbase REST API). Line 46 or Program.cs, you can just remove .AddHttpClient() and see if that helps. Maybe there's some HTTP dependency that's causing problems on Mac.

@nouphal
Copy link
Author

nouphal commented Mar 23, 2021

Yes, not the the console app. I'm running the Solution project directly.
I'm able to run the application after commenting out shouldCreateBucket, shouldCreateIndexes, shouldCreateData checks.

Screen Shot 2021-03-23 at 3 24 02 PM

.

@mgroves
Copy link
Owner

mgroves commented Mar 24, 2021

Hmm, that is bizarre. If you're still using 'master', it might have something to do with that.

Can you tell me how you are installing/running SQL Server on your Mac? I assume you're using Docker? What are your exact Docker commands? I'm going to try to recreate.

@nouphal
Copy link
Author

nouphal commented Mar 24, 2021

Yes, installed SQL server on docker. Following are the commands.
sudo docker pull mcr.microsoft.com/mssql/server:2019-latest
docker run -d --name sql_server_demo -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=password' -p 1433:1433 mcr.microsoft.com/mssql/server:2019-latest
Install sql-cli, run the following command,
npm install -g sql-cli
You might face an error if the NodeJS isn’t installed already. Download and install NodeJS from here https://nodejs.org/en/
Connect to SQL Server : Connect to SQL Server using the mssql command, followed by the username and password parameters.Run the following command,
mssql -u sa -p password

@mgroves
Copy link
Owner

mgroves commented Mar 25, 2021

Are you using "password" literally? Because that is not a strong enough password, and that results in the image shutting down.

@mgroves
Copy link
Owner

mgroves commented Mar 25, 2021

I just tried it locally with SQL Server running in Docker, and it works okay, even with the 'master' database catalog:

2021-03-25 11_21_22-Enterprise Edition 7 0 0 build 4602 (beta refresh) - Enterprise Edition 7 0 0 bu

This might be a Mac specific issue?

@nouphal
Copy link
Author

nouphal commented Mar 25, 2021

Are you using "password" literally? Because that is not a strong enough password, and that results in the image shutting down.

No, I've created a password and using it.

@mgroves
Copy link
Owner

mgroves commented Mar 31, 2021

I'm trying to figure out a way to reproduce this in a macOS environment. I don't have any Apple hardware, so it's challenging for me.

@mgroves mgroves added the help wanted Extra attention is needed label Mar 31, 2021
@mgroves
Copy link
Owner

mgroves commented Apr 13, 2021

Is it possible that we could have a video meeting and work through this? What time zone are you in?

@nouphal
Copy link
Author

nouphal commented Apr 14, 2021

Sure, PST hrs. Please let me know.

@SaViGnAnO
Copy link

@mgroves Did you ever get anywhere on this one? I was looking into your project and would be willing to try to reproduce this on my macbook to see if it's a one-off or a real issue

@mgroves
Copy link
Owner

mgroves commented May 10, 2021

No, @nouphal and I have missed a few times. But yes, any information you can provide would be very helpful. I have a couple of things that I think could be the culprit, but I can't really know for sure, especially if it's an Apple-only issue.

@mgroves
Copy link
Owner

mgroves commented Jun 4, 2021

I've just created a PR #9 which might fix the issue (although I still can't verify). I was previously using Microsoft.SqlServer.Types, which is a .NETFramework library, and may have caused issues on Mac (and probably Linux too). Please review and see if this makes sense, and I'll merge that PR in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants