Project

General

Profile

Bug #5068

Cannot open Rule details when a Group contains a quote in its name

Added by Daniel Stan over 5 years ago. Updated over 5 years ago.

Status:
Released
Priority:
1
Category:
Web - Config management
Target version:
Severity:
User visibility:
Effort required:
Priority:

Description

Hey

After upgrading sever from 2.9.4 to 2.10.2 I can't access any rule. If I go to Configuration policy->rules and click on any rule i receive this error:

"The server cannot be contacted at this time"
I receive the same error when I create a new rule, but it seems that rule gets created.

I checked all the logs but I can't see any error. I tried to restart services but without success.

Can you please give some hints on how to fix this ?


Files

Capture.PNG (116 KB) Capture.PNG Daniel Stan, 2014-06-19 12:00
console.PNG (47.1 KB) console.PNG Daniel Stan, 2014-06-20 11:49

Related issues

Related to Rudder - Bug #5111: On reports (Rule,Node) pages, a warning is displayed in javascript consoleReleased2014-06-23Actions

Associated revisions

Revision eef395ef (diff)
Added by Nicolas CHARLES over 5 years ago

Fixes #5068: correct escaping of Group name in Rule display

Revision 7a09121c (diff)
Added by Nicolas CHARLES over 5 years ago

Fixes #5068: correct escaping of Group name in Rule display

Revision 46b7b285
Added by Vincent MEMBRÉ over 5 years ago

Merge pull request #559 from ncharles/bug_5068/dev/escape_group_name

Fixes #5068: correct escaping of Group name in Rule display

Revision 18908d9b
Added by Vincent MEMBRÉ over 5 years ago

Merge pull request #559 from ncharles/bug_5068/dev/escape_group_name

Fixes #5068: correct escaping of Group name in Rule display

History

#1

Updated by Nicolas CHARLES over 5 years ago

  • Status changed from New to Discussion
  • Assignee set to Daniel Stan

Hi Daniel,

Sorry for this issue.
We changed a lot this page, especially on the Javascript side. Did you try to shift+f5 (or whatever solution your browser is offering as a solution to completely reload all Javascript)

If it doesn't solves your issue, could you restart the web interface with debug mode (editing the file /opt/rudder/etc/logback.xml, and replace <root level="info"> by <root level="debug">), restart the web interface, reproduce the error and send us the logs ?

Thank you !

#2

Updated by Daniel Stan over 5 years ago

Hey Nicolas

I tried in different browsers and on different computers and with the same result. Enabling the log doesn't seem to give any extra hints . The only thing i see in /var/log/rudder/webapp/2014_06_18.stderrout.log are:


[2014-06-18 16:16:59] DEBUG com.normation.rudder.batch.AbstractScheduler$StatusManager - [Store Agent Run Times] Scheduled task starting
[2014-06-18 16:16:59] DEBUG com.normation.rudder.reports.execution.ReportsExecutionService - [Store Agent Run Times] Task #32: Starting analysis for run times from 2014/06/18 16:16:54 up to 2014/06/18 16:16:59 (runs after SQL table ID 459030520)
[2014-06-18 16:16:59] DEBUG com.normation.rudder.reports.execution.ReportsExecutionService - There are no nodes executions to store
[2014-06-18 16:16:59] DEBUG com.normation.rudder.reports.execution.ReportsExecutionService - [Store Agent Run Times] Task #32: Finished analysis in 4 ms. Added or updated 0 agent runs (up to SQL table ID 459030520)
[2014-06-18 16:16:59] DEBUG com.normation.rudder.batch.AbstractScheduler$StatusManager - [Store Agent Run Times] Scheduled task finished in 7 ms (started at 2014/06/18 16:16:59, finished at 2014/06/18 16:16:59)
[2014-06-18 16:17:04] DEBUG com.normation.rudder.batch.AbstractScheduler$StatusManager - [Store Agent Run Times] Scheduled task starting
[2014-06-18 16:17:04] DEBUG com.normation.rudder.reports.execution.ReportsExecutionService - [Store Agent Run Times] Task #33: Starting analysis for run times from 2014/06/18 16:16:59 up to 2014/06/18 16:17:04 (runs after SQL table ID 459030520)
[2014-06-18 16:17:04] DEBUG com.normation.rudder.reports.execution.ReportsExecutionService - There are no nodes executions to store
[2014-06-18 16:17:04] DEBUG com.normation.rudder.reports.execution.ReportsExecutionService - [Store Agent Run Times] Task #33: Finished analysis in 9 ms. Added or updated 0 agent runs (up to SQL table ID 459030520)
[2014-06-18 16:17:04] DEBUG com.normation.rudder.batch.AbstractScheduler$StatusManager - [Store Agent Run Times] Scheduled task finished in 13 ms (started at 2014/06/18 16:17:04, finished at 2014/06/18 16:17:04)

