Difference between kill and destroy WildFly server - wildfly

I can see you can stop individual Domain servers in WildFly with:
stop
kill
destroy
While it's obvious "stop" should be a graceful shutdown, what's the difference between kill and destroy? (in particular in terms of forcing session stopping?)
Thanks!

From the read-operation-description operation on the server-groups resource.
{
"operation-name" => "destroy-servers",
"description" => "Destroy the server processes in the server group. In case the server is not in the stopping state, it will attempt to stop the server first.",
"request-properties" => {},
"reply-properties" => {},
"read-only" => false,
"runtime-only" => true
}
{
"operation-name" => "kill-servers",
"description" => "Kill all server processes in the server group. In case the server is not in the stopping state, it will attempt to stop the server first. This operation may not work on all platforms an
d will try to destroy the process if not available.",
"request-properties" => {},
"reply-properties" => {},
"read-only" => false,
"runtime-only" => true
}
{
"operation-name" => "stop-servers",
"description" => "Stops all servers belonging to the server group currently running in the domain.",
"request-properties" => {
"blocking" => {
"type" => BOOLEAN,
"description" => "Wait until the servers are fully stopped before returning from the operation.",
"expressions-allowed" => false,
"required" => false,
"nillable" => true,
"default" => false
},
"timeout" => {
"type" => INT,
"description" => "The graceful shutdown timeout. If this is zero then a graceful shutdown will not be attempted, if this is -1 then the server will wait for a graceful shutdown indefinitely.",
"expressions-allowed" => false,
"required" => false,
"nillable" => true,
"default" => 0,
"unit" => "SECONDS"
}
},
"reply-properties" => {},
"read-only" => false,
"runtime-only" => true
}
For the operations on the individual servers:
{
"operation-name" => "destroy",
"description" => "Destroy the server process. In case the server is not in the stopping state, it will attempt to stop the server first.",
"request-properties" => {},
"reply-properties" => {},
"read-only" => false,
"runtime-only" => true
}
{
"operation-name" => "kill",
"description" => "Kill the server process. In case the server is not in the stopping state, it will attempt to stop the server first. This operation may not work on all platforms and will try to destroy
the process if not available.",
"request-properties" => {},
"reply-properties" => {},
"read-only" => false,
"runtime-only" => true
}
{
"operation-name" => "stop",
"description" => "Stop a currently running server.",
"request-properties" => {
"server" => {
"type" => STRING,
"description" => "The name of the server.",
"expressions-allowed" => false,
"required" => false,
"nillable" => true,
"min-length" => 1L,
"max-length" => 2147483647L,
"deprecated" => {
"since" => "1.0.4",
"reason" => "This parameter is ignored, instead the name comes from the value of the last address element"
}
},
"blocking" => {
"type" => BOOLEAN,
"description" => "Whether the operation should block and wait until the server is stopped.",
"expressions-allowed" => false,
"required" => false,
"nillable" => true
},
"timeout" => {
"type" => INT,
"description" => "If this timeout is set a graceful shutdown will be attempted. If this is zero (the default) then the server will shutdown immediately. A value larger than zero means the server
will wait up to this many seconds for all active requests to finish. A value smaller than zero means that the server will wait indefinitely for all active requests to finish.",
"expressions-allowed" => false,
"required" => false,
"nillable" => true,
"default" => 0,
"unit" => "SECONDS"
}
},
"reply-properties" => {
"type" => STRING,
"description" => "The status of the server following execution of this operation."
},
"read-only" => false,
"runtime-only" => true
}

Related

A way to get a list of web services deployed on wildfly

