Rundeck-unable to copy script to Windows node-Host not found - windows

Configuration::https://1drv.ms/t/s!AizscpxS0QM4hJo9MJWA6CKzd1BOwQ (Kerberos authentication-domain user)
Can run command againts windows node,OpenSSH installed,manual scp copy works from linux to windows
scp somefile rundeck#test.com#WIN-II425CK1GMO.test.com:/C:
,public key authentication works without issues but when trying to run powershell script in Job getting:
TEST.COM#192.168.0.13
Script Failed dispatching to node DC: [jsch-scp] Failed copying the file: TEST.COM#192.168.0.13
Execution failed: 55 in project windows: [Workflow result: , step failures: {1=Dispatch failed on 1 nodes: [DC: HostNotFound: [jsch-scp]
Failed copying the file: TEST.COM#192.168.0.13]}, Node failures: {DC=[HostNotFound: [jsch-scp] Failed copying the file: TEST.COM#192.168.0.13]}, status: failed]
My bet is it happens because 2 # but don't know how to bypass it

Instead of WinRM, specified ssh authentication in resources.xml
<node name="dc" description="My windows" tags="node2" hostname="192.168.0.13" osArch="x86_64" osFamily="Windows" osName="Windows Server 2016" username="rundeck" ssh-key-storage-path="keys/Linuxtopic/server.1key" />
Removed domain part in username (#test.com) so jsch-scp wasn't confused with double #

Related

msdeploy fails with ERROR_CONNECTION_TERMINATED on TeamCity

When i run msdeploy from teamcity i get ERROR_CONNECTION_TERMINATED. But if i run it from cmd on the same server (where teamcity is running) it goes through. ERROR_CONNECTION_TERMINATED occours only if site is up to date, if it has to do alot of stuff then there is no error.
I'm not running fiddler that could be causing this.
Here is command:
msdeploy -verb:sync -source:contentPath="%teamcity.build.checkoutDir%\publish\web" -dest:contentPath="%DeployPath%\web",ComputerName="%MSDeploy.ComputerName%",Username="%MSDeploy.Username%",Password="%MSDeploy.Password%",AuthType="Basic" -useCheckSum -skip:Directory="\\web\\uploads$" -skip:File="\\app_offline.htm$" -allowUntrusted 
Output:
[11:32:15][Step 9/9] PowerShell Executable:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
[11:32:15][Step 9/9] Working directory:
C:\TeamCity\buildAgent\work\81d93b891723185
[11:32:15][Step 9/9] Command:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
[11:32:15][Step 9/9] PowerShell arguments: -NonInteractive,
-ExecutionPolicy, ByPass, -File, C:\TeamCity\buildAgent\temp\buildTmp\powershell4517896340075893898.ps1
[11:32:16][Step 9/9] Info: Using ID
'a6102aa0-ae6b-43b5-9f15-5a6c0977232f' for connections to the remote
server.
[11:32:17][Step 9/9] Info: Object filePath
(C:\inetpub\dev.proplatform\web\app_offline.htm) skipped due to skip
directive 'CommandLineSkipDirective 2'.
[11:32:27][Step 9/9] Info: Object filePath
(C:\inetpub\dev.proplatform\web\ePeroWs\app_offline.htm) skipped due
to skip directive 'CommandLineSkipDirective 2'.
[11:32:27][Step 9/9] Info: Object filePath
(C:\inetpub\dev.proplatform\web\ipsWebApi\app_offline.htm) skipped due
to skip directive 'CommandLineSkipDirective 2'.
[11:32:37][Step 9/9] Info: Object dirPath
(C:\inetpub\dev.proplatform\web\uploads) skipped due to skip directive
'CommandLineSkipDirective 1'.
[11:32:37][Step 9/9] Info: Using ID
'98d4de3d-2ed9-4a43-b156-ebf69bac99dc' for connections to the remote
server.
[11:33:13][Step 9/9] Error Code: ERROR_CONNECTION_TERMINATED
[11:33:13][Step 9/9] More Information: Web Deploy experienced a
connection problem with the server and had to terminate the
connection. Contact your server administrator if the problem
persists. Learn more at:
https://go.microsoft.com/fwlink/?LinkId=221672#ERROR_CONNECTION_TERMINATED.
[11:33:13][Step 9/9] Error: Unexpected end of file has occurred. The
following elements are not closed: results. Line 1, position 550.
[11:33:13][Step 9/9] Error count: 1.
I tried running command in cmd and powershell on teamcity. I got error on TC, but if i run command directlly in cmd or powershell on the same server i got no error.
I found what the problem was. It was Windows real time protection which was cousing this problem. So i added process msdeploy.exe as an exception and now it works fine.
I hope this helps somebody in the future. I spent days trying to figure it out what the problem was.

SSH-deployer fails with auth fail error message - Teamcity for scp?

I have a build in Teamcity with the SSH-deployer, but it fails with Auth fail. I am using password authentication, don't wanna use private/public key authentication as it won't be robust approach for us.
Idea is to authenticate via user name and password.
Attached the screenshot for the configuration.
Thanks
Error message:
[06:16:14]Collecting changes in 1 VCS root
[06:16:14][Collecting changes in 1 VCS root] VCS Root details
[06:16:14][VCS Root details] "DE_Automation" {instance id=40631, parent internal id=7496, parent id=Abc_DeAutomation, description: "ssh://git#<server_name>/abc/puppet.git#refs/heads/master"}
[06:16:15]Clearing temporary directory: /opt/teamcity/temp/buildTmp
[06:16:15]Publishing internal artifacts
[06:16:15][Publishing internal artifacts] Publishing 1 file using [WebPublisher]
[06:16:15][Publishing internal artifacts] Publishing 1 file using [ArtifactsCachePublisher]
[06:16:15]Checkout directory: /opt/teamcity/work/376a4e836d9c66e4
[06:16:15]Updating sources: server side checkout
[06:16:15][Updating sources] Using vcs information from agent file: 376a4e836d9c66e4.xml
[06:16:16][Updating sources] Building incremental patch for VCS root: DE_Automation; checkout rules: =>; revision: d88b7e07953108a1a4c392887c28e9b97ce31a5b --> d88b7e07953108a1a4c392887c28e9b97ce31a5b
[06:16:16][Updating sources] Repository sources transferred
[06:16:16]Step 1/3: Command Line
[06:16:16][Step 1/3] Disabled build step Command Line is skipped
[06:16:16]Step 2/3: SFTP (FTP Deployer)
[06:16:16][Step 2/3] Disabled build step SFTP (FTP Deployer) is skipped
[06:16:16]Step 3/3: SCP (SSH Deployer)
[06:16:16][Step 3/3] com.jcraft.jsch.JSchException: Auth fail
[06:16:16]
[Step 3/3] com.jcraft.jsch.JSchException: Auth fail
at com.jcraft.jsch.Session.connect(Session.java:512)
at com.jcraft.jsch.Session.connect(Session.java:183)
at jetbrains.buildServer.deployer.agent.ssh.SSHSessionProvider.<init>(SSHSessionProvider.java:102)
at jetbrains.buildServer.deployer.agent.ssh.SSHDeployerRunner.getDeployerProcess(SSHDeployerRunner.java:44)
at jetbrains.buildServer.deployer.agent.base.BaseDeployerRunner.createBuildProcess(BaseDeployerRunner.java:47)
at jetbrains.buildServer.agent.impl.runner.CallRunnerService.doCreateBuildProcess(CallRunnerService.java:71)
at jetbrains.buildServer.agent.impl.runner.CallRunnerService.createBuildProcess(CallRunnerService.java:47)
at jetbrains.buildServer.agent.impl.buildStages.runnerStages.start.CallRunnerStage.doBuildStage(CallRunnerStage.java:47)
at jetbrains.buildServer.agent.impl.buildStages.RunnerStagesExecutor$1.callStage(RunnerStagesExecutor.java:25)
at jetbrains.buildServer.agent.impl.buildStages.RunnerStagesExecutor$1.callStage(RunnerStagesExecutor.java:18)
at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.callRunStage(StagesExecutor.java:78)
at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.doStages(StagesExecutor.java:37)
at jetbrains.buildServer.agent.impl.buildStages.RunnerStagesExecutor.doStages(RunnerStagesExecutor.java:18)
at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.RunnerContextExecutor.callRunnerStages(RunnerContextExecutor.java:43)
at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.StepExecutor.processNextStep(StepExecutor.java:25)
at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.ForEachBuildRunnerStage.executeRunnerStep(ForEachBuildRunnerStage.java:138)
at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.ForEachBuildRunnerStage.runStep(ForEachBuildRunnerStage.java:123)
at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.ForEachBuildRunnerStage.executeBuildRunners(ForEachBuildRunnerStage.java:83)
at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.ForEachBuildRunnerStage.doBuildStage(ForEachBuildRunnerStage.java:44)
at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor$1.callStage(BuildStagesExecutor.java:31)
at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor$1.callStage(BuildStagesExecutor.java:24)
at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.callRunStage(StagesExecutor.java:78)
at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.doStages(StagesExecutor.java:37)
at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor.doStages(BuildStagesExecutor.java:24)
at jetbrains.buildServer.agent.impl.BuildRunActionImpl.doStages(BuildRunActionImpl.java:70)
at jetbrains.buildServer.agent.impl.BuildRunActionImpl.runBuild(BuildRunActionImpl.java:50)
at jetbrains.buildServer.agent.impl.BuildAgentImpl.doActualBuild(BuildAgentImpl.java:288)
at jetbrains.buildServer.agent.impl.BuildAgentImpl.access$100(BuildAgentImpl.java:53)
at jetbrains.buildServer.agent.impl.BuildAgentImpl$1.run(BuildAgentImpl.java:252)
at java.lang.Thread.run(Thread.java:748)
[06:16:16][Step 3/3] Step SCP (SSH Deployer) failed with unexpected error
[06:16:16]Publishing internal artifacts
[06:16:16][Publishing internal artifacts] Publishing 1 file using [WebPublisher]
[06:16:16][Publishing internal artifacts] Publishing 1 file using [ArtifactsCachePublisher]
[06:16:16]Build finished
In my case, the problem was not related to SCP (even when TC was saying it is) at all:
My steps:
compile
SCP deploy
some cleanup
shh script on remote server
And step 2 was failing with the same error message as you (but when i SSH to remote server, the file was here)
But, the problem was not in failing step #2 but two steps ahead - i had wrong user in step #4!
Looks like some sort of async bug.

install_driver(Oracle) failed: Can't load '/usr/local/lib/perl5/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libocci.so.11.1

I am facing this error from two days. I'am able to get output from via command line at nagios end
/usr/local/nagios/libexec/check_oracle_health --connect 192.168.2.92:1521/modula --user nagios --password nagios --mode tnsping
Output is
OK - connection established to 192.168.2.92:1521/modula.
But when I am going to GUI mode it is giving me error
CRITICAL - cannot connect to 192.168.2.92:1521/modula.
install_driver(Oracle) failed:
Can't load '/usr/local/lib/perl5/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle:
libocci.so.11.1: cannot open shared object file:
No such file or directory at /usr/lib/perl5/DynaLoader.pm line 200.
at (eval 18) line 3
Compilation failed in require at (eval 18) line 3.
Perhaps a required shared library or dll isn't installed where expected
at /usr/local/nagios/libexec/check_oracle_health line 5837
\n
Plese help me to resolve the error.
I had this issue on CentOS 6 and here is how I resolved it:
`echo "$ORACLE_HOME/lib" >> /etc/ld.so.conf.d/oracle-x86_64.conf && ldconfig`
The answer by Jordan Neufeld is good and may be enough for you (I've tested it on CentOS 7), but I recommend setting these environment variables:
export ORACLE_HOME=/usr/lib/oracle/11.2/client64
export LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib:$LD_LIBRARY_PATH
export PATH=/usr/lib/oracle/11.2/client64/bin:$PATH
[examples are for oracle-instantclient11.2-basic-11.2 rpm, change path if needed]

RabbitMQ as Windows service: badarith error on rpc.erl

I am experiencing some problems with RabbitMQ started as a service on Windows.
Operative System: Windows 8 (Microsoft Windows NT version 6.2 Server)
(build 9200)
Erlang: R16B03 (erts-5.10.4)
RabbitMQ: 3.2.2
Goal: create a RabbitMQ cluster with three servers: Srv1, Srv2, Srv3.
Note: I have carefully followed the official documentation
All the following operations are executed as user "Administrator".
FIRST SCENARIO: start RabbitMQ from command line as a background process
I used the command "rabbitmq-server -detached" on Srv1.
Result: a file ".erlang.cookie" is created under C:\Users\Administrator
The execution of the command "rabbimqctl status" is successful and gives me the current state of the node.
I can then copy the file .erlang.cookie in the same folder on Srv2 and Srv3 and successfully create a cluster.
SECOND SCENARIO: start RabbitMQ as a service (this is requirement I have)
Result: the file ".erlang.cookie" is created under C:\Windows.
When I type the command "rabbitmqctl status" another file .erlang.cookie is created under C:\Users\Administrator and I receive the following result:
C:\Program Files\Aspect\DashBoard\RabbitMQ\sbin>rabbitmqctl.bat status
Status of node 'rabbit#RABBITMQ-NODE4' ...
Error: unable to connect to node 'rabbit#RABBITMQ-NODE4': nodedown
DIAGNOSTICS
===========
nodes in question: ['rabbit#RABBITMQ-NODE4']
hosts, their running nodes and ports:
- RABBITMQ-NODE4: [{rabbit,49428},{rabbitmqctl3045334,49434}]
current node details:
- node name: 'rabbitmqctl3045334#rabbitmq-node4'
- home dir: C:\Users\Administrator
- cookie hash: 0DLAKf8pOVrGC016+6BDBw==
We know that this is ok because the two cookies are different.
So I copy the .erlang.cookie file from C:\Windows into C:\Users\Administrator and I try again the same command. This time I get:
C:\Program Files\Aspect\DashBoard\RabbitMQ\sbin>rabbitmqctl.bat status
Status of node 'rabbit#RABBITMQ-NODE4' ...
Error: unable to connect to node 'rabbit#RABBITMQ-NODE4': nodedown
DIAGNOSTICS
===========
nodes in question: ['rabbit#RABBITMQ-NODE4']
hosts, their running nodes and ports:
- RABBITMQ-NODE4: [{rabbitmqctl1178095,49471}]
current node details:
- node name: 'rabbitmqctl1178095#rabbitmq-node4'
- home dir: C:\Users\Administrator
- cookie hash: TIuqp21HOQSoUJT8JfgRQw==
C:\Program Files\Aspect\DashBoard\RabbitMQ\sbin>rabbitmqctl.bat status
Status of node 'rabbit#RABBITMQ-NODE4' ...
Error: {badarith,[{rabbit_vm,bytes,1,[]},
{rabbit_vm,'-mnesia_memory/0-lc$^0/1-0-',1,[]},
{rabbit_vm,mnesia_memory,0,[]},
{rabbit_vm,memory,0,[]},
{rabbit,status,0,[]},
{rpc,'-handle_call_call/6-fun-0-',5,
[{file,"rpc.erl"},{line,205}]}]}
Please notice the Error at the end: "badarith" in rpc.erl, line 205.
I think that the file is Erlang\lib\kernel-2.16.4\src\rpc.erl
The function is this one:
handle_call_call(Mod, Fun, Args, Gleader, To, S) ->
RpcServer = self(),
%% Spawn not to block the rpc server.
{Caller,_} =
erlang:spawn_monitor(
fun () ->
set_group_leader(Gleader),
Reply =
%% in case some sucker rex'es
%% something that throws
case catch apply(Mod, Fun, Args) of
{'EXIT', _} = Exit ->
{badrpc, Exit};
Result ->
Result
end,
RpcServer ! {self(), {reply, Reply}}
end),
{noreply, gb_trees:insert(Caller, To, S)}.
and line 205 is 'case catch apply(Mod, Fun, Args) of'
THIRD SCENARIO: start RabbitMQ as a named user to avoid it to create the file .erlang.cookie under C:\Windows
I set the RabbitMQ service to log on as the user "Administrator", this way it does not create the file under C:\Windows but only under C:\User\Administrator.
Result: when the service starts, the file ".erlang.cookie" is created only under C:\User\Administrator.
When I type the command "rabbitmqctl status" I get the same error as in the provious case (badarith...).
Now the question: I have not found any information about this error (badarith).
Could anyone give me a suggestion about how to troubleshoot/avoid this?

Unable to connect to Visual Studio Local Host Webserver

I got this error when I tried to run(F5) my project solution using Visual Studio,then I did the following steps.......
I just did copy from other server which have visual studio installed then paste it in my local(c:\windows\microsoft.net\framework\v2.0.50727) webdev.webserver.exe then I tried to run
In Cmd Prompt:
c:\windows\microsoft.net\framework\v2.0.50727\WebDev.WebServer /?.
cd C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727--->aspnet_regiis -i
then iisrest
Result:
nothing is worked.Still I got Same Error...
Error:
How ever when I tried to run aspnet_regiis -i I got some error like
set up has detected some error and ask me to check log file ...from log file I got some failure status like:
C:\Inetpub\wwwroot\wss\VirtualDirectories\47223\aspnet_client
2012-06-29 12:58:20 Failure Creating directory: C:\Inetpub\wwwroot\wss\VirtualDirectories\47223\aspnet_client: CreateDirectoryInternal failed with HRESULT 80070003: 'The system cannot find the path specified. '
2012-06-29 12:58:20 Failure Creating list of client site scripts dirs: CreateSiteClientScriptDir failed with HRESULT 80070003: 'The system cannot find the path specified. '
Could you please instruct me on this......
Thank you
After all above attemps I just repair my .Net Framework 2.0 and restart the system.Now its working so Good.Thanks

Resources