Weblogic Deployment with non dba privileges - weblogic

Is it possible to deploy applications to Weblogic server from command line(maven) using username other than weblogic admin?
E.g For developers a group is created and users are added to that group. These users are developers which are not DBA' s.
Is it possible to deploy applications from command line with developet privileges?
Screenshot of server status

Yes, it is quite possible. Users need a role "Deployer" to deploy/undeploy applications in WebLogic. WebLogic would automatically grant this role to users who belong to group "Deployers"
So for you,
1) if such users exist on external ldap server (like AD, OID, etc), create a group "Deployers" on this external ldap server and make these users members of this group.
2) if such users exist in WebLogic's embedded ldap, then "Deployers" group is already present in weblogic's embedded ldap for completing the user-group mapping. All you need to do is make these users member of this group
Here is my test result:
D:\oracle\wls1036\wlserver_10.3\server\lib>d:\Tools\maven\apache-maven-3.0.5\bin\mvn.bat weblogic:deploy -Dadminurl=t3:/
/192.169.0.1:7001 -Duser=deployeruser1 -Dpassword=weblogic1 -Dtargets=AdminServer -Dsource=d:\tmp\cus_app\testvirtual.wa
r -Dname=testvirtual
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Mojo Archetype 10.3.6.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- weblogic-maven-plugin:10.3.6.0:deploy (default-cli) # weblogic-maven-plugin ---
weblogic.Deployer invoked with options: -noexit -adminurl t3://192.169.0.1:7001 -user deployeruser1 -deploy -name testv
irtual -source d:\tmp\cus_app\testvirtual.war -targets AdminServer
<May 13, 2013 9:44:50 PM IST> <Info> <J2EE Deployment SPI> <BEA-260121> <Initiating deploy operation for application, te
stvirtual [archive: d:\tmp\cus_app\testvirtual.war], to AdminServer .>
Task 4 initiated: [Deployer:149026]deploy application testvirtual on AdminServer.
Task 4 completed: [Deployer:149026]deploy application testvirtual on AdminServer.
Target state: deploy completed on Server AdminServer

Related

Azure Backup Failed "VM agent is unable to communicate with the Azure Backup Service"