I am looking for a way with which I can get a list of all the web services deployed on wildfly, I looked around but I cannot find anything that fits the bill.
Thanks in advance.
In CLI you can execute the following command to show all the web services.
/deployment=*/subsystem=webservices:read-resource(include-runtime=true, recursive=true)
Example CLI output:
{
"outcome" => "success",
"result" => [{
"address" => [
("deployment" => "helloworld-ws.war"),
("subsystem" => "webservices")
],
"outcome" => "success",
"result" => {"endpoint" => {"helloworld-ws%3Aorg.jboss.as.quickstarts.wshelloworld.HelloWorldServiceImpl" => {
"average-processing-time" => 0L,
"class" => "org.jboss.as.quickstarts.wshelloworld.HelloWorldServiceImpl",
"context" => "helloworld-ws",
"fault-count" => 0L,
"max-processing-time" => 0L,
"min-processing-time" => 0L,
"name" => "org.jboss.as.quickstarts.wshelloworld.HelloWorldServiceImpl",
"request-count" => 0L,
"response-count" => 0L,
"total-processing-time" => 0L,
"type" => "JAXWS_JSE",
"wsdl-url" => "http://localhost:8080/helloworld-ws/HelloWorldService?wsdl"
}}}
}]
}
You can also use the web console to see the endpoints. If you go to the Runtime tab, Standalone server, Subsystems and click "View" on Web Services.

What is the correct format for creating the creative of an MPA Advertisement on facebook?

I've been trying to create a MPA(multi-product ad) for some time now, but it keeps giving me the following error "Call to action link should be same as link of the post".
I've used the following format:
{
"object_story_spec" => {
"page_id" => 321954304600161,
"instagram_actor_id" => "874410812666052",
"link_data" => {
"multi_share_optimized" => true,
"multi_share_end_card" => true,
"message" => "Test message ad in adset",
"caption" => nil,
"link" => "http://www.adwyze.com?utm_source=facebook&utm_medium=ocpm&utm_campaign=TestforJson-06Dec2017-16h48m&utm_term=all-MF-18-65-06Dec2017-16h48m&utm_content=test_testadinadset-00-CarouselAd-06Dec2017-19h44m&utm_id=2b301660-01c2-4c21-9fe1-06863dbaac92",
"child_attachments" => [{
"link" => "http://www.adwyze.com?utm_source=facebook&utm_medium=ocpm&utm_campaign=Test for Json-06Dec2017-16h48m&utm_term=all-MF-18-65-06Dec2017-16h48m&utm_content=test_test ad in adset-00-CarouselAd-06Dec2017-19h44m&utm_id=2b301660-01c2-4c21-9fe1-06863dbaac92",
"name" => "TEst ad in adset",
"description" => nil,
"picture" => "https://adcreation-m.s3-ap-south-1.amazonaws.com/1512559029_test.jpg",
"call_to_action" => {
"type" => "SHOP_NOW",
"value" => {
"link" => "http://www.adwyze.com?utm_source=facebook&utm_medium=ocpm&utm_campaign=TestforJson-06Dec2017-16h48m&utm_term=all-MF-18-65-06Dec2017-16h48m&utm_content=test_testadinadset-00-CarouselAd-06Dec2017-19h44m&utm_id=2b301660-01c2-4c21-9fe1-06863dbaac92"
}
}
}, {
"link" => "http://www.adwyze.com?utm_source=facebook&utm_medium=ocpm&utm_campaign=Test for Json-06Dec2017-16h48m&utm_term=all-MF-18-65-06Dec2017-16h48m&utm_content=test_test ad in adset-00-CarouselAd-06Dec2017-19h44m&utm_id=2b301660-01c2-4c21-9fe1-06863dbaac92",
"name" => "TEst",
"description" => nil,
"picture" => "https://adcreation-m.s3-ap-south-1.amazonaws.com/1512559033_test.jpg",
"call_to_action" => {
"type" => "SHOP_NOW",
"value" => {
"link" => "http://www.adwyze.com?utm_source=facebook&utm_medium=ocpm&utm_campaign=TestforJson-06Dec2017-16h48m&utm_term=all-MF-18-65-06Dec2017-16h48m&utm_content=test_testadinadset-00-CarouselAd-06Dec2017-19h44m&utm_id=2b301660-01c2-4c21-9fe1-06863dbaac92"
}
}
}]
}
}
}
I've made sure that in "child_attachments". "link" and "call_to_action.value.link" have the same value, but I keep getting the same error. I've also tried escaping the links, removing spaces etc. I've been seeing this behaviour since 10 hours or so.
Despite's OP incorrect link values in the child_attachment and call_to_action, this has been confirmed by Facebook as a valid bug:
https://developers.facebook.com/bugs/310154929502029/
https://developers.facebook.com/bugs/1909897769263210/
I'm guessing OP was testing a lot of different combinations and this one he posted happened to have different values.
Hopefully this will be fixed soon.

