"msg": "Failed to connect to the host via ssh: root#172.31.37.91: Permission denied (publickey,password).", - ansible-inventory

I tried to connect to the server using ansible but it doesn't work
The error :
172\.31.37.91 | UNREACHABLE! =\> {
"changed": false,
"msg": "Failed to connect to the host via ssh: root#172.31.37.91: Permission denied (publickey,password).",
"unreachable": true
}
By the way, using ssh to conneting to the server is working.

Related

Flutter, can't connect/remote to MariaDB database from android

I'm using the mysql1 package to connect to MariaDB.10 database using (MariaDB4j)
Issue:
1- it connects if I test the Flutter app on Windows but does not work if I test it on a real android phone.
I got this error:
I/flutter ( 3337): SocketException: Connection refused (OS Error: Connection refused, errno = 111), address = 192.198.1.108, port = 53416
The code: port is 3306 as you can see above on the error message the port keeps changing, and I'm connecting the IP of the phone on the local network.
var settings = ConnectionSettings(
host: _host,
port: int.parse(_port),
user: 'root',
password: "",
db: 'distoresql');
conn = await MySqlConnection.connect(settings);
Note: I have added a user to the Mysql user with the phone IP and GRANT ALL PRIVILEGES to this user and IP, and I have disabled security on the connection.

Unable fetch metrics from postgresql://pgbouncer:***#vsaxx:6432/pgbouncer", "exception": "invalid integer value \"xxx\" for connection option \"port\"

I am deploying the prometheus-pgbouncer-exporter to kubernetes by helm chart. Although pods in this namespace is running, the log of pods always show this error message, which failed to collecting metrics and these pgbouncer servers could be shown in grafana.
The original issue:
{"asctime": "xxxx", "levelname": "ERROR", "message": "Unable fetch metrics from postgresql://pgbouncer:***#localhost:6432/pgbouncer", "exception": "could not connect to server: Connection refused\n\tIs the server running on host "localhost" (127.0.0.1) and accepting\n\tTCP/IP connections on port 6432?\ncould not connect to server: Address not available\n\tIs the server running on host "localhost" (::1) and accepting\n\tTCP/IP connections on port 6432?\n"}
When i try to debug and re-deploy it again, another issue occurs:
{"asctime": "2022-04-22 08:41:33", "levelname": "ERROR", "message": "Unable fetch metrics from postgresql://pgbouncer:***#xxxx:6432/pgbouncer", "exception": "invalid integer value "AgAjp0E7ePrce41jwBgvO8" for connection option "port"\n"}
I'm really new to pgbouncer, helm chart, kubernetes and grafana.

Download AL symbols not found error, how to change my connection url?