I am receiving a backup failed error since 6/20/2020 within my Azure backup policy.
I also noticed within the Properties section under Settings of the Virtual Machine instance the "Agent status" is in a "Not Ready" state.
When I click the Backup section under Operations the Backup Status shows 2 entries.
Backup Pre-Check Warning
Last backup status Failed
I can click the Warning option and the link takes me to a page that reads:
Issue Description
VM agent is unable to communicate with the Azure Backup Service.
Suggested Action(s)
Ensure that VM agent is latest and running. Allow access to IP 168.63.129.16
Per the Suggested Actions, I created the Outbound Rule to the IP Address 168.63.129.16 within the network interface of the Virtual Machine instance that is having the backup failed issue.
That did not solve the problem. I also performed the below troubleshooting steps as well with no solution:
I also Verified the Windows Azure Guest Agent service is running within services on the affected VM OS (ACMVI002).
Stopped the VM instance from the Azure Portal. I then turned the VM instance back on. Issue persisted.
Does anyone have a solution to this Backup Failed issue?
You probably still don't have access to 168.63.129.16 or your agent is too old, this is a global Microsoft IP used to facilitate a communication channel to Azure platform resources, more details you can read this article.
Azure Backup needs Azure Agent up to date, you can have an old Agent, but depends on how old it is, you can have issue, please refer to this page for more details.
You can try to update your Azure Agent manually, here it is information about it.
From C:\WindowsAzure\Logs\WaAppAgent.txt you see some options to try to identify your issue, version of your Agent appears.
[00000006] [06/25/2020 20:31:00.34] [INFO] WindowsAzureGuestAgent starting. Version 2.7.41491.971
From C:\WindowsAzure\Logs\WaSecAgent-startPoll.txt you see logs from your VM to 168.63.129.16
[2020/06/25 20:31:02:176] Info:WaSecWireServerProxy:: Will start polling for Uri 168.63.129.16 , poll time 900000 ms, running time 21600000 ms
[2020/06/25 20:31:02:176] Verbose:WaSecWireServerProxy:: - WireServerProxy::StartCACertsUpdater
[2020/06/25 20:31:02:176] Info:WaSecWireServerProxy:: Current process is the primary process for polling
[2020/06/25 20:31:02:176] Info:WaSecWireServerProxy:: CA certs polling called for 168.63.129.16, poll interval 900000
[2020/06/25 20:31:02:176] Verbose:WaSecWireServerProxy:: - WireServerProxy::StartCACertsUpdater0x0
[2020/06/25 20:31:02:176] Info:WaSecWireServerProxy:: Starting CA Cert Polling Thread
From the same file C:\WindowsAzure\Logs\WaAppAgent.txt you see logs about RecoveryServices
[00000010] [06/25/2020 20:58:15.54] [INFO] Initialize ExtensionWorkflow for 'FastTrack GS: SeqNo=3'.
[00000009] [06/25/2020 20:58:15.57] [INFO] Plugin Microsoft.Azure.RecoveryServices.VMSnapshot 1.0.65.0 not found in cache.
[00000010] [06/25/2020 20:58:15.57] [INFO] Plug-in Microsoft.EnterpriseCloud.Monitoring.MicrosoftMonitoringAgent 1.0.18038.1 found in cache.
[00000009] [06/25/2020 20:58:15.59] [INFO] Starting download of plugin version manifest Microsoft.Azure.RecoveryServices.VMSnapshot from location: https://zrdfepirv2bl4prdstr03.blob.core.windows.net/80afa74b14194a679c6347109557b7ee/Microsoft.Azure.RecoveryServices_VMSnapshot_useast_manifest.xml
[00000009] [06/25/2020 20:58:15.59] [WARN] Downloading version manifest via HostGAPlugin for plugin Microsoft.Azure.RecoveryServices.VMSnapshot from https://zrdfepirv2bl4prdstr03.blob.core.windows.net/80afa74b14194a679c6347109557b7ee/Microsoft.Azure.RecoveryServices_VMSnapshot_useast_manifest.xml.
[00000010] [06/25/2020 20:58:15.59] [INFO] Test extract the plugin zip file to the temp folder C:\windows\TEMP\b4162b75-fe14-4669-8ed5-e283671cb293
[00000009] [06/25/2020 20:58:15.62] [INFO] Download finished for plugin version manifest Microsoft.Azure.RecoveryServices.VMSnapshot.
Some logs here too
C:\WindowsAzure\Logs\Plugins\Microsoft.Azure.RecoveryServices.VMSnapshot\1.0.65.0
In case anything helped, consider open up a ticket to Microsoft, it could be a issue on Microsoft side that we don't have access to investigate it further.
You would need to re-install the Backup extension. Take a backup of whole registry then use following steps:
Login to the affected machine.
Open Registry Editor.
Remove VMSnapshot registry keys at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Azure\HandlerState
Remove or rename VMSnapshot Plugin Folders at C:\Packages\Plugins.
Now, open command prompt as admin and run below commands to force the extension installation:
REG ADD "HKLM\SOFTWARE\Microsoft\BcdrAgent" /v IsProviderInstalled /t REG_SZ /d False /f
REG ADD "HKLM\SOFTWARE\Microsoft\BcdrAgentPersistentKeys" /v IsCommonProviderInstalled /t REG_SZ /d False /f
Restart the Service "WindowsAzureGuestAgent".
Trigger a manual backup. As a part of backup, extension will be re-installed automatically.

Weblogic server won’t start, because a bad.jar was deployed in it. But I can’t start the admin console, in order to remove the .jar

