War deployment using puppet in Jboss - jboss

I have deployed the war in Jboss using puppet command and i checked the /standalone/deployments folder to check my .war file but i don't see any .war file there inside /standalone/deployments folder:
/opt/puppetlabs/bin/puppet apply --basemodulepath=/opt/alu/deploy/puppet/modules/ --hiera_config=/opt/install/hiera.yaml --execute ' class { profiles::jboss: }'
Ideally when we are doing manual deployment of .war file , we are putting the .war file inside /standalone/deployments folder.
My question is where can i check the .war which has deployed using puppet in Jboss server. My Jboss version is 6.0

Just complementing the answer, you can deploy directly on Jboss with a cli command and/or see the deployment status/content using the following commands:
#deployment-info
NAME RUNTIME-NAME PERSISTENT ENABLED STATUS
hibernate.war hibernate.war false true OK
#deployment=hibernate.war:read-attribute(name=content)
{
"outcome" => "success",
"result" => [{"hash" => bytes {
0x29, 0x93, 0x46, 0x13, 0xdd, 0x74, 0xff, 0x1d,
0xb7, 0x6e, 0xa6, 0xde, 0x60, 0xb3, 0x85, 0xf6,
0xae, 0x72, 0xc9, 0x0f
}}]
}
Q: Where can i check the .war which has deployed using puppet in Jboss server
A: You don't need another tool.

Related

jboss wildfly 17.0.1 - What is the correct location of silent authentication challenge file?

