IWS stopped working?

Posted on
Wed Oct 25, 2017 12:05 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

IWS stopped working?

Not sure where to put this. Matt/Jay please move as necessary.

My IWS plugin stopped working. Now when the remote server tries to do a GET to my plugin I get this error:

Code: Select all
   WebServer                       undefined page requested "http://flyingdiver.goprism.com/twilio/ping" from 34.229.219.100


That URL is correct, it hasn't changed. The IWS setup is right, I think. See attached screen shot. And here's the actual code:

Code: Select all
####################
import cherrypy
from indigopy.basereqhandler import BaseRequestHandler

####################
def PluginName():
   return u"Twilio Ping"

def PluginDescription():
   return u"This is the Twilio Ping Plugin."

def ShowOnControlPageList():
   return False      # if True, then above name/description is shown on the Control Page list index
   
####################
class TwilioRequestHandler(BaseRequestHandler):

   def __init__(self, logFunc, debugLogFunc):
      BaseRequestHandler.__init__(self, logFunc, debugLogFunc)

    def index(self, name=None):
        logmessage = "Twilio Ping usage: http://host:port/twilio/ping\n\n"
        self._Log(logmessage)
        cherrypy.response.headers['Content-Type'] = 'text/plain'
        return logmessage
    index.exposed = True

   def ping(self, **params):
      cherrypy.server.indigoDb.VariableSetValue(cherrypy.server.indigoConn, "twilio_ping", "true")
        cherrypy.response.headers['Content-Type'] = 'text/plain'
        return "Twilio Ping Ack"
   ping.exposed = True


Any ideas?
Attachments
Screen Shot 2017-10-25 at 2.03.02 PM.png
Screen Shot 2017-10-25 at 2.03.02 PM.png (196.2 KiB) Viewed 2235 times

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Wed Oct 25, 2017 12:12 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: IWS stopped working?

Stop and restart the Indigo Server. Any relevant lines logged from the Indigo WebServer?

Image

Posted on
Wed Oct 25, 2017 12:23 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: IWS stopped working?

Not that I can see:

Code: Select all
   WebServer                       started on port 8176 -- digest authentication enabled


   WebServer                       undefined page requested "http://flyingdiver.goprism.com/twilio/ping" from 54.226.132.114


Should there be something in there registering the IWS plugin?

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Wed Oct 25, 2017 12:29 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: IWS stopped working?

It should log if there is an error loading the plugin.

Is your other plugin (variable_url_redirect) working?

Image

Posted on
Wed Oct 25, 2017 12:57 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: IWS stopped working?

Hmm. Yes. At least, I get the usage message if I request the index page. Which doesn't work on the other plugin.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Wed Oct 25, 2017 1:10 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: IWS stopped working?

It started working again.

I edited the reqhandler.py file and made sure there weren't any weird characters or tabs in it. Deleted the .pyc files, and restarted the server a couple times. Damifino.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Wed Oct 25, 2017 1:15 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: IWS stopped working?

What you saw might have happened had the indents not been perfect on this line I think:

ping.exposed = True

One of my least favorite things about Python.

Image

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest