Darn – that slash command didn't work (error message: `503_service_error`

twodimensionalmirrorsymmetrica picture twodimensionalmirrorsymmetrica · Jun 6, 2017 · Viewed 7.1k times · Source

I followed this tutorial: https://api.slack.com/tutorials/easy-peasy-slash-commands to create a simple slack app for slash commands.

The application is running on my server under the port 1336, on a VPN. This server (IP included - obviously) cannot be accessed outside of the VPN.

Following said tutorial, the Slack application configuration (on the slack website) requires two things:

  • a Redirect URL for OAuth
  • a Request URL for the slash command

What I have done so far:

  • After launching the slack application, went to the [IP_OF_SERVER]:1336/login and authorised the application for my team.

  • OAuth Redirect URL (set to: [IP_OF_SERVER]:1336/oauth) worked fine.

Bearing in mind the Request URL of the slash command is currently set to: http://[IP_OF_SERVER]:1336/slack/receive

  • Testing the application with a slash command returns Darn – that slash command didn't work (error message: 503_service_error. Manage the command at [name_of_application].

However, if I use localtunnel (as stated in the tutorial), it works absolutely fine...

lt --port 1336 --subdomain myslashcommand

your url is: https://myslashcommand.localtunnel.me

and if I set the above (https://myslashcommand.localtunnel.me) as the Slash Command's Request URL (https://myslashcommand.localtunnel.me/slack/receive) then it works as expected!

The problem is that the firewall continuously blocks the localtunnel.me:[different port number every time] connection and crashes the localtunel command, meaning I cannot use localtunnel for my production application.

It mentions in the tutorial link that:

A common gotcha at this point is having a URL that is not secure: Either it doesn't use HTTPS, or the security of the HTTPS connection can't be verified. If you are using localtunnel as advised above, this shouldn't be an issue. But once you deploy your slash command, you should be certain that your hosting service provides a valid HTTPS connection — but we can worry about this in a later tutorial.

Could this be the cause of my problem? By the looks of things the application is only running via HTTP. How can I fix this issue? Is it something to do with the fact that my server IP is not exposed to the public? Does it need to be? If my OAuth & Login URL's work then does it matter?

Answer

Hunar Letsko picture Hunar Letsko · Jan 9, 2018

It's look like you try to connect private resource. Thus you should open resource or use proxy