When I want to run a script in Inline Script mode on SSH Deployment Task on Azure Devops Version Dev17.M153.5, that one goes on hang as below. There is no problem that we have checked the authorizations of the user running the command. Operating system version on target Solaris 11.4.Is there a method to solve this problem?
##[debug]inline=cd /home/userstfs/workspaces/*****/src;pwd
##[debug]No script header detected. Adding: #!/bin/bash
##[debug]Agent.TempDirectory=D:****_temp
##[debug]failOnStdErr=true
Trying to establish an SSH connection to #...***:22
Successfully connected.
##[debug]remoteScriptPath = "./sshscript_1596017258623._unix"
##[debug]Copying script to remote machine
You have to update the agent in the deployment pools from:
Organization setting - Deployment pools - Update targets
I have a web server running on a virtual machine and I need some actions (e.g. "service apache2 reload") to be performed there automatically after I'll deploy my code from Idea
Automatically -- no way AFAIK.
https://youtrack.jetbrains.com/issue/WI-3344 -- watch this ticket (star/vote/comment) to get notified on any progress.
You may also watch related tickets:
https://youtrack.jetbrains.com/issue/WI-23938
https://youtrack.jetbrains.com/issue/WI-3239
The only manual solutions I may suggest right now are:
either keep SSH console opened (IDE has it built-in) and execute such command manually once deployed
or create "Remote SSH External Tools" entry that will do such job (connect and issue specified command) manually after deployment (once created you can assign custom shortcut to it so it can be run more easier).
In both cases -- check this manual.
I have tried following this tutorial but the new password doesn't take effect after security is enabled again, still have to use old password to login as wasadmin:
http://weblogic-wonders.com/weblogic/2014/03/27/reset-websphere-admin-console-password/
I even tried the guide from IBM:
http://www-01.ibm.com/support/docview.wss?uid=swg21392427
But I'm lost at this step:
_Navigate via command prompt to /ConfigEngine
Because in my WebSphere it doesn't have this ConfigEngine folder in order the run the rest of the commands.
Can anyone help me?
EDIT: This is WebSphere 7 for Maximo 7.5
Have you tried the following?
To disable security, please perform the following steps via wsadmin:
/bin/> wsadmin -conntype NONE
wsadmin> securityoff
wsadmin> exit
Restart the servers.
Enable the security from administrative console.
Once the needed corrections are made, you can re-enable security in the admin console and then restart WebSphere.
NOTE: To restart the servers, you will first need to manually kill the java process since security is still enabled in the currently running process.
Or editing the xml file
Following this link you have 2 optiont:
This is for the standalone version
Make a backup of the security.xml file:
/config/cells/cellname/security.xml
Edit the security.xml file by searching for the first instance of " enabled= ". You should see enabled="true" as in:
Change to enabled="false".
Save the security.xml file.
Restart server1 and the WebSphere_Portal servers. If you get authentication exceptions while trying to stop the servers, you may have to manually kill the server processes and then restart them.
In the wpconfig.properties file, make the following changes:
PortalAdminId=wpsadmin
PortalAdminGroupId=wpsadmins
Refer to the Information Center link for specific instructions.
Save the wpconfig.propeties file.
Try to disable security again using the disable-security task:
./WPSconfig.sh disable-securit y
At this point, security should be disabled. You can verify by accessing the WebSphere Application Server admin console. You should be prompted for only a user name, not a password.
Follow these instructions for a clustered version:
Make a backup of the security.xml file on the Deployment Manager machine:
/config/cells/cellname/security.xml
Edit the security.xml file by searching for the first instance of "enabled= ". You should see enabled="true" as in:
Change to enabled="false".
Save the security.xml file.
Copy the security.xml file to the nodes:
/config/cells/cellname/security.xml
/config/cells/cellname/security.xml
Restart DMGR, NodeAgents, and WebSphere_Portal servers. If you get authentication exceptions while trying to stop the servers, you may have to manually kill the server processes and then restart them.
In wpconfig.properties, make the following changes:
PortalAdminId=wpsadmin
PortalAdminGroupId=wpsadmins
Refer to the Information Center link for specific instructions.
Save the wpconfig.propeties file.
Try to disable security again using the disable-security task. Note that the DMGR and the nodeagent should be running:
./WPSconfig.sh disable-security
At this point, security should be disabled. You can verify by accessing the DMGR AdminConsole. You should be prompted for only a user name, not a password.
Or more option is explained here
Note: I haven't tried this myself yet
Goto DMGR bin directory and follow the below process.
[root#localhost bin]# ./wsadmin.sh -connType NONE -lang jython
wsadmin>AdminTask.changeFileRegistryAccountPassword('-userId saddam -password saddamm')
wsadmin>AdminConfig.save()
Please restart dmgr.
If you have forgotten the password, then you have to directly kill the dmgr process id and start dmgr.
Login to WebSphere Console -> Users and Groups -> Manage Users -> click on <user_name> -> change the password value -> save the configuration.
I am trying to port an application from WebLogic to JBoss EAP 6.2.
When running the standalone server in JBoss, in the admin console there is a button and in the command line interface there is a command line option to check the data source connection.
/subsystem=datasources/data-source=myds:test-connection-in-pool
These options do not appear to exist in either place when running the "domain" server. Am I missing something? Is there some further setting I must make to enable it? I tried a technique which is sometimes an analog in the domain server and it doesn't work here.
/profile=full/subsystem=datasources/data-source=myds:test-connection-in-pool
JBoss docs are much weaker for "domain" model than for "standalone".
You are absolutely correct that while running the standalone server in JBoss, in the admin console there is a button and in the command line interface there is a command line option to check the data source connection butThese options do not appear to exist in either place when running the "domain" server.
You still can use the command line of jboss-eap-6.x to test the configured data source connection in domain server. You need to navigate to $JBOSS_HOME/bin/ and execute script: jboss-cli.sh
Connect to the domain server controller with: connect :PORT_NO and execute the following commands:
For XA-DataSource:
/host=$Host_Controller_Name/server=$Server_Name/subsystem=datasources/xa-data-source=DataSource_JNDI_Name:test-connection-in-pool
For Non-XA-DataSource:
/host=$Host_Controller_Name/server=$Server_Name/subsystem=datasources/data-source=DataSource_JNDI_Name:test-connection-in-pool
How can I stop and then restart an IIS 7 application pool from an MSBuild script running inside TeamCity. I want to deploy our nightly builds to an IIS server for out testers to view.
I have tried using appcmd like so:
appcmd stop apppool /apppool.name:MYAPP-POOL
... but I have run into elevation issues in Windows 2008 that so far have stopped me from being able to run that command from my TeamCity build process because Windows 2008 requires elevation in order to run appcmd.
If I do not stop the application pool before I copy my files to the web server my MSBuild script is unable to copy the files to the server.
Has anybody else seen and solved this issue when deploying web sites to IIS from TeamCity?
This article describes using an htm file named App_offline.htm to take a site offline. Once the IIS detectes this file in the root of a web application directory,
ASP.NET 2.0 will shut-down the application, unload the application
domain from the server, and stop processing any new incoming requests
for that application.
In App_offline-htm, you can put a user-friendly message indicating that the site is currently under maintainance.
Jason Lee shows the MSDeploy calls you need to use (plus much more about integrating these steps in your build scripts!).
MSDeploy
-verb:sync
-source:contentPath="[absolute_path]App_offline-Template.htm"
-dest:contentPath="name_of_site/App_offline.htm",computerName="copmuter_name",
username=user_with_administrative priviliges,password=passwort
After deployment you can remove the App_offline.htm file using the following call:
MSDeploy
-verb:delete
-dest:contentPath="name_of_site/App_offline.htm",computerName="computer_name",
username=user_with_administrative_priviliges,password=passwort
The msbuild community tasks includes an AppPoolController that appears to do what you want (though as noted it is dated and at present only supports IIS6.) An example:
<AppPoolController ApplicationPoolName="MyAppPool" Action="Restart" />
Note that you can also provide a username and password if necessary.
Edit: Just noticed that the MSBuild Extension Pack has an Iis7AppPool task that is probably more appropriate.
this is the fairly hackey workaround I ended up using:
1) Set up a limited-access account for your service to run as. Since I'm running a CruiseControl.NET service, I'll call my user 'ccnet'. He does NOT have admin rights.
2) Make a new local user account, and assign to the Administrators group (I'll call him 'iis_helper' for this example). Give him some password, and set it to never expire.
3) Change iis_helper's access permissions to NOT allow local login or remote desktop login, and anything else you might want to do to lock down this account.
4) Log in (either locally or through remote desktop) as your non-admin user, 'ccnet' in this example.
5) Open a command terminal, and use the 'runas' command to execute whatever it is that needs to be run escalated. Use the /savecred option. Specify your new administrative user.
runas /savecred /user:MYMACHINE\iis_helper "C:\Windows\System32\inetsrv\appcmd.exe"
The first time it will prompt you for 'iis_helper's password. After that, it will be stored thanks to the /savecred option (this is why we're running it once from a real command prompt, so we can enter the password once).
6) Assuming that command executed OK, you can now log out. I then logged back in as a local admin and turned off the 'ccnet' user for local interactive login, and remote desktop. The account is only used to run a service, but no real logins. This isnt a mandatory step.
7) Set up your service to run as your user account ('ccnet').
8) Configure whatever service is running (CruiseControl.NET in my case) to execute the 'runas' command instead of 'appcmd.exe' directly, the same as before:
replace:
"C:\Windows\System32\inetsrv\appcmd.exe" start site "My Super Site"
with:
runas /savecred /user:MYMACHINE\iis_helper "\"C:\Windows\System32\inetsrv\appcmd.exe\" start site \"My Super Site\""
The thing to note there is that the command should be in one set of quotes, with all the inner quotes escaped (slash-quote).
9) Test, call it a day, hit the local pub.
Edit: I apparently did #9 in the wrong order and had a few too many before testing...
This method also doesn't completely work. It does attempt to run as the administrative account, however it still runs as a non-escalated process under the administrative user, so still no admin permissions. I didn't initially catch the failure because the 'runas' command spawns a separate cmd window then closes right away, so I wasn't seeing the failure output.
Its starting to seem like the only real possibility might be writing a windows service that will run as admin, and its only purpose is to run appcmd.exe, then somehow call that service to start/stop IIS.
Isn't it great how UAC is there to secure things, but in actuality just unsecures more servers, because anything you want to do you have to do as admin, so its easier to just always run everything as admin and forget it?
You can try changing the Build Agent Service settings to log-on as a normal user account instead of SYSTEM (the default), this can be done from the services control panel (Start | Run | services.msc).
If it doesn't help, you can also try configuring the appcmd to always run elevated, refer to this document for details.
In case such option is not available for appcmd or it still doesn't work, you can disable UAC completely for this user.
Here you go. You can use this from CC.NET with NAnt or just with NAnt:
http://nantcontrib.sourceforge.net/release/latest/help/tasks/iisapppool.html