-
Notifications
You must be signed in to change notification settings - Fork 33
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
JSON decode failed: Syntax error when running initial tasks #14
Comments
@mikeb93: today I pushed some more error handling to the GIT master, could you please check whether that one gives you more information? |
@Thomas-Gelf I'm already using the latest master on both systems. |
I had the same issue, on my Ubuntu system I changed the user to 'www-data' which is the same user as my Apache process is running. On a Redhat system I changed it to 'apache' which is the default that httpd runs as |
Maybe this could be added to the docs as part of the install process: For Debian based systems with Apache: For CentOS/Redhat with httpd: |
Guess there is some room for improvement in the documentation, thanks for the hint. But this didn't solve the original issue for you, did it? |
@mikeb93: your log output does not reflect todays master, I changed many details in 675b7c6 this night |
Committed 20h ago... I installed the module (for the vCenter integration) today at 10am CET. this is the debug log output on the latter from right now using the latest master branch:
I'll pull the master for the vCenter one tomorrow. The DemoLab at work is a major pain in the ass to get to from remote :( |
@mikeb93: looks much better than the former one, this is the latest master. It somehow fails during/after storing QuickStats. Could you please stop the daemon and run the following command (with icingaweb2/apache/httpd privileges):
This will print NetString-encoded JSON-RPC, I guess there some uncaught error string mixed into your output. Thanks, |
Looks like it's looping at the end so I stopped it at some point, but here it is:
|
Don't worry, it's not looping. It works as expected, created an EventCollector in it's SOAP session and polls it every two seconds. The error is in the middle: {
"jsonrpc": "2.0",
"method": "logger.log",
"params": [
"error",
"PDOException in [..]/Pdo/Abstract[..]: There is already an active transaction"
]
} How does your DB resource configuration look like? Did you configure persistent connections? This is weird, as I cannot find a place in the code where this could possibly happen. It also doesn't explain the JSON-decode error, but let's dig into this step by step. We'll fix it, don't worry. |
I'm sure you will ;) I followed your documentation very closely.
from /etc/icingaweb2/modules/vspheredb/config.ini:
|
@mikeb93: what's your PHP version? Any special settings/modules loaded? It would be great if you could share the output of |
Found an empty string that has been sent:
This ( |
php7.2 The other Module I installed freshly this morning, whole machine is actually a fresh install. also php7.2. I attached a file with the output of php -i |
The problem starts before dealing with your DataStores for the very first time, at that point an empty string has been streamed through the NetString wrapper. And when trying to persist the DataStores the "transaction already in process" error pops up - correctly encoded. |
Hm, any idea how to further troubleshoot? |
Sure :-) I found nothing special in your configuration, but I got a better understanding of what happened: a) it works fine, reaches the QuickStats task:
b) Host information has been stored:
c) it proceeds with VMs, is ready to store them - but there is no message reporting successful storage:
d) instead of the expected message, an empty string has been sent over the wire:
This is where I continue my investigation right now, there must have been some error - it it eventually wasn't able to encode the error message. e) it then starts to fetch DataStore information:
f) it fails to persist DataStores, as the former DB transaction is probably still in progress:
And then it breaks. There is concurrency where it shouldn't be, I'll re-check this immediately. Another thing I noticed was that the very first message seems to be wrong. NetString reads
Length does not include leading colon and trailing comma, so this must read 95 and not 97. Very strange. Because if it has been sent like this it should have been rejected immediately after this part. |
@mikeb93: please try again with the current master, eventually we can see the real error right now. |
output with new master:
|
This is the exact same error :-( You're on e206488, correct? |
yep it's the latest. Got your change, pulled and tried again. |
Any chance to provide me direct access to this lab host? Please contact me at thomas@gelf.net if you see a chance to make this possible, it could speed things up. I'm unable to reproduce this problem here. In the meantime I'll fire up a new Ubuntu 18.04 container, seems this is what you're using. Still unsure whether this will help, but I'll figure it out. |
Sure it's my home setup. |
Just for the records, reason for this was negative (!!) Host Memory Usage on a running VM. VM also showed zero uptime, but was running for quite some time. While debugging this we discovered some flaws in our error handling, this has been improved. @mikeb93, thanks for your time! |
@Thomas-Gelf |
Followup: mentioned the User in d147e6c. |
…ga#14) fixed classname Approved-by: Mattia Codato Approved-by: SI Development
Hi,
I've tried to add one vCenter 6.7 and one ESXi Server 6.5 (either on separate icinga2 systems).
I've been running into the error "
JSON decode failed: Syntax error
" both times.vCenter gets Stuck on Task
hostSystems
after the log message:Ready to store HostSystem
I don't see any information on the vCenter or it's Servers / VMs on this installation.
On the other Icinga2 host where I tried adding a single ESXi Server I get stuck on the Task
quickStats
after the log message:Ready to store VirtualMachine
I can See info about the ESXi Server but no VMs appear. Just the Info how many VMs the Host has.
Please let me know how I can help debug this issue further
Thanks in advance :)
Full debug log from icingacli vspheredb daemon run --debug:
The text was updated successfully, but these errors were encountered: