GOAD icon indicating copy to clipboard operation
GOAD copied to clipboard

Issues

Open Awaces opened this issue 2 years ago • 2 comments

I keep on running in these issues:

servers.yml: TASK [mssql : Add MSSQL admin] ***************************************************************** failed: [192.168.56.22] (item=NORTH\jon.snow) => {"ansible_loop_var": "item", "changed": true, "cmd": "SqlCmd -E -Q "CREATE LOGIN [NORTH\jon.snow] FROM WINDOWS"\nSqlCmd -E -Q "SP_ADDSRVROLEMEMBER 'NORTH\jon.snow','SYSADMIN'"", "delta": "0:00:18.890751", "end": "2022-11-15 15:52:04.494095", "item": "NORTH\jon.snow", "msg": "non-zero return code", "rc": 1, "start": "2022-11-15 15:51:45.603343", "stderr": "Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Named Pipes Provider: Could not open a connection to SQL Server [2]. .\r\nSqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Login timeout expired.\r\nSqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..\r\nSqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Named Pipes Provider: Could not open a connection to SQL Server [2]. .\r\nSqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Login timeout expired.\r\nSqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..", "stderr_lines": ["Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Named Pipes Provider: Could not open a connection to SQL Server [2]. .", "Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Login timeout expired.", "Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..", "Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Named Pipes Provider: Could not open a connection to SQL Server [2]. .", "Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Login timeout expired.", "Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.."], "stdout": "", "stdout_lines": []}

ad-relations.yml TASK [groups_domains : Add a domain user/group from another Domain in the multi-domain forest to a domain group : {{domain_server}}] *** ok: [192.168.56.11] => (item={'key': 'AcrossTheSea', 'value': ['essos.local\daenerys.targaryen']}) ok: [192.168.56.12] => (item={'key': 'DragonsFriends', 'value': ['sevenkingdoms.local\tyron.lannister', 'essos.local\daenerys.targaryen']}) FAILED - RETRYING: [192.168.56.10]: Add a domain user/group from another Domain in the multi-domain forest to a domain group : {{domain_server}} (3 retries left). ok: [192.168.56.12] => (item={'key': 'Spys', 'value': ['sevenkingdoms.local\Small Council']}) FAILED - RETRYING: [192.168.56.10]: Add a domain user/group from another Domain in the multi-domain forest to a domain group : {{domain_server}} (2 retries left). FAILED - RETRYING: [192.168.56.10]: Add a domain user/group from another Domain in the multi-domain forest to a domain group : {{domain_server}} (1 retries left). An exception occurred during task execution. To see the full traceback, use -vvv. The error was: at Microsoft.ActiveDirectory.Management.Commands.ADCmdletBase`1.BeginProcessing() failed: [192.168.56.10] (item={'key': 'AcrossTheNarrowSea', 'value': ['essos.local\daenerys.targaryen']}) => {"ansible_loop_var": "item", "attempts": 3, "changed": false, "item": {"key": "AcrossTheNarrowSea", "value": ["essos.local\daenerys.targaryen"]}, "msg": "Unhandled exception while executing module: A call to SSPI failed, see inner exception."}

Awaces avatar Nov 15 '22 15:11 Awaces

the same here i have the same error for the ad-relations.yml even after reruning the playbook several times. Any suggestions how to solve this?

Nobody0404 avatar Nov 24 '22 13:11 Nobody0404

The same two issues. Just another username in the task "Add MSSQL admin"

UrfinJuice11 avatar Nov 27 '22 12:11 UrfinJuice11

Any solutions to this issue ? Running into the same issue.

amitn322 avatar Nov 16 '23 22:11 amitn322

if re-run the playbook didn't solve the problem connect to the vm SRV02 : 192.168.56.22 with user vagrant and password vagrant. Than delete the c:\setup folder and rerun the project. This will force the reinstall of the mssql server.

edit : my bad you will have to uninstall mssql and delete the C:\Program Files\Microsoft SQL Server\MSSQL15.{{sql_instance_name}} folder in order to relaunch the mssql install.

Mayfly277 avatar Nov 25 '23 21:11 Mayfly277

if re-run the playbook didn't solve the problem connect to the vm SRV02 : 192.168.56.22 with user vagrant and password vagrant. Than delete the c:\setup folder and rerun the project. This will force the reinstall of the mssql server.

hi there I'm currently facing this issue, I followed your instruction and I keep receiving the same error.

image

daviosardinha avatar Nov 28 '23 00:11 daviosardinha

I encountered the same situation, as follows:

image

I'm not familiar with SQLserver, but I did the following steps to solve the problem:

  1. Open the named pipe. The following content was originally commented out, and I uncomment with this block.
    - name: Add or update registry for named pipe
    win_regedit:
        path: 'HKLM:\Software\Microsoft\Microsoft SQL Server\MSSQL15.{{ sql_instance_name }}\MSSQLServer\SuperSocketNetLib\Np'
        name: Enabled
        data: 0x00000001
        type: dword
    register: win_reg
    
  2. Opened port 1433 of SQLSERVER in SRV02. Through netstat-ano | findstr 1433, I found that SRV02 did not open port 1433 but SRV03 did. You can use SQL Server Configuration Manager to open this port.

Then rerunning ansible-playbook-I.. / ad/GOAD/data/inventory-I.. / ad/GOAD/providers/vmware/inventory servers.yml and the problem will be solve.

image

DummyKitty avatar Nov 29 '23 01:11 DummyKitty

if re-run the playbook didn't solve the problem connect to the vm SRV02 : 192.168.56.22 with user vagrant and password vagrant. Than delete the c:\setup folder and rerun the project. This will force the reinstall of the mssql server.

edit : my bad you will have to uninstall mssql and delete the C:\Program Files\Microsoft SQL Server\MSSQL15.{{sql_instance_name}} folder in order to relaunch the mssql install.

This worked for me.

nphalem avatar Jan 17 '24 09:01 nphalem