Hi there, after reading many articles on internet, I know that jboss wildfly writes a challenge file in tmp directory for silent authentication (JBOSS-LOCAL-USER mechanism).
Per my understanding, the challenge file should be located at, e.g. $JBOSS_HOME/standalone/tmp/auth/local2639861357474361285.challenge. If the management cli client can access the file successfully on the same machine, silent authentication succeeds.
Let's say:
App server hostname: appserver
jboss wildfly version: 17.0.1
wildfly is running as a service account - wildfly:wildfly
My account for works: mike
If I ssh to appserver using mike, and then run $JBOSS_HOME/bin/jboss-cli.sh -c, I think that I should fail the silent authentication, but it succeeds eventually. And then I try:
tcpdump to listen 9990 to see if any valuable information, and found:
0x0000: 4500 0060 abf6 4000 4006 9721 0a3f 7181 E..`..#.#..!.?q.
0x0010: 0a3f 7181 276a 932e 7a86 87cf 5604 7121 .?q.'j..z...V.q!
0x0020: 8018 0058 f7d2 0000 0101 080a 0fcc 2e80 ...X............
0x0030: 0fcc 2e6a 0000 0028 032f 746d 702f 6c6f ...j...(./tmp/lo
0x0040: 6361 6c35 3336 3339 3030 3330 3638 3933 cal5363900306893
0x0050: 3137 3238 3532 2e63 6861 6c6c 656e 6765 172852.challenge
auditctl various path to see if any valuable information, and found that the challenge file is created at /tmp/
Is there any system properties to set the location of challenge file? Appreciate for any help!
It seems likely that Wildfly is using the java.io.tmpdir system property. One way to override this is to run standalone.sh with a command line. If I run $WILDFLY_HOME/bin/standalone.sh -Djava.io.tmpdir=/var/tmp for example I can see in the startup logs:
...
java.io.tmpdir = /var/tmp
...
Without it I get:
...
java.io.tmpdir = /tmp
...
It turns out that upon I configure the http-interface according to https://docs.jboss.org/author/display/WFLY/Elytron+Subsystem#ElytronSubsystem-usedefaultelytronmgmtauth, my http-interface settings become:
<management-interfaces>
<http-interface http-authentication-factory="management-http-authentication" ssl-context="httpsSSC">
<http-upgrade enabled="true" sasl-authentication-factory="management-sasl-authentication"/>
<socket-binding http="management-http" https="management-https"/>
</http-interface>
</management-interfaces>
The challenge file will be created at /tmp/localxxxxxxxx.challenge.
Finally, I decide to stick with the default settings instead of using elytron for management authentication.

backup of Domain controller on Jboss eap6

I have 4 remote jboss eap6 with deployed application. First one is working as Domain Controller. In host.xml I declared backup of DC (example):
<domain-controller>
​ <remote security-realm="ManagementRealm">
​ <discovery-options>
​ <static-discovery name="primary" host="172.16.81.100" port="9999"/>
​ <static-discovery name="backup" host="172.16.81.101" port="9999"/>
​ </discovery-options>
​ </remote>
​</domain-controller>
For more info: link
What if 172.16.81.100 will be down? Is there any place on 172.16.81.101 to put actual copy of domain.xml with configuration of app-profiles and locally deployed HornetQ server?
Is there possibility to change configuration of connection factories of any working profile during switching to backup?
When you start "172.16.81.101" with --backup option domain.xml from DC will be cashed at remote HC under configuration directory with name 'domain.cached-remote.xml'. Once you reload HC it will act as DC for rest of the HC's. Can you please be specific what connection factory changes you want to done in cashed domain.xml file.

JBoss 7.1.1 + mod_cluster : Session replication - Can't find resource org.jboss.as.web.session.LocalStrings

I am running JBoss 7.1.1 instances and httpd + mod_cluster in the standalone mode
Machine1: JBoss 7.1.1 , Apache httpd + mod_cluster (windows 7)
Machine2 : JBoss 7.1.1 (windows 7)
I am starting the nodes in with the below command
standalone -c standalone-ha.xml -b 192.168.4.76 -u 230.0.0.4 -Djboss.server.base.dir=../standalonenode1 -Djboss.node.name=node1
standalone -c standalone-ha.xml -b 192.168.4.81 -u 230.0.0.4 -Djboss.server.base.dir=../standalonenode2 -Djboss.node.name=node2
Apache httpd is installed as a service,configured with JBoss mod cluster subsystem.
I have written a sample application to test the session replication. When the node1 is down, the session object becomes null. The following contents are from server.log file,
22:36:23,111 DEBUG [org.apache.tomcat.util.http.Cookies] (ajp--192.168.4.81-9595-1) Cookies: Parsing b[]: JSESSIONID=yzC5kdQ1jre0T2FnNhVAI6J6.standalonenode1
22:36:23,134 DEBUG [org.apache.catalina.util.StringManager] (ajp--192.168.4.81-9595-1) Can't find resource org.jboss.as.web.session.LocalStrings ModuleClassLoader for Module "deployment.sampleSession-1.0.war:main" from Service Module Loader
The above setup is completely working fine in a remote environment(windows 2012) and i tried to set it up locally with windows 7 machines.
I opened up jboss-as-web-7.1.1.Final.jar and there is no class file with the name org.jboss.as.web.session.LocalStrings.
Please help.
Thanks
Venkat

JBOSS EAP 7.0 with ActiveMQ RAR doesn't work?

I have a war that has being working just fine under EAP 6.4.x (x currently 8, but also under 6 and 4 and so on down to 6.4.0).
The WAR has some simple JMS client features to adding a message to a queue on a remote machine. The target QBroker is ActiveMQ 5.8.0.
I use the 5.8.0 RAR to set up an adapter/connector to the remote broker and then just normal JMS client stuff to push a message into a q. All is fine with this.
Beginning the "port" from 6.4.x to 7.0.1; and I am hung up on the amq 5.8.0 RAR stuff. For starters -- not going to use any of the AMQ Artemis stuff that is part of EAP 7 (yet). Initially I want to get my WAR working under 7.0 with as few changes as possible -- so leaving RAR in place is important.
Under 6.4.x, I use the standalone profile and just deploy the RAR via CLI kinda like this:
./jboss-cli.sh --connect -c "deploy --name=${AMQ_DEPLOY_NAME} --runtime-name=${AMQ_RAR_FNAME} ${_TMPDIR}/${AMQ_RAR_FNAME}"
I then use cli to set up resource adapter, connection def/factory and admin-object for the queue.
Following the same process with EAP 7.0.1, if I use the standalone profile I get
java.lang.NoClassDefFoundError: javax/jms/JMSException
issues while trying to enable the WAR that uses the RAR. Ok so when I used standalone-full I get all sorts of variations of this sort of error:
2016-07-18 15:48:10,867 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([
("subsystem" => "messaging-activemq"),
("server" => "default")
]) - failure description: {
"WFLYCTL0180: Services with missing/unavailable dependencies" => ["jboss.messaging-activemq.default is missing [jboss.http-upgrade-registry.default]"],
"WFLYCTL0288: One or more services were unable to start due to one or more indirect dependencies not being available." => {
"Services that were unable to start:" => ["jboss.messaging-activemq.default.jms.manager"],
"Services that may be the cause:" => [
"jboss.http-upgrade-registry.default",
"jboss.naming.context.java.JmsXA"
]
}
}
The above messages suggest something is wrong with the messaging-activemq stuff (or the built in artemis stuff).
In both cases, I do set my EJB default resource adapter to the RAR created above.
So what am I missing on this set up?
Some particulars about my Environment:
War doesn't have any jboss/wildfly specific DDs in it.
I do not have the AMQ RAR deployed as a static module (nor do I want to) -- it is just a jar I have deployed - like other JAR (for DB drivers) or WARS, EJB jars, etc.
cat version.txt
Red Hat JBoss Enterprise Application Platform - Version 7.0.1.GA
java -version
java version "1.8.0_92"
Java(TM) SE Runtime Environment (build 1.8.0_92-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.92-b14, mixed mode)
uname -a
Linux wellandf3 4.6.4-301.fc24.x86_64 #1 SMP Tue Jul 12 11:50:00 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
Is this NoClassDefFoundError caused by a ClassNotFoundException? If thats the case I would try to add javax.jms.api as global module.

CSPack RemotingException while packaging Cloud service project with MSBuild

I have a powershell script that is packaging our builds and deploys them to Azure Cloud Services. This script was running without any problem with SDK 2.3, but when we upgraded to SDK 2.5 we started receiving the following error while building the project:
CorePublish:
CorePublish: PackageWebRole = True
Publishing starting...
RolePlugins is
Importedmodules is
Publishing to 'bin\Release\app.publish\'
Creating directory "bin\Release\app.publish\".
TargetServiceDefinition is bin\Release\ServiceDefinition.csdef
TargetServiceConfiguration is bin\Release\ServiceConfiguration.cscfg
Roles is E:\Preview\temp\Azure\obj\Release\App\
error MSB4018: The "CSPack" task failed unexpectedly.
System.Runtime.Remoting.RemotingException: Object '/54628d54_42c6_4d39_bc4c_958b6bfaeb90/6y8efa6v6y8omskqeetyix8g_4.rem' has been disconnected or does not exist at the server.
at System.IO.FileStream.get_CanRead()
at MS.Internal.IO.Zip.ZipIOLocalFileBlock.CheckFileAccessParameter(Stream stream, FileAccess access)
at MS.Internal.IO.Zip.ZipIOLocalFileBlock.GetStream(FileMode mode, FileAccess access)
at System.IO.Packaging.ZipPackagePart.GetStreamCore(FileMode mode, FileAccess access)
at System.IO.Packaging.PackagePart.GetStream(FileMode mode, FileAccess access)
at Microsoft.ServiceHosting.Tools.Packaging.Utils.CopyFullStreamToPart(Stream source, PackagePart part, PackageManifest manifest)
at Microsoft.ServiceHosting.Tools.Packaging.PackageCreator.CreateRolePackages(ModelProcessor modelProcessor, PackageManifest applicationManifest, Package applicationPackage)
at Microsoft.ServiceHosting.Tools.Packaging.PackageCreator.CreatePackage(Stream outputStream, Action`1 postProcess, PackageRestrictions restrictions)
at Microsoft.ServiceHosting.Tools.Packaging.ServiceApplicationPackage.CreateServiceApplicationPackage(String serviceModelFileName, String serviceDescriptionFile, Stream output, IPackageSecurity encrypt, Dictionary`2 namedStreamCollection, String userInfo, EventHandler`1 rolePackagePartAddedHandler)
at Microsoft.ServiceHosting.Tools.MSBuildTasks.PackageCreator.CreateServiceApplicationPackage(String serviceRdFilePath, String processedServiceDefinitionFile, FileStream packageStream, Dictionary`2 namedStreams, Dictionary`2 rolesDictionary)
at Microsoft.ServiceHosting.Tools.MSBuildTasks.PackageCreator.CreateServiceApplicationPackage(String serviceRdFilePath, String processedServiceDefinitionFile, FileStream packageStream, Dictionary`2 namedStreams, Dictionary`2 rolesDictionary)
at Microsoft.ServiceHosting.Tools.MSBuildTasks.CSPack.TryCreatePackage(ServiceDefinitionModel sm)
at Microsoft.ServiceHosting.Tools.MSBuildTasks.CSPack.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext()
It is running on Windows Server 2008 R2, using MSBuild from VS2013 and the MSBuild is runnin like this parameters (from powershell):
& $msBuildPath "$tempPath\Azure\Azure.ccproj" /p:TargetProfile=Cloud /p:Configuration=Release /target:publish /flp:"Verbosity=quiet;logfile=E:\AzurePreview\msbuild.log"
I could not find anything connected to this issue.
I even tried to remove all traces of VS, SDKs and tools that might be connected to powershell, VS or Azure in general and installed the necessary parts again rebut nothing helped.
Could you please help me resolve this issue?
After discussing this issue with Microsoft support, I was able to package the project using CSPack command line tool, so I'm using this as a workaround.
Edit:
This issue seems fixed in Azure SDK 2.7