Not able to web deploy to ec2 instance - amazon-ec2

I am trying to web deploy to a ec2 instance using the msbuild
C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
/p:Configuration=Release;MsDeployServiceUrl=ec2-instance
name.compute.amazonaws.com:8172/msdeploy.axd;MSDeployPublishMethod=RemoteAgent;username="adminuser";password="password";DeployIisAppPath=Sitename;CreatePackageOnPublish=true;DeployOnBuild=true;DeployTarget=WebPublish
"my.Web.csproj"
I get a
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web
.Publishing.targets(3847,5): error : Web deployment task failed.(Could not comp
lete the request to remote agent URL ':8172/msdeploy.axd/MSDEPLOYAGENTSERVICE'.) This error indicates that you cannot connect
to the server. Make sure the service URL is correct, firewall and network sett
ings on this computer and on the server computer are configured properly, and t
he appropriate services have been started on the server.
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.P
ublishing.targets(3847,5): error : Error details:\r
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.P
ublishing.targets(3847,5): error : Could not complete the request to remote age
nt URL ':8172/msdeploy.a
xd/MSDEPLOYAGENTSERVICE'.
I have
1.Open ports in security group for 8172
2.Reinstalled web deploy 3 in target
3.Made a admin user and using that
Help would be really appreciated.

The URL its using is incorrect. Since you are publishing over the web you are using web management service and hence the url should be in either one of the following formats:
Publishing as an admin:
https://myserver.com:8172/msdeploy.axd
If you are publishing as an owner of one site on the server and have permissions just to your own site then:
https://myserver.com:8172/msdeploy.axd?site=<sitename>

Related

Modification to Websphere Application server Admin Console URL

One of our app team has completed WAS server base installation. After the installation is complete he requires two things.
WebSphere admins to be able to access the WebSphere admin console via a URL
Users to be able to access the WAS Portal
To connect to the URL’s, they first connect to VPN and use the browser from base machine directly.By default we are seeing these urls.
Admin URL: https://hostnane.ibm.com:9043/ibm/console/logon.jsp
User URL https://hostname.ibm.com ( this one is hypothetical for now)
Application team wants to convert ibm.com to mycompany.com.
Can someone advise how can we change ?
Please do the next step by step:
1. How to change hostname on WebSphere Application Server
If you are moving your IBM WebSphere Application Server configuration or migrating your environment, you might have to change host names or migrate profiles from one machine to another.
For example, the old hostname is example.com, we want to change to was-tpx04.hq.com
If the host name of a server or its ports is incorrect, then you might experience problems such as errors when you attempt to stop a server.
First, correct the host name for an application server using the wsadmin.sh scripting tool and command line tools.
was-tpx04:/u01/IBM/WebSphere/AppServer/bin # ./wsadmin.sh -conntype NONE -lang jython
WASX7357I: By request, this scripting client is not connected to any server process. Certain configuration and application operations will be available in local mode.
WASX7031I: For help, enter: "print Help.help()"
wsadmin>AdminConfig.list('ServerIndex')
'(cells/exampleNode01Cell/nodes/exampleNode01|serverindex.xml#ServerIndex_1)'
wsadmin>AdminConfig.modify('(cells/exampleNode01Cell/nodes/exampleNode01|serverindex.xml#ServerIndex_1)', "[[hostName was-tpx04.hq.com]]")
''
wsadmin>AdminConfig.show('(cells/exampleNode01Cell/nodes/exampleNode01|serverindex.xml#ServerIndex_1)', 'hostName')
'[hostName was-tpx04.hq.com]'
wsadmin>AdminConfig.save()
''
wsadmin>exit
was-tpx04:/u01/IBM/WebSphere/AppServer/bin # ./stopServer.sh server1 -profileName AppSrv01
ADMU0116I: Tool information is being logged in file
/u01/IBM/WebSphere/AppServer/profiles/AppSrv01/logs/server1/stopServer.log
ADMU0128I: Starting tool with the AppSrv01 profile
ADMU3100I: Reading configuration for server: server1
ADMU3201I: Server stop request issued. Waiting for stop status.
ADMU4000I: Server server1 stop completed.
was-tpx04:/u01/IBM/WebSphere/AppServer/bin # ./startServer.sh server1 -profileName AppSrv01
ADMU0116I: Tool information is being logged in file
/u01/IBM/WebSphere/AppServer/profiles/AppSrv01/logs/server1/startServer.log
ADMU0128I: Starting tool with the AppSrv01 profile
ADMU3100I: Reading configuration for server: server1
ADMU3200I: Server launched. Waiting for initialization status.
ADMU3000I: Server server1 open for e-business; process id is 52604
was-tpx04:/u01/IBM/WebSphere/AppServer/bin #
Now, the hostname looks as follows:
2. Second, you need to correct the host names for the ports that an
application server opens.
For the application server, select Servers > Application servers > application server > Ports.
Select a port whose host name needs changing.
Change the host name in the Host field; Click OK. Change the host name is was-tpx04.hq.com
Continue selecting ports and changing host names until you correct each of the host names for the server ports.
Save the changes to the master configuration.
Restart the server.

Unable to configure server for deploying rules using IBM ODM

