Controller outputs a json response. On local machine it works fine weather user is logged in or not. But on the server if the use is not logged in to drupal the single page application that fetches unpublished nodes using ajax call gets 503 (Service Unavailable) error. I have done what this link says and set _access: 'TRUE' in the routing.yml file and tried couple of other things but no luck. Any idea what could be the cause?

  • Can you add your code?
    – Jonh
    Commented Jan 7, 2017 at 17:03
  • 1
    503 isn't access denied, it's an error. check your drupal/php/apache error logs.
    – Berdir
    Commented Jan 7, 2017 at 19:28
  • @Berdir, it turned out to be so, because the site was under maintenance! don't know what to say :) :) Commented Jan 14, 2017 at 19:57

1 Answer 1


The problem of no json output was, it turned out, because the site was under maintenance mode! And like Berdir said 503 is not access denied error!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.