Hi Jakob,
The port could be in use by an external (non-ML) process. You could also do xdmp:http-get on the port number. Make sure to use a small timeout though.. ;-) Cheers, Geert *Van:* [email protected] [mailto: [email protected]] *Namens *Jakob Fix *Verzonden:* vrijdag 17 mei 2013 7:17 *Aan:* MarkLogic Developer Discussion *Onderwerp:* Re: [MarkLogic Dev General] how can i check whether an appserver Thanks David, that does the job perfectly. cheers, Jakob. On Fri, May 17, 2013 at 12:59 AM, David Lee <[email protected]> wrote: $port = xdmp:host-status(xdmp:host())//*:port ----------------------------------------------------------------------------- David Lee Lead Engineer MarkLogic Corporation [email protected] Phone: +1 812-482-5224 Cell: +1 812-630-7622 www.marklogic.com *From:* [email protected] [mailto: [email protected]] *On Behalf Of *Jakob Fix *Sent:* Thursday, May 16, 2013 6:56 PM *To:* General Mark Logic Developer Discussion *Subject:* [MarkLogic Dev General] how can i check whether an appserver Hello, if I wanted to script the creation of an xdbc appserver and I don't really care about the port number to use (so let's say I use xdmp:random(65535) + 8003), how can I find out whether that port is already in use by an already existing server? Basically I'm looking for a definition of the local:port-number-in-use($pn) below. *declare function **local:get-port-number*() *as xs:integer* { *let $pn* := *xdmp:random*(65535 + 8003) *return * *if* (*local:port-number-in-use*(*$pn*)) *then **local:get-port-number*() *else $pn* }; cheers, Jakob. _______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