I followed this YouTube video
https://www.youtube.com/watch?v=dIJ-VLkuw0s
at 10:15 min, they have added "http://localhost:9080/res" as server URL
when I tried the same , I got below error
The location "http://localhost::9080/" is not a valid file system path: : is an invalid character in resource name 'localhost::9080'.
I downloaded WebSphere from https://www.ibm.com/support/pages/websphere-liberty-developers
WebSphere Liberty Web Profile 8 21.0.0.4 file(93MB)
unzipped the downloaded file
I ran server from location by running bat file from location
C:\Users\vaageesh\wlp-webProfile8-21.0.0.4\wlp\bin\server.bat
still when I added "http://localhost:9080/res" as server URL
Target servers tab in
"Create Deployment configuration" step, its throwing error
could you guide me exactly how to configure server and pre-requisites needed to deploy rules on this server with configurations we have done
you need to unselect "Local Rule ...." to have a proper wizard that is relative to Web deploiement.
The screenshot you are mentioning is about local directory folder deploiement.
See picture.
Best
Emmanuel

Deploy to Azure using publish profile : Works when publishing on VS2017 fails when using Jenkins

I downloaded the Publishing Profile from my App Service and created a profile on my WebApi.
When I execute "publishing" using VS 2017, it works fine.
When I try to execute deploy command on Jenkins if fails. The error message I have is :
Deployment task failed. (Connected to the remote computer ("XXXXXXXX") using the Web Management Service, but could not authorize.
Make sure the site name, user name, and password are correct. If the issue is not resolved, please contact your local or server administrator.
Connected to the remote computer ("xxxxxxxxxxx") using the Web Management Service, but could not authorize.
The remote server returned an error: (401) Unauthorized.
I have a step on Jenkins using PowerShell command line like :
msbuild My.WebApi /P:AllowUntrustedCertificate=true /P:DeployOnBuild=True /p:PublishProfile=$myPublishProfile
It builds without errors
$myPublishProfile is a valid Path
This Jenkins instance runs on a Server, not on my machine.
Jenkins has its own SMC user and server auth user.
App Service has WEBSITE_WEBDEPLOY_USE_SCM set to False
I am using the same Publishing Profile to build on Jenkins and on Visual Studio.
If both are using the same Publishing Profile, why I am getting the Auth error ?
Is there is any other config I should do to perform Deploy from Jenkins ?
When you publish using visualstudio the password is stored in an encrypted file on your disk. If you need to publish with the msbuild-command you can add credentials on the commandline or in the publishprofile
append theese properties on the commandline:
msbuild ... /p:UserName=XXX /p:PassWord=YYY
or include in the profile
<UserName>XXX</UserName>
<Password>YYY</Password>

Jenkins build project "Unable to access to repository"

I am a complete Jenkins noob so if I have missed something completely obvious I apologise in advance!
I am building an intranet web application using Visual Studio 2010 and commit changes using AnkhSVN to a repository stored on a server that is running Visual SVN Server.
Due to budget restrictions this server is also acting as our web server and also running Jenkins. It is connected to our internal network but doesn't have external internet access so I have had to manually install Jenkins plugins and dependencies.
I am trying to build a Jenkins project that would build the web application when it detects a commit but when I enter the repository URL and the user credentials in the source code management window I get the following error message:
Unable to access to repository
However when I enter the url in a browser and enter the same credentials I can access the repository without any errors.
Any ideas would be greatly appreciated.
Server Specs
Windows Server 2012 R2 Datacenter 64bit
Visual SVN Server
Port: 443
Version 3.5.6
Jenkins
Port: 8080
Credentials Plugin 2.1.9
MapDB API Plugin 1.0.9.0
Pipeline: SCM Step 2.3
Pipeline: Step API 2.5
SCM API Plugin 1.3
SSH Credentials Plugin 1.12
Structs Plugin 1.5
Subversion Plug-in 2.7.1
check if the ip of jenkins server can access the svn ip server....i have the same problem and i found that my ci server can not access the svn server .using ping command
That actually might be okay. For some reason I see similar error message (could be a bug in Jenkins frontend) when edit SCM details for a job in Jenkins, but it does work flawlessly if I actually save and run the job.
Give it a try it might actually work during the build time.

How to change the IIS 7 application pool on a remote server?

I am looking to create new virtual directories on a remote server and set the app pool to a configuration other than the default. I am using NAnt but open to any other commands that can accompolish this.
Here is what I have tried:
<mkiisdir iisserver="${remote.server}" dirpath="${install.path}" vdirname="${vir.dir.name}" />
The above works fine in creating the VD to a remote server but the nant task does not have a parameter for specificing the application pool. Strange as to why not !!
I looked into using powershell to update the application pool since I already have the Virtual Directory created but due to my Windows OS restrictions I am unable to install the WebAdministration module which is required to update the IIS app pool.
Is there any existing method to accompolish this that I have not considered?
Thanks.
You can use AppCmd.exe which is located in the System32 folder.
appcmd set app /app.name:"Default Web Site/MyVirtualDirectoryName" /applicationPool:"MyAppPool"
If you need to Update the web applications directories on other servers remotely, then you can use PSExec \\RemoteServerHostname appcmd set app /app.name:"Default Web Site/MyVirtualDirectoryName" /applicationPool:"MyAppPool"

Resources