Kodi Community Forum

Full Version: The path '/xbmcCmds/xbmcHttp' was not found.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm trying to use the XBMC webapi as documented on http://www.xbmc.org/wiki/?title=WebServe...s_Commands.

The issue I run in that the xbmcCmds commands does not seem to be availible.

I enabled the webserver under the server settings and set the port to 8080. Default user is still xbmc with no password. What could be wrong? I'm using XBMC Live 9.04

Code:
xbmc@XBMCLive:~$ curl "http://localhost:8080/xbmcCmds/xbmcHttp?command=Action(199)"
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
    <title>404 Not Found</title>
    <style type="text/css">
    #powered_by {
        margin-top: 20px;
        border-top: 2px solid black;
        font-style: italic;
    }

    #traceback {
        color: red;
    }
    </style>
</head>
    <body>
        <h2>404 Not Found</h2>
        <p>The path '/xbmcCmds/xbmcHttp' was not found.</p>
        <pre id="traceback">Page handler: "The path '/xbmcCmds/xbmcHttp' was not found."
Traceback (most recent call last):
  File "/var/lib/python-support/python2.5/cherrypy/_cphttptools.py", line 121, in _run
    self.main()
  File "/var/lib/python-support/python2.5/cherrypy/_cphttptools.py", line 256, in main
    page_handler, object_path, virtual_path = self.mapPathToObject(path)
  File "/var/lib/python-support/python2.5/cherrypy/_cphttptools.py", line 326, in mapPathToObject
    raise cherrypy.NotFound(objectpath)
NotFound: 404
</pre>
    <div id="powered_by">
    <span>Powered by <a href="http://www.cherrypy.org">CherryPy 2.3.0</a></span>
    </div>
    </body>
</html>
An update:

I looked into the xbmc.log file and discovered that the actual webport is 8081:

Code:
09:40:59 T:3049306000 M:1369382912  NOTICE: Webserver: Starting...
09:40:59 T:3049306000 M:1369382912   DEBUG: xbmcHttpShim starts
09:40:59 T:2978978704 M:1369382912   DEBUG: Running thread 2978978704
09:40:59 T:2978978704 M:1369382912   DEBUG: thread start, auto delete: 0
09:40:59 T:2978978704 M:1369382912    INFO: WebServer: Server starting using /usr/share/xbmc/web on 192.168.0.37:8080
09:40:59 T:2978978704 M:1369382912   DEBUG: DB: Registering database table <users>
09:40:59 T:2978978704 M:1369382912   DEBUG: DB: Registering database table <groups>
09:40:59 T:2978978704 M:1369382912   DEBUG: DB: Registering database table <access>
09:40:59 T:2978978704 M:1369382912   DEBUG: UM: Loading User Configuration from file <umconfig.txt>
09:40:59 T:2978978704 M:1369382912   DEBUG: DB: About to read data file </usr/share/xbmc/web/umconfig.txt>
09:40:59 T:2978978704 M:1369382912   DEBUG: DB: Failed to stat persistent data file.
09:40:59 T:2978978704 M:1369382912   DEBUG: webs: Listening for HTTP requests at address 192.168.0.37:8081
09:40:59 T:2978978704 M:1369382912  NOTICE: Webserver: Started
09:40:59 T:3049306000 M:1369382912   DEBUG: UM: Writing User Configuration to file <umconfig.txt>
09:40:59 T:3049306000 M:1369382912   DEBUG: DB: About to save database to file
09:40:59 T:3049306000 M:1369382912   DEBUG: WARNING: Failed to open file /usr/share/xbmc/web/data.tmp
09:40:59 T:3049306000 M:1369382912   DEBUG: CZeroconfAvahi::doPublishService identifier: servers.webserver type: _http._tcp name:XBMC Web Server port:8080
09:40:59 T:3049306000 M:1369382912   DEBUG: CZeroconfAvahi::doPublishService: client not running, queued for publishing
09:40:59 T:3049306000 M:1369382912   DEBUG: CZeroconfAvahi::doPublishService identifier: servers.webapi type: _xbmc-web._tcp name:XBMC HTTP API port:8080
09:40:59 T:3049306000 M:1369382912   DEBUG: CZeroconfAvahi::doPublishService: client not running, queued for publishing
09:40:59 T:3049306000 M:1369382912   DEBUG: UM: Writing User Configuration to file <umconfig.txt>
09:40:59 T:3049306000 M:1369382912   DEBUG: DB: About to save database to file
09:40:59 T:3049306000 M:1369382912   DEBUG: WARNING: Failed to open file /usr/share/xbmc/web/data.tmp

See:

Code:
curl "http://localhost:8081/xbmcCmds/xbmcHttp?command=Action(199)"
<html>
<li>OK</html>

Is this normal behavior?