I want to deploy war/ear file from command line using wslt command into weblogic server. Will any one help on this issue. I need command to do this issue.
set CLASSPATH=D:\Weblogic\Middleware\wlserver_10.3\server\lib\weblogic.jar
//From remote
java weblogic.Deployer -adminurl t3://localhost:8001 -user weblogic -password password123 -deploy C:\Users\User\Documents\sample\dist\sample.war -remote -upload
//From normal
java weblogic.Deployer -adminurl t3://localhost:8001 -username weblogic -password password123 -deploy -name warfilename -targets AdminServer -source C:\apps\sample.war
by using above stuff it is resolved.
Just wanted to add for deploying artifacts as shared-library you can use the following:
java weblogic.Deployer -adminurl t3://localhost:7001 -username [Your username] -password [Your password] -upload -library -targets AdminServer -deploy -source [path to your war file]
import re
warPath = raw_input('enter warpath:')
appPath = raw_input('enter appname:')
weblogicUrl = raw_input('enter weblogicurl:')
userName = raw_input('enter username:')
password = raw_input('enter password')
connect(userName,password,weblogicUrl)
appList = re.findall(appName, ls('/AppDeployments'))
print(len(appList))
if len(appList) > 0:
undeploy(appName, timeout=60000)
deploy(appName,warPath,targets='AdminServer')
exit()
Related
Its and windows machine and trying to install Sql Server(unattended) using powershell
Write-Host "`nStarting the install of SQL Server" -ForegroundColor Green
[string]$userName = 'domain\username'
[string]$userPassword = 'xyz'
[securestring]$secStringPassword = ConvertTo-SecureString $userPassword -AsPlainText -Force
[pscredential]$credObject = New-Object System.Management.Automation.PSCredential ($userName, $secStringPassword)
Start-Process -Filepath "$driveLetter\setup.exe" -ArgumentList "/ConfigurationFile=`"$temp_file_location`"" -Credential $credObject -NoNewWindow -Wait -RedirectStandardOutput $standardOutputFile -RedirectStandardError $errorOutputFile
ERROR:
PS C:\Windows\system32> C:\Users\manish\Desktop\custommain.ps1
domain
eu-west-1
fetching the password from parameter stores
Cleaning the outputfile error
finding and replacing the domains and secrets
writting the content of ini into temp file C:\xyz-softwares\ms-sql-server\scripts\batch-files\temp_ConfigurationFile.ini
Mounting SQL Server Image
Getting Disk drive of the mounted image
Starting the install of SQL Server
Start-Process : This command cannot be run due to the error: The user name or password is incorrect.
At C:\xyz-softwares\ms-sql-server\scripts\powershell\ms-sqlserver-installation.ps1:65 char:2
+ Start-Process -Filepath "$driveLetter\setup.exe" -ArgumentList "/ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Start-Process], InvalidOperationException
+ FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand
SQL Installation Failed Installation with exit code
SQL Installation Failed Installation with exit code
At C:\xyz-softwares\ms-sql-server\scripts\powershell\ms-sqlserver-installation.ps1:72 char:9
+ throw $error_message
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (SQL Installatio... with exit code:String) [], RuntimeException
+ FullyQualifiedErrorId : SQL Installation Failed Installation with exit code
PS C:\Windows\system32>
I have tried with powershell with domain credentials.
Although i have exe file and windows machine is connected with domain
Tried to start process command with domain credetials.
I'm using RQM Url Utility for uploading an attachment to RQM 5.0. I've successfully uploaded it using the followinfg command:
java -jar RQMUrlUtility.jar -command POST -user xx -password xx -filepath C:\xx.jpg -url https://xxx:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<project_alias>/attachment
Since the attachment is not associated with test case or test script ID, there is no way I can see this attachment using the UI. So I tried to associate with a test script or test case but not successfull result was obtained.
I tried this commands:
java -jar RQMUrlUtility.jar -command POST -user xx -password xx -filepath C:\xx.jpg -url https://xxx:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<project_alias>/attachment/urn:com.ibm.rqm:testcase:51
java -jar RQMUrlUtility.jar -command PUT -user xx -password xx -filepath C:\xx.jpg -url https://xxx:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<project_alias>/attachment/urn:com.ibm.rqm:testcase:51
java -jar RQMUrlUtility.jar -command POST -user xx -password xx -filepath C:\xx.jpg -url https://xxx:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<project_alias>/testcase/urn:com.ibm.rqm:testcase:51
java -jar RQMUrlUtility.jar -command PUT-user xx -password xx -filepath C:\xx.jpg -url https://xxx:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<project_alias>/testcase/urn:com.ibm.rqm:testcase:51
Thanks in advance,
Kirti
I have an IIS site running in Docker (mcr.microsoft.com/windows/servercore/iis:windowsservercore-ltsc2016) that for the first 5 minutes of it running, I get a 403.16 - Forbidden Error. Then, the site works fine. The relevant lines from my setup script are:
# Install and Configure US DoD InstallRoot, IIS ARR and HTTP Tracing
Set-ExecutionPolicy Bypass -Scope Process -Force
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
choco install installroot -y
choco install iis-arr -y
Set-WebConfigurationProperty -PSPath 'MACHINE/WEBROOT/APPHOST' -Filter 'system.webServer/proxy' -Name 'enabled' -Value 'True'
Add-WindowsFeature Web-Http-Tracing
#Create and Configure IIS Site
Remove-Website -Name 'Default Web Site'
$iisTheBridgePath = 'C:\inetpub\the-bridge'
New-Item -ItemType Directory -Force -Path $iisTheBridgePath
New-Website -Name 'TheBridge' -PhysicalPath $iisTheBridgePath
# https://github.com/microsoft/iis-docker/issues/67
C:\Windows\System32\inetsrv\appcmd set config -section:system.applicationHost/sites "/[name='TheBridge'].traceFailedRequestsLogging.enabled:True" /commit:apphost
C:\Windows\System32\inetsrv\appcmd set config -section:system.applicationHost/sites "/[name='TheBridge'].traceFailedRequestsLogging.maxLogFiles:50" /commit:apphost
C:\Windows\System32\inetsrv\appcmd set config -section:system.applicationHost/sites "/[name='TheBridge'].traceFailedRequestsLogging.directory:C:\inetpub\logs\FailedReqLogFiles" /commit:apphost
New-WebBinding -Name 'TheBridge' -IPAddress * -Port 443 -Protocol https
$cert = New-SelfSignedCertificate -DnsName 'localhost' -CertStoreLocation cert:\LocalMachine\My
Get-Item "Cert:\LocalMachine\My\$($cert.Thumbprint)" | New-Item 'IIS:\SSLBindings\0.0.0.0!443' # Attach the certificate to the SSL binding
Import-Module IISAdministration
$configSection = Get-IISConfigSection -SectionPath 'system.webServer/security/access' -Location 'TheBridge'
Set-IISConfigAttributeValue -AttributeName sslFlags -AttributeValue 'Ssl, SslNegotiateCert, SslRequireCert' -ConfigElement $configSection
Any ideas?
I am using linux terminal with below code to get server status but i am getting weblogic.Admin: command not found, any lead would be appreciable.
cd /opt/SP/WEB_DATA/weblogic/wls12130/user_projects/domains/pega/bin
. ./setDomainEnv.sh
export CLASSPATH=/WEB_DATA/weblogic/wls12130/wlserver/server/lib/weblogic.jar
ServerState=/opt/SP/WEB_DATA/mw/jdk1.8.0_91/bin/java weblogic.Admin -url http://t3://localhost:7001 -username weblogic -password weblogic1
GET -pretty -type ServerRuntime -property State |grep -i State|awk '{print $2}'| rev | cut -c 1- | rev
weblogic.Admin has been deprecated for a while now. Use wlst instead.
(location of ORACLE_HOME)/wlserver/common/bin/wlst.sh
wls:/offline>connect('weblogic','weblogic1','t3://localhost:7001')
wls:/DOMAIN/serverConfig>state('WLAdmin','Server')
WLAdmin is the name of the admin server
You can place the above commands in a python script and execute it using wlst
I am trying to re-deploy an application to Weblogic 10.3.6 using command line deployment using the following,
java weblogic.Deployer -adminurl myserver:7001 -user deploymyuser
-password welcome1 -targets mytarget -name appname -redeploy
D:/app/deploy/app.ear -upload -remote
I am getting the following errors
<Error> <J2EE Deployment SPI> <BEA-260101> <Parameter 'moduleArchive'
may not be null.>
[J2EE Deployment SPI:260101]Parameter 'moduleArchive' may not be null.
How can I resolve this issue?
Use the switch "-source" with the redeploy command:
java weblogic.Deployer -adminurl myserver:7001 -user deploymyuser -
password welcome1 -targets mytarget -name appname -redeploy
-source D:/app/deploy/app.ear -upload -remote