Wildfly Postgres Connection Failed

I've tried to add Postgres as datasource in Wildfly but keep on getting the JDBC connection error as follow :
Failed to create JDBC connection.
An internal error occurred. Details Unexpected HTTP response: 500
Request {
"name" => "PostgresDS",
"enabled" => true,
"jndi-name" => "java:/PostgresDS",
"user-name" => "admin",
"password" => "123",
"pool-name" => "PostgresDS_Pool",
"use-ccm" => false,
"jta" => false,
"connection-url" => "jdbc:postgresql://localhost:5432/postgresdb",
"driver-class" => "org.postgresql.Driver",
"driver-name" => "postgresql-9.4.1208.jar",
"valid-connection-checker-class-name" => "org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLValidConnectionChecker",
"background-validation" => true,
"exception-sorter-class-name" => "org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLExceptionSorter",
"operation" => "add",
"address" => [
("subsystem" => "datasources"),
("data-source" => "PostgresDS")
] }
Response
Internal Server Error {
"outcome" => "failed",
"failure-description" => "WFLYCTL0212: Duplicate resource [
(\"subsystem\" => \"datasources\"),
(\"data-source\" => \"PostgresDS\") ]",
"rolled-back" => true }

Not able to assign deployed war file to main-server-group in jboss as7

I have jboss in domain mode.
I am not able to assign the deployed war file to the main-server-cgroup.
i am getting following error.
I am able to assign it to other-server-group.
Failed to add Deployment middleware.war
Unexpected HTTP response: 500
Request
{
"operation" => "composite",enter code here
"address" => [],
"steps" => [
{
"address" => [
("server-group" => "main-server-cgroup"),
("deployment" => "middleware.war")
],
"operation" => "add"
},
{
"address" => [
("server-group" => "main-server-cgroup"),
("deployment" => "middleware.war")
],
"operation" => "deploy"
}
]
}
Response
Internal Server Error
{
"outcome" => "failed",
"result" => {
"step-1" => {"outcome" => "success"},
"step-2" => {"outcome" => "success"}
},
"failure-description" => "JBAS010839: Operation failed or was rolled back on all servers.",
"rolled-back" => true,
"server-groups" => {"main-server-cgroup" => {"host" => {"master" => {"server-1" => {"response" => {
"outcome" => "failed",
"result" => {
"step-1" => {
"outcome" => "failed",
"rolled-back" => true
},
"step-2" => {
"outcome" => "failed",
"failure-description" => {
"JBAS014671: Failed services" => {"jboss.web.deployment.default-host./middleware" => "org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./middleware: org.jboss.msc.service.StartException in anonymous service: JBAS018040: Failed to start context
Caused by: org.jboss.msc.service.StartException in anonymous service: JBAS018040: Failed to start context"},
"JBAS014879: 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.deployment.unit.\"middleware.war\".deploymentCompleteService"],
"Services that may be the cause:" => ["jboss.binding.modcluster"]
}
},
"rolled-back" => true
}
},
"failure-description" => {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {
"JBAS014671: Failed services" => {"jboss.web.deployment.default-host./middleware" => "org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./middleware: org.jboss.msc.service.StartException in anonymous service: JBAS018040: Failed to start context
Caused by: org.jboss.msc.service.StartException in anonymous service: JBAS018040: Failed to start context"},
"JBAS014879: 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.deployment.unit.\"middleware.war\".deploymentCompleteService"],
"Services that may be the cause:" => ["jboss.binding.modcluster"]
}
}}},
"rolled-back" => true
}}}}}}
}