Do you need me to look into another file or should i enable extra logging like <logger name="comet_trace" level="info" /> ?

#3

Updated by Nicolas CHARLES over 5 years ago

Did you have any issues during upgrade from 2.9 to 2.10 ?

Could it be possible for you to send us a screen snapshot of the Rule page ?

#4

Updated by Nicolas CHARLES over 5 years ago

I have some more question for you:
  • is the error message instantaneous, or is it after a while (like it timeouts)
  • do you have the same issue on the Node/Reports screen ?
  • is you server loaded ?
  • do you have error messages in the postgresql log ?

I'm sorry for the amount of questions, but I'm trying to figure out what is going on

You used ot have a strange error because of Virtuozzo/Postgrsql ( http://www.rudder-project.org/redmine/issues/4115#change-22255 )
Maybe it is related ?

#5

Updated by Daniel Stan over 5 years ago

Nicolas CHARLES wrote:

Did you have any issues during upgrade from 2.9 to 2.10 ?

The only problem i remember was that after i upgraded the packages and tried to access the interface i was still seeing the old 2.9 interface . I had a few clicks around until I realised that nothing has changed. After I restarted jetty the new interface appeared.
Checking the logs around the update time i see a few warnings and these errors:

2014-06-18 10:14:41.576:INFO::Extract jar:file:/opt/rudder/jetty7/webapps/rudder.war!/ to /tmp/jetty-127.0.0.1-8080-rudder.war-_rudder-any-/webapp
[2014-06-18 10:14:41] ERROR net.liftweb.actor.ActorLogger - Actor threw an exception
net.liftweb.actor.PingerException: com.normation.rudder.batch.StartAutomaticReporting$@90d705a could not be scheduled on com.normation.rudder.batch.AutomaticReportLogger$LAAutomaticReportLogger@514b295a
        at net.liftweb.actor.LAPinger$.schedule(LAPinger.scala:72) ~[lift-actor_2.10-2.5.1.jar:2.5.1]
Caused by: java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@6d7e4794 rejected from java.util.concurrent.ScheduledThreadPoolExecutor@7d8d7db4[Shutting down, pool size = 1, active threads = 0, queued tasks = 5, completed tasks = 20064]
        at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2048) ~[na:1.7.0_51]
[2014-06-18 10:14:42] ERROR net.liftweb.actor.ActorLogger - Actor threw an exception
net.liftweb.actor.PingerException: StartUpdate could not be scheduled on com.normation.rudder.batch.AbstractScheduler$StatusManager@70e4c4d2
        at net.liftweb.actor.LAPinger$.schedule(LAPinger.scala:72) ~[lift-actor_2.10-2.5.1.jar:2.5.1]
Caused by: java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@197b5857 rejected from java.util.concurrent.ScheduledThreadPoolExecutor@7d8d7db4[Shutting down, pool size = 1, active threads = 0, queued tasks = 4, completed tasks = 20065]
        at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2048) ~[na:1.7.0_51]
Use configuration file defined by JVM property -Dlogback.configurationFile : /opt/rudder/etc/logback.xml

[2014-06-18 10:14:59] ERROR com.normation.cfclerk.services.impl.GitTechniqueReader - Error when processing technique '/system/common/1.0/metadata.xml'
java.util.NoSuchElementException: key not found: MANAGED_NODES_ADMIN
        at scala.collection.MapLike$class.default(MapLike.scala:228) ~[scala-library-2.10.3.jar:na]
[2014-06-18 10:14:59] ERROR bootstrap.liftweb.checks.CheckTechniqueLibraryReload - Flag file '/opt/rudder/etc/force_technique_reload' but Techniques library reload failed, cause is: An error occured while updating <- Error when trying to read technique library
[2014-06-18 10:14:59] INFO  application - Application Rudder started
[2014-06-18 10:15:02] ERROR net.liftweb.actor.ActorLogger - Actor threw an exception
net.liftweb.actor.PingerException: CheckLaunch could not be scheduled on LADatabaseCleaner(ArchiveAction(com.normation.rudder.services.system.DatabaseManagerImpl@6c71a096,AutomaticReportsCleaning(com.normation.rudder.services.system.DatabaseManagerImpl@6c71a096,20,10,Every day at 00:30)),10)

