Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: configd error #647

Closed
fabianfrz opened this issue Jan 11, 2016 · 28 comments
Closed

Bug: configd error #647

fabianfrz opened this issue Jan 11, 2016 · 28 comments
Assignees
Labels
bug Production bug
Milestone

Comments

@fabianfrz
Copy link
Member

Having this in the log after reboot (i upgraded to the new dev)

configd.py: [1a23f4df-5346-4cfb-b90a-2642847ec32f] Inline action failed at Traceback (most recent call last):
File "/usr/local/opnsense/service/modules/processhandler.py", line 488, in execute return ph_inline_actions.execute(self, inline_act_parameters)
File "/usr/local/opnsense/service/modules/ph_inline_actions.py", line 52, in execute filenames = tmpl.generate(parameters)
File "/usr/local/opnsense/service/modules/template.py", line 300, in generate for filename in self._generate(template_name, create_directory):
File "/usr/local/opnsense/service/modules/template.py", line 248, in _generate content = j2_page.render(cnf_data) File "/usr/local/lib/python2.7/site-packages/jinja2/environment.py", line 989, in render return self.environment.handle_exception(exc_info, True)
File "/usr/local/lib/python2.7/site-packages/jinja2/environment.py", line 754, in handle_exception reraise(exc_type, exc_value, tb)
File "/usr/local/opnsense/service/modules/../template

via: https://forum.opnsense.org/index.php?topic=2016.0

@fichtner
Copy link
Member

Does this repeat or is it a one-time thing?

@fichtner fichtner added the bug Production bug label Jan 11, 2016
@fichtner fichtner added this to the 16.1 milestone Jan 11, 2016
@fabianfrz
Copy link
Member Author

repeats at least after reboot

@fichtner
Copy link
Member

There's probably more context that configd spits out, we recently fixed something similar:

Dec 26 23:32:27 configd.py: [1c5b9cf7-35f6-4141-a696-feb225082ab3] Inline action failed at Traceback (most recent call last):
File "/usr/local/opnsense/service/modules/processhandler.py", line 488, in execute return ph_inline_actions.execute(self, inline_act_parameters)
File "/usr/local/opnsense/service/modules/ph_inline_actions.py", line 52, in execute filenames = tmpl.generate(parameters)
File "/usr/local/opnsense/service/modules/template.py", line 296, in generate for filename in self._generate(template_name, create_directory):
File "/usr/local/opnsense/service/modules/template.py", line 226, in _generate new_filename = filename.replace('[%s]' % target_filter, target_filters[target_filter][key])
TypeError: expected a string or other character buffer object
Dec 26 23:32:27 configd.py: generate template container OPNsense.Captiveportal
Dec 26 23:32:27 configd.py: generate template container OPNsense

See: 51724d2

@fichtner
Copy link
Member

This looks suspicious... /usr/local/opnsense/service/modules/../template

Do you have any custom templates in there?

@fabianfrz
Copy link
Member Author

no - i changed nothing in this directory but the line happens between this lines in the log

Jan 11 14:07:09     configd.py: generate template container OPNsense.Sample

and

Jan 11 14:07:09     kernel: ipfw2 (+ipv6) initialized, divert loadable, nat loadable, default to accept, logging disabled

@fichtner
Copy link
Member

Aha, do you have the os-helloworld plugin installed? Will this error go away when you remove it?

You can increase the amount of characters logged for the traceback here:

script_error_output.strip()[:255])

@fichtner
Copy link
Member

No, it's actually another sample set. It can probably be removed safely, but let's get the full traceback to be sure.

@fabianfrz
Copy link
Member Author

no the plugin os-helloworld is not installed

@fabianfrz
Copy link
Member Author

disabled some daemons - no success
restarted some daemons - no success

@fichtner
Copy link
Member

I'll need the full python traceback :D it's just about those Sample templates I think.

@fichtner
Copy link
Member

(and it can only ever happen on reboot as far as I can see)

@fabianfrz
Copy link
Member Author

how to crate a full traceback as the log does not contain one - it does not even show where the error comes from

@fichtner
Copy link
Member

See my code link for where to increase the syslog dump size above :)

@fabianfrz
Copy link
Member Author

ok found the configd call responsible for the error (can reproduce the error with this command)

configctl template reload "*"

@fabianfrz
Copy link
Member Author

it really has to do with the template OPNsense.Sample

@fichtner
Copy link
Member

So far I already figured, it's only triggered once on bootup, never again. It's supposed to recurse into every template, but something in the Sample package fails. Still need the traceback :D

@fabianfrz
Copy link
Member Author

i increased it to 4096 but I do not get more output...

@fichtner
Copy link
Member

After reboot or manually? If manually, you'd need

# service configd restart

@fabianfrz
Copy link
Member Author

I rebooted the VM

@fichtner
Copy link
Member

Let's leave this for Ad, I don't know how to debug this further without a way to trigger it locally.

@fabianfrz
Copy link
Member Author

I deleted "+TARGETS" and the error was gone ;)

@bsd-source
Copy link
Contributor

Just wanted to add that I get the same error everytime I reboot opnsense. i'm using OPNsense 15.7.23-amd64 installed on an msata disk. I'm not running on a virtual machine. This is stock firmware and no additional packages or addons installed. I'm attaching my entire log right after a reboot.

Complete Bootup Log.txt

@fabianfrz
Copy link
Member Author

@AZDPS I read in your log file that you also have issue #631

@bsd-source
Copy link
Contributor

Just updated to OPNsense 15.7.24-amd64. I'm assuming you're still working on this issue since this bug isn't closed. I'm attaching my System --> Log file output. Has very similar error.

System Log.txt

If you need additional information let me know.

@fichtner
Copy link
Member

@AZDPS I think this has already been pinned down to a benign sample plugin. Will be fixed for 16.1, but it has no ill effects on the running system. :)

@fichtner
Copy link
Member

@AdSchellevis this was fixed in eec35a3 right?

@AdSchellevis
Copy link
Member

@fichtner yes, and the next commit moves the sample out of the way :)

@fichtner
Copy link
Member

Alright, thanks. I'll close and let the forum know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Production bug
Development

No branches or pull requests

4 participants