Append an element to an already existing SOAP::Data complex type

I'm very new to SOAP, PERL and pretty much everything else I've been asked to do so I'm hoping someone can point me in the right direction.
I've implemented a simple WCF solution and I've written a PERL client which passes a "complex data structure" to the solution using SOAP::lite and SOAP::Data. All this works very well so far, WCF solution see's the array as an array and I'm able to iterate through the array on the server side just fine.
However, I'm having an issue trying to append a data element to the array on the PERL side. I have the following code, which builds the array I need, but I need to append a few lines to the array later on in the code and I can't figure out how to that.
# build array of values
my $data= SOAP::Data->new
(name => 'array', value =>
[
SOAP::Data->new(name => 'elem:string', value => 'firststring'),
SOAP::Data->new(name => 'elem:string', value => 'secondstring'),
SOAP::Data->new(name => 'elem:string', value => 'thridstring')
]
)
->attr
(
{ 'xmlns:elem' => 'http://schemas.microsoft.com/2003/10/Serialization/Arrays','xmlns:i' => 'http://www.w3.org/2001/XMLSchema-instance'}
);
# create a new element
my $elem1 = SOAP::Data->new(name => 'elem:string', value => 'addedstring');
# try to add the element
push(#{$data->{array}},$elem1);
#.... send, catch, print.. bla bla bla
The code I have runs, and the WCF service see's the array just fine, but the $elem1 value is never actually appended to the SOAP envelope.
Any help is GREATLY appreciated...
Take a look at what $data is using Data::Dumper, you get this
$VAR1 = bless( {
'_attr' => {
'xmlns:i' => 'http://www.w3.org/2001/XMLSchema-instance',
'xmlns:elem' => 'http://schemas.microsoft.com/2003/10/Serialization/Arrays'
},
'_signature' => [],
'_name' => 'array',
'_value' => [
[
bless( {
'_value' => [
'firststring'
],
'_name' => 'string',
'_prefix' => 'elem',
'_signature' => [],
'_attr' => {}
}, 'SOAP::Data' ),
bless( {
'_value' => [
'secondstring'
],
'_name' => 'string',
'_signature' => [],
'_prefix' => 'elem',
'_attr' => {}
}, 'SOAP::Data' ),
bless( {
'_attr' => {},
'_value' => [
'thridstring'
],
'_name' => 'string',
'_signature' => [],
'_prefix' => 'elem'
}, 'SOAP::Data' )
]
]
}, 'SOAP::Data' );
There is no $data->{array}
A look at the documentation for SOAP::Data, says you should use $data->value to access the array you created.
push #{ $data->value }, $elem1;
print Dumper $data->value;
yields
$VAR1 = [
bless( {
'_attr' => {},
'_prefix' => 'elem',
'_value' => [
'firststring'
],
'_name' => 'string',
'_signature' => []
}, 'SOAP::Data' ),
bless( {
'_signature' => [],
'_name' => 'string',
'_value' => [
'secondstring'
],
'_prefix' => 'elem',
'_attr' => {}
}, 'SOAP::Data' ),
bless( {
'_name' => 'string',
'_signature' => [],
'_value' => [
'thridstring'
],
'_prefix' => 'elem',
'_attr' => {}
}, 'SOAP::Data' ),
bless( {
'_attr' => {},
'_prefix' => 'elem',
'_value' => [
'addedstring'
],
'_name' => 'string',
'_signature' => []
}, 'SOAP::Data' )
];
Thanks Gabs00,
push $data->value, $elem1; worked beautifully