My Weblogic server was running fine inside my Eclipse. But then I accidentally deployed an .ear into my Weblogic server (using the server's Admin Console) which conflicts with another .ear, and now my Weblogic server won't start up. I know how to remove the .ear. The way to remove it is to go to the Admin Console, choose Deployments, checkmark the offending .ear and then choose stop and delete. But I can't get to the Admin Console because the Weblogic server won't start up.
I want to undeploy it, but I can't, because I can't start up the Admin Console. I also tried undeploying it with the command line, but the command requires communicating with a running server.
The error message in the Eclipse console says: "Failed to initialize the application 'EILoggingSharedLib [LibSpecVersion=2.22,LibImplVersion=2.22]" due to error weblogic.application.library.LibraryDeploymentException: [J2EE:160145]Failed to deploy library Extension-Name: EILoggingSharedLib, Specification-Version: 2.9, Implementation-Version: 2.9, because of conflicting library Manifest values, and library information registered with the server: [Specification-Version: 2.9 vs. 2.22, Implementation-Version: 2.9 vs. 2.22]. Check the library MANIFEST.MF file and correct version information there to match server settings, or undeploy the misconfigured library."
This is the command line command I used:
C:\bea12c\wlserver\server\lib>java -cp weblogic.jar weblogic.Deployer -verbose -noexit -adminurl http://localhost:7016 -username (myusername) -password (mypassword) -name Dev12c -undeploy EILoggingSharedLib -timeout 300
weblogic.Deployer invoked with options: -verbose -noexit -adminurl http://localhost:7016 -username weblogic -name Dev12c -undeploy EILoggingSharedLib -timeout 300
Unexpected Error Initializing Deployer: weblogic.Deployer$DeployerException: weblogic.deploy.api.tools.deployer.DeployerException: Unable to connect to 'http://localhost:7016': Destination 0:0:0:0:0:0:0:1, 7016 unreachable; nested exception is:
java.net.ConnectException: Could not connect to /0:0:0:0:0:0:0:1; No available router to destination. Ensure the url represents a running admin server and that the credentials are correct. If using http protocol, tunneling must be enabled on the admin server.
I also tried starting the server with startweblogic.sh with the following command, using the same ID and password that I use to log into the admin console (when it was running). But it didn't help:
startweblogic.sh username=(myusername) password=(mypassword)
Thank you!
First, try to remove your application from deployed applications with Eclipse. If it does not work, edit the ${DOMAIN_HOME}/config/config.xml file and remove the declaration of your application. Then start your server.
I found a solution. My Weblogic server that had the problem was at http://localhost:7016. Since it's a localhost server, all the libraries and apps deployed to that localhost are in a directory in my C: drive where my Weblogic server installation is. I deleted the offending .ear using File Explorer, then the Weblogic server started up fine. I was able to go into the Admin Console and delete them again from there. After that, all was good. Thank you, Emmanuel and Wesley.

LDAP plugin: user authentication fails after upgrade

After having migrated to SonarQube 5.6, LDAP 2.1 (from SonarQube 5.3, LDAP 1.5)
When authenticating against an Active Directory domain I get the following error
2016.12.16 15:56:31 ERROR web[rails] Error from external users provider: exception Java::JavaLang::NullPointerException:
Please notice that
During the migration I have had to add the following parameters in order to get the LDAP plugin to recognize the working domain
ldap.realm=company.domain
ldap.user.request=(&(objectClass=user)(sAMAccountName={login}))
In the logs I find
Test LDAP connection on ldap://servername.company.domain: OK
The LDAP plugin (supported by SonarSource) doesn't include anymore the active-directory related code.
This code is now contained in the community supported plugin Active Directory plugin
Honestly, I haven't found any trace of this change in their official documentation. I have found it while browsing the code of the LDAP plugin (because when I finally completed its configuration to match my domain, I noticed that the users created by the LDAP plugin were not matching the existing users => loss of privileges)
Enabling the Active Directory plugin (and disabling the LDAP one) allowed me to get the same feature level as in SonarQube 5.3, LDAP 1.5

IBM Worklight Console - audit trail of tasks performed on console

I am using IBM Worklight 6 and for auditing purposes would like to know if I it is possible to log the details of tasks performed on the Worklight Console, i.e. log the details when deploying new version of app/adapter?
Regards,
Tom
Worklight, or more specifically, the application server that Worklight Server is deployed to (WAS, WAS Liberty profile, Tomcat), does not have the ability to filter logs into seperate files, for example for the purpose you have mentioned.
What you might be able to do is take the server log, and create your own manual filtering (by script, of course). What you will need to do is to find the prefix for each action done and filter using it.
In Eclipse (or your production environment) open server.xml > Logging and change the Console log level from Audit (default) to Info.
This in turn will produce the following log lines in the sever log:
[INFO ] FWLSE0084I: Adapter 'aaa' was deployed successfully. [project test]
In your script you can now filter for FWLSE0084I for adapters and similar prefixes for other actions, likely. I am not sure if all Worklight Console actions have prefixes, but if they are ones that require a connection to the server, then likely that they do.
http://i.stack.imgur.com/sZ0fj.png

BeanCreationException while deploying IBM worklight enterprise server

We are trying to deploy Worklight Enterprise edition on Ubuntu server over Tomcat
While we were successful with several steps, we got stuck with one error while getting the Tomcat up and running with our War file. We use MySQL as DB.
The specific error we are facing is ".BeanCreationException: Error creating bean with name 'deployService' defined in URL"
SEVERE: FWLST0003E: ========= Failed starting project /td_ibm
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'deployService' defined in URL [jar:file:/usr/share/tomcat6/lib/worklight-jee-library.jar!/conf/integration.xml]: Invocation of init method failed; nested exception is java.lang.NullPointerException
The complete log trace text file can be found at Tomcat Log
This is clearly a configuration issue.
1. run mysql-admin (MySQL UI front end) and make sure you can connect to the Worklight catalog under the name and user you defined in the worklight.properties.
if the database is on a different machine than the tomcat (make sure you have set the right remote access permissions for MySQL (for testing only: try giving Worklight DB user an untrusted access .i.e. use "#%" ))
another issue: if you are installing Worklight on Tomcat: did you run the SQL schema script to create the Worklight schema ? you must run it manually (there is a workaround though: connect to the same database from Eclipse which runs a Worklight project)
what files do you have under /var/lib/tomcat6/worklight.home/td_ibm/data/export/adapters ?
If its empty, there maybe a bug in the Worklight code.