Why my Visual Studio is connecting to http://adrianbc/BC/dev/metadata?tenant=default?
I'm able to connect by browser to Business Central:
When I try to download AL symbols I get Not Found error:
[2022-02-11 13:20:58.02] Using reference symbols cache path: c:\Users\dimitri\OneDriveArqui\AL\Pan\./.alpackages
[2022-02-11 13:20:58.02] Sending request to http://adrianbc/BC/dev/metadata?tenant=default
[2022-02-11 13:20:58.03] The request for path /BC/dev/metadata?tenant=default failed with code NotFound. Reason: Not Found
[2022-02-11 13:20:58.03] Sending request to http://adrianbc/BC/dev/webendpoint
[2022-02-11 13:20:58.03] The request for path /BC/dev/webendpoint failed with code NotFound. Reason: Not Found
[2022-02-11 13:20:58.03] Sending request to http://adrianbc/BC/dev/metadata?tenant=default
[2022-02-11 13:20:58.03] The request for path /BC/dev/metadata?tenant=default failed with code NotFound. Reason: Not Found
[2022-02-11 13:20:58.03] Sending request to http://adrianbc/BC/dev/webendpoint
[2022-02-11 13:20:58.04] The request for path /BC/dev/webendpoint failed with code NotFound. Reason: Not Found
[2022-02-11 13:20:58.04] Sending request to http://adrianbc/BC/dev/metadata?tenant=default
[2022-02-11 13:20:58.04] The request for path /BC/dev/metadata?tenant=default failed with code NotFound. Reason: Not Found
[2022-02-11 13:20:58.04] Sending request to http://adrianbc/BC/dev/webendpoint
[2022-02-11 13:20:58.04] The request for path /BC/dev/webendpoint failed with code NotFound. Reason: Not Found
Here is my launch.json:
{
"version": "0.2.0",
"configurations": [
{
"type": "al",
"request": "launch",
"name": "AdrianBC local",
"server": "http://AdrianBC",
"port": 80,
"serverInstance": "BC",
"authentication": "UserPassword",
"breakOnError": true,
"launchBrowser": true,
"enableLongRunningSqlStatements": true,
"enableSqlInformationDebugger": true,
"tenant": "default",
"schemaUpdateMode": "Synchronize"
}
]}
Here is my docker setup:
Mounting Tenant
Mounting Database for default on server localhost\SQLEXPRESS with AllowAppDatabaseWrite = False
Sync'ing Tenant
Tenant is Operational
Creating http download site
Setting SA Password and enabling SA
Creating adrian as SQL User and add to sysadmin
Creating SUPER user
Container IP Address: 172.24.103.254
Container Hostname : AdrianBC
Container Dns Name : AdrianBC
Web Client : http://AdrianBC/BC/?tenant=default
Dev. Server : http://AdrianBC
Dev. ServerInstance : BC
Dev. Server Tenant : default
Setting AdrianBC to 172.24.103.254 in host hosts file
Setting AdrianBC-default to 172.24.103.254 in host hosts file
Setting AdrianBC-default to 172.24.103.254 in container hosts file
Files:
http://AdrianBC:8080/ALLanguage.vsix
Container Total Physical Memory is 8.5Gb
Container Free Physical Memory is 5.8Gb
Initialization took 38 seconds
Ready for connections!
Reading CustomSettings.config from AdrianBC
Creating Desktop Shortcuts for AdrianBC
Container AdrianBC successfully created
Use:
Get-BcContainerEventLog -containerName AdrianBC to retrieve a snapshot of the event log from the container
Get-BcContainerDebugInfo -containerName AdrianBC to get debug information about the container
Enter-BcContainer -containerName AdrianBC to open a PowerShell prompt inside the container
Remove-BcContainer -containerName AdrianBC to remove the container again
docker logs AdrianBC to retrieve information about URL's again
PS C:\WINDOWS\system32>
This is how I've created the docker in PowerShell:
Enable-WindowsOptionalFeature -Online -FeatureName $("Microsoft-Hyper-V", "Containers") -All
Set-ExecutionPolicy -ExecutionPolicy Unrestricted
Import-Module PowerShellGet
Install-Module -Name BcContainerHelper
$artifactUrl = Get-BCArtifactUrl -version 19 -country es -type Sandbox
New-BCContainer -accept_eula -accept_outdated -containerName AdrianBC -artifactUrl $artifactUrl -shortcuts DesktopFolder -updateHosts -isolation hyperv -doNotExportObjectsToText -restart no -auth UserPassword -Verbose -locale "es-ES"
Your port is wrong. With default settings that can be left blank.
You can setup the ports on your business central service tiers manually. When you change the development port you will need to change it in your launch.json.
https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/configure-web-server

Mongorestore problem Authentication failed

mongorestore -h ds121312.mlab.com:21312 -d heroku_jzxndzbk -u heroku_jzxndzbk -p xxxxxxxxxxxxxxx dump/Loc8r
Error:
2019-12-20T11:36:55.931-0500 error connecting to host: could not connect to server: connection() : auth error: sasl conversation error: unable to authenticate using mechanism "SCRA
M-SHA-1": (AuthenticationFailed) Authentication failed.
I am following along "Getting MEAN" text by Holmes/Harber - pg 152.
Any suggestions? Thank you
You must also specify which database you are using for authentication, e.g., --authenticationDatabase admin.
Reference: https://docs.mongodb.com/manual/reference/program/mongo/#cmdoption-mongo-authenticationdatabase

Error sending email using ansible via sendgrid

Through the ansible documentation page, I see ansible supporting sending email via sendgrid. I have tried following the code example but I still failed to send and exit the following message.
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
PLAY [localhost] *********************************************************************************************************************************************************************************
TASK [Gathering Facts] ***************************************************************************************************************************************************************************
ok: [localhost]
TASK [sendgrid] **********************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "parameters are mutually exclusive: api_key, username"}
to retry, use: --limit #/home/valutac/opreker/mail-test.retry
PLAY RECAP ***************************************************************************************************************************************************************************************
localhost : ok=1 changed=0 unreachable=0 failed=1
Here I also display the contents of the playbook
---
- hosts: localhost
tasks:
- sendgrid:
username: "mail"
password: "xxx"
api_key: "SG.1414rfdsvefvwev.dsadasvef34r2-3e1qdqecweqc"
from_address: "ansible#mycompany.com"
to_addresses:
- "ops#mycompany.com"
subject: "Deployment success."
body: "The most recent Ansible deployment was successful."
The error msg is clear:
parameters are mutually exclusive: api_key, username
Doc explains:
username for logging into the SendGrid account.
Since 2.2 it is only required if api_key is not supplied.