HTTP Status code "404" while accessing OAuth token

HTTP Status code "404" while accessing OAuth token

book

Article ID: KB0082051

calendar_today

Updated On:

Products Versions
TIBCO API Exchange -

Description


After starting APIX engine and user tries to hit the URL to request for an access token, APIX engine returns HTTP Status code "404"  "The requested resource is not available." 

Here are the probable causes:
1). When the URL itself has any typo  (for example  http://ASGServerHost:httpPort/asg/oauth/accesstoken/).
2). When the temporary HttpRoot* files are deleted in the server.

Issue/Introduction

HTTP Status code "404" while accessing OAuth token

Environment

All Supported Platforms

Resolution

1). Make sure access token URL does not have any typo:
For example:
Incorrect ==> http://ASGServerHost:httpPort/asg/oauth/accesstoken/
Correct ==>   http://ASGServerHost:httpPort/asg/oauth2/access_token/ 

2). By default ,when starting TIBCO APIX, it creates HTTP temp files (HttpRoot*) in the /tmp directory. The Engine will access these files while processing any HTTP requests. If any clean up job deletes these files or there is not enough diskspace available in the /tmp directory, then the HTTP 404 status is thrown. 

The files created in the default temp directory (/tmp) can be modified to different directories by adding the property java.property.java.io.tmpdir=<tempDir> to the asg-engine.tra file.