Trying to set up an ODBC server in Marklogic - getting Port in Use error

Viewed 30

I want to create an ODBC app server that will allow us to establish an ODBC connection to the Documents database of the Marklogic server.

I am running below xquery in the query console -

xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin" at "/MarkLogic/admin.xqy";

let $config  := admin:get-configuration()
let $groupid := admin:group-get-id($config,"Default")
let $dbid    := admin:database-get-id($config,"Documents")
let $config2 := admin:odbc-server-create($config,$groupid,"8002-odbc-documents","/",8002,"file-system",$dbid)
return admin:save-configuration($config2)

And it gives me this in return -

[1.0-ml] ADMIN-PORTINUSE: (err:FOER0000) Port is currently in use Stack Trace In /MarkLogic/admin.xqy on line 19660 In appserver-create-with-config(<configuration/>, xs:unsignedLong("7455364825454068467"), <odbc-server xmlns="http://marklogic.com/xdmp/group"><odbc-server-name>...</odbc-server-name>...</odbc-server>, "odbc")

In appserver-create-with-config(<configuration/>, xs:unsignedLong("7455364825454068467"), <odbc-server xmlns="http://marklogic.com/xdmp/group"><odbc-server-name>...</odbc-server-name>...</odbc-server>, "odbc")

In /MarkLogic/admin.xqy on line 13307

In function() as item()*()

In function() as item()*()`

======

I have tried changing the port to some other, still it gives me the same kind of error.

2 Answers

Not sure what to tell you, other than to first double (and triple) check the ports that you are trying to use and ensure that they aren't already being used by MarkLogic appservers, or even some other service on that host.

I just ran the code you provided above and received the same error response, because I already have an appserver on 8003. I updated it to 8023 and it created the ODBC appserver successfully.

I used the same port number (8002) and received the same error. When I changed the port to the port shown in documentation (5432), it worked. Perhaps 8002 is being used by Marklogic for something else. On our TEST instance it is the Monitoring port.

Related