Could it be possible for you to send us a screen snapshot of the Rule page ?

See the attached

I have some more question for you:
  • is the error message instantaneous, or is it after a while (like it timeouts)

It is after a while(2-3 seconds after click). It looks like a timeout.

  • do you have the same issue on the Node/Reports screen ?

No. I saw similar issues before and they were related to firewall or postgres, but now even with firewall off I have the same problem.

  • is you server loaded ?

No. The load is very light.

  • do you have error messages in the postgresql log ?

No

I'm sorry for the amount of questions, but I'm trying to figure out what is going on

No problem, you can ask for any information needed.

You used ot have a strange error because of Virtuozzo/Postgrsql ( http://www.rudder-project.org/redmine/issues/4115#change-22255 )
Maybe it is related ?

That problem was solved with a VPS restart. I think postgres didn't properly detect the memory change or something went wrong when the resources were changed but the reboot fixed it .

#6

Updated by Nicolas CHARLES over 5 years ago

Thank you for your answer Daniel

2 or 3 secondes are a bit too short for a real timeout (we have 30 sec timeout in the Web Interface); but it sounds like a Javascript error
Could you try again, with Firebug installed and activated, by selecting the tab "Console" and then track "All", click on the Rules, and see what are the requests, and their results ?
I have one POST when I do that.
If you don't see any error, could it be possible for you to send the "Response" tag (maybe privately if you have sensitive info in it ?)

#7

Updated by Daniel Stan over 5 years ago

I attached the screen shot with the errors from the console. Please let me know if you need the response headers too

#8

Updated by Nicolas CHARLES over 5 years ago

  • Status changed from Discussion to 13
  • Assignee changed from Daniel Stan to Nicolas CHARLES

Thank you for detailed bug report.
I may have found the culprit (wrong naming convention) based on the messages displayed, but I'm really surprised that it causes a problem for you, and not for anyone else, so maybe this may be unrelated.
I'm making a fix for the error "variable i redeclares argument"

#9

Updated by Nicolas CHARLES over 5 years ago

  • Status changed from 13 to Discussion
  • Assignee changed from Nicolas CHARLES to Daniel Stan

ok, the issue was in 2.6, so it's very likely to be unrelated; i'm fixing it thought, in a related ticket

I will need the response from the POST to understand the issue

#10

Updated by Daniel Stan over 5 years ago

Hey

I sent you an email with the response I receive after clicking on a random rule.

The errors I sent earlier are just from clicking on a random rule. If I load the rule section I receive a long list of warnings so if you want that one I can send it too.

#11

Updated by Nicolas CHARLES over 5 years ago

  • Tracker changed from User story to Bug
  • Subject changed from "The server cannot be contacted at this time" in Configuration policy -> rules to "The server cannot be contacted at this time" in Configuration policy -> rules when a Group contain a quote in its name
  • Status changed from Discussion to In progress
  • Assignee changed from Daniel Stan to Nicolas CHARLES
  • Priority changed from N/A to 1

The issue have been nailed down.
When we have groups with single quote in them, the Rules fail to show because of improper JS escaping

#12

Updated by Nicolas CHARLES over 5 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Nicolas CHARLES to Vincent MEMBRÉ
  • Pull Request set to https://github.com/Normation/rudder/pull/559
#13

Updated by Daniel Stan over 5 years ago

Hey

Sorry for the delay in getting back to you . It seems that after i removed the "'" from groups name the error is gone and I can access the rules. I think the problem is fixed now. Thank you for your assistance with this.

#14

Updated by Nicolas CHARLES over 5 years ago

  • Status changed from Pending technical review to Pending release
  • % Done changed from 0 to 100
#16

Updated by Vincent MEMBRÉ over 5 years ago

  • Subject changed from "The server cannot be contacted at this time" in Configuration policy -> rules when a Group contain a quote in its name to Cannot open Rule details when a Group as a quote in its name
#17

Updated by Vincent MEMBRÉ over 5 years ago

  • Subject changed from Cannot open Rule details when a Group as a quote in its name to Cannot open Rule details when a Group contains a quote in its name
#18

Updated by Vincent MEMBRÉ over 5 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 2.10.3 (announcement , changelog) and 2.11.0~beta2 (announcement , changelog), which were released today.

Also available in: Atom PDF