Project

General

Profile

Bug #774

Preview doesn't work on Linux

Added by Luke Murphey over 10 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Start date:
08/08/2014
Due date:
% Done:

100%

Associated revisions

Revision 28 (diff)
Added by luke.murphey over 10 years ago

Fixed issue where the modular input base class did not get loaded on
hosts with other apps (such as the Django monitoring app); also allows
empty sourcetypes now. reference #754, #774.

History

#1 Updated by Luke Murphey over 10 years ago

  • Status changed from New to In Progress

#2 Updated by Luke Murphey over 10 years ago

The request could not be completed: Traceback (most recent call last):
File \"<string>\", line 105, in scrape_page
File \"/opt/splunk/etc/apps/website_input/bin/web_input.py\", line 177, in init
Field(\"username\", \"Username\", \"The username to use for authenticating (only HTTP authentication supported)\", none_allowed=True, empty_allowed=True, required_on_create=False, required_on_edit=False),\nTypeError: init() got an unexpected keyword argument 'required_on_create'

#3 Updated by Luke Murphey over 10 years ago

The controller is importing a Field instance that does not have required_on_create. From what I can tell, it is importing the Django apps modular input library.

#4 Updated by Luke Murphey over 10 years ago

The controller isn't importing its own version of the modular input library but the Django app version of it

#5 Updated by Luke Murphey over 10 years ago

The request could not be completed: Traceback (most recent call last):\n File \"<string>\", line 105, in scrape_page\n File \"/opt/splunk/etc/apps/website_input/bin/web_input.py\", line 183, in init\n Field(\"username\", \"Username\", \"The username to use for authenticating (only HTTP authentication supported)\", none_allowed=True, empty_allowed=True, required_on_create=False, required_on_edit=False),\nTypeError: init() got an unexpected keyword argument 'required_on_create'\n", "time": "2014-08-08T17:38:55", "type": "ERROR"}], "total": 0}

#7 Updated by Luke Murphey over 10 years ago

The issue is that each of the apps updates sys.path to import libraries. Multiple on the file-system can cause collisions when running in SplunkWeb since they inevitably wind up changing each other's sys.path. In this case, website_input got django_monitoring's sys.path updates and imported its modular input class.

I fixed this by putting the sub-class in a sub-directory titled after the app name and then using it as a module to be imported. This worked.

#8 Updated by Luke Murphey over 10 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF