s.walsh's picture

I just installed one of your Bugzilla AMI's on AWS Marketplace and set all the admin accounts and passwords as per your instructions.    When I try to access the main page at http://<ip address> I get this: 

 

Software error:

Error parsing ./data/params.json: run checksetup.pl to see the details. at Bugzilla/Config.pm line 313.
Compilation failed in require at /var/www/bugzilla/index.cgi line 15.
BEGIN failed--compilation aborted at /var/www/bugzilla/index.cgi line 15.

For help, please send mail to the webmaster (webmaster@localhost), giving this error message and the time and date of the error.

 

How can I fix this?

Thanks

Shawn

Forum: 
Tags: 
Jeremy Davis's picture

That doesn't sound good! :( Thanks so much for posting!

Users have previously reported a similar issue with our older release, but I thought that we'd fixed it in the current release!? FWIW I can't reproduce it with our current v15.1 appliance, so there must be some specific circumstance that I can't reproduce?!

I assume that you are running the latest v15.1 release from here? If not, please test that one. If so, could you also please share the server size and region that you are launching into? If I can recreate the issue, I should be able to fix it.

Other than inadvertently using the older broken appliance, the only other thing that occurs to me is that perhaps some characters you used within your password are incompatible somehow?! Obviously don't post your password here, but could you please let me know if you have used any special characters in the Bugzilla password and if so which ones (just the special characters, not the password)? (E.g. characters such as , #, ", ', etc.).

Also, if you could try logging in via SSH and run the command that it notes, and post back the output would be helpful. I.e.:

cd /var/www/bugzilla/
./checksetup.pl
Seeing as you are running from AWS Marketplace, unless you have enabled the root account, you may need to precede those commands with sudo.
s.walsh's picture

* This is Bugzilla 5.0.4+ on perl 5.24.1
* Running on Linux 4.9.0-8-amd64 #1 SMP Debian 4.9.130-2 (2018-10-27)

Checking perl modules...
Checking for               CGI.pm (v3.51)     ok: found v4.35
Checking for           Digest-SHA (any)       ok: found v5.95_01
Checking for             TimeDate (v2.23)     ok: found v2.24
Checking for             DateTime (v0.75)     ok: found v1.42
Checking for    DateTime-TimeZone (v1.64)     ok: found v2.09
Checking for                  DBI (v1.614)    ok: found v1.636
Checking for     Template-Toolkit (v2.24)     ok: found v2.24
Checking for         Email-Sender (v1.300011) ok: found v1.300030
Checking for           Email-MIME (v1.904)    ok: found v1.937
Checking for                  URI (v1.55)     ok: found v1.71
Checking for       List-MoreUtils (v0.32)     ok: found v0.428
Checking for    Math-Random-ISAAC (v1.0.1)    ok: found v1.003
Checking for              JSON-XS (v2.01)     ok: found v3.03

Checking available perl DBD modules...
Checking for           DBD-Oracle (v1.19)     not found
Checking for               DBD-Pg (v2.7.0)    not found
Checking for           DBD-SQLite (v1.29)     not found
Checking for            DBD-mysql (v4.001)    ok: found v4.041

The following Perl modules are optional:
Checking for                   GD (v1.20)     ok: found v2.53
Checking for                Chart (v2.4.1)    ok: found v2.4.10
Checking for          Template-GD (any)       ok: found v1.56
Checking for           GDTextUtil (any)       ok: found v0.86
Checking for              GDGraph (any)       ok: found v1.48
Checking for           MIME-tools (v5.406)    ok: found v5.508
Checking for          libwww-perl (any)       ok: found v6.15
Checking for             XML-Twig (any)       ok: found v3.50
Checking for          PatchReader (v0.9.6)    ok: found v0.9.6
Checking for            perl-ldap (any)       ok: found v0.65
Checking for          Authen-SASL (any)       ok: found v2.16
Checking for         Net-SMTP-SSL (v1.01)     ok: found v1.04
Checking for           RadiusPerl (any)       ok: found v0.26
Checking for            SOAP-Lite (v0.712)    ok: found v1.20
Checking for          XMLRPC-Lite (v0.712)    ok: found v0.717
Checking for             JSON-RPC (any)       ok: found v1.06
Checking for           Test-Taint (v1.06)     ok: found v1.06
Checking for          HTML-Parser (v3.67)     ok: found v3.72
Checking for        HTML-Scrubber (any)       ok: found v0.15
Checking for               Encode (v2.21)     ok: found v2.80_01
Checking for        Encode-Detect (any)       ok: found v1.01
Checking for          Email-Reply (any)       ok: found v1.204
Checking for HTML-FormatText-WithLinks (v0.13)     ok: found v0.15
Checking for          TheSchwartz (v1.07)     ok: found v1.12
Checking for       Daemon-Generic (any)       not found
Checking for             mod_perl (v1.999022) ok: found v2.000010
Checking for     Apache-SizeLimit (v0.96)     ok: found v0.97
Checking for        File-MimeInfo (any)       ok: found v0.27
Checking for           IO-stringy (any)       ok: found v2.111
Checking for      Cache-Memcached (any)       not found
Checking for  File-Copy-Recursive (any)       ok: found v0.44
Checking for           File-Which (any)       ok: found v1.22
Checking for              mod_env (any)       ok
Checking for          mod_expires (any)       ok
Checking for          mod_headers (any)       ok
Checking for          mod_rewrite (any)       ok
Checking for          mod_version (any)       ok
***********************************************************************
* OPTIONAL MODULES                                                    *
***********************************************************************
* Certain Perl modules are not required by Bugzilla, but by           *
* installing the latest version you gain access to additional         *
* features.                                                           *
*                                                                     *
* The optional modules you do not have installed are listed below,    *
* with the name of the feature they enable. Below that table are the  *
* commands to install each module.                                    *
***********************************************************************
*     MODULE NAME * ENABLES FEATURE(S)                                *
***********************************************************************
*  Daemon-Generic * Mail Queueing                                     *
* Cache-Memcached * Memcached Support                                 *
***********************************************************************
COMMANDS TO INSTALL OPTIONAL MODULES:

 Daemon-Generic: /usr/bin/perl install-module.pl Daemon::Generic
Cache-Memcached: /usr/bin/perl install-module.pl Cache::Memcached


To attempt an automatic install of every required and optional module
with one command, do:

  /usr/bin/perl install-module.pl --all

Reading ./localconfig...

OPTIONAL NOTE: If you want to be able to use the 'difference between two
patches' feature of Bugzilla (which requires the PatchReader Perl module
as well), you should install patchutils from:

    http://cyberelk.net/tim/software/patchutils/

Checking for            DBD-mysql (v4.001)    ok: found v4.041

Error parsing ./data/params.json: garbage after JSON object, at character offset 3541 (before "": "0"\n}") at Bugzilla/Config.pm line 309.
 

Jeremy Davis's picture

It appears that it's choking on incorrect JSON data within "./data/params.json". And it looks uncannily similar to the error noted at the end of the only review that the appliance has. I could never recreate that error either, but hoped that we had resolved it in the newer appliance.

The fact that it appears to still be occurring within the new appliance (and that I could never recreate the original issue) suggests that it is coming from some data that is entered during firstboot initialisation. Looking a bit closer, I can see that the firstboot initialisation is writing to that file. So it seems that under some circumstance, that something incorrect is being written there.

Could you please email support@turnkeylinux.org and attach the params.json file (should be /var/www/bugzilla/data/params.json) plus also share the email address that you are trying to set as the outgoing email. Armed with that info, I should be able to work out what is wrong.

Look forward to hearing from you and getting this resolved for you.

s.walsh's picture

Also, the server specs are :

t2.small

us-west-2a

There are no special characters in the password - just letters and numbers.

Thanks

Jeremy Davis's picture

Thanks for the info, but it seems likely that there is something going wrong with the inital firstboot config. I have just replied above. As noted, it looks like there may be something going wrong when it tries to update the config with your outgoing email address.

As requested above, please post a copy of params.json file (should be /var/www/bugzilla/data/params.json) to support@turnkeylinux.org. You can download and attach it, or copy/paste the contents. Plus (in that same message) also share the email address that you are trying to set as the outgoing email.

Jeremy Davis's picture

FWIW I have now opened a bug on our issue tracker.

Thanks again for reporting this issue and assisting me to understand it better. Hopefully we can quickly squash this bug once and for all!

s.walsh's picture

Hi Jeremy

I just terminated the AWS instance and am looking at a hosted solution for Bugzilla  instead.

Thanks for your assistance though.

Regards

 

Jeremy Davis's picture

I completely understand. Obviously your goal was to get a Bugzilla server running, not assist us to debug ours! :/

Having said that, it is a little unfortunate. I haven't been able to reproduce the issue myself (although I've tried multiple times...). But clearly there is a problem! Demonstrated by yourself and others hitting this issue. I was hoping that with access to the corrupted file from a broken server, plus insight into the email address that you were attempting to use, I may have been able to diagnose the problem and fix it once and for all!

Oh well... If you can recall the "outgoing email address" that you would have likely configured, it'd be great if you could share that with me. To maintain your privacy, it's best to email that to me via jeremy@turnkeylinux.org.

Either way, good luck with all your future endeavours. Thanks again for reporting the issue and thanks too for trying TurnKey. I'm really sorry that it didn't work out for you this time.

Jeremy Davis's picture

Thanks for sending through that info (and sorry I haven't replied directly to that yet).

We have worked out the issue and have an updated appliance queued for upload (hopefully should be up really soon).

Unfortunately, I'm not 100% sure on how to fix a broken appliance. I'll have a closer look at the files you supplied ASAP and clean it up and return a fixed copy of the config file. Please note, that probably won't happen until Monday.

Essentially the issue is caused by our firstboot scripts mangling the config file under certain circumstance. I'm not 100% sure, but I think that the issues occurs when an email address containing less characters that our defaults for either the admin email address, or the outgoing email address (admin@example.com & bugzilla-daemon@www.example.com respectively) is entered.

I can't 100% guarantee this will work as I haven't tested deeply, but I think it should. In the meantime, if you don't want to wait for me to clean your current config file and/or the updated and fixed appliance, then please try the following steps on a new server (i.e. freshly installed/launched):

  • Enter passwords etc into firstboot scripts as usual, stop when you get to the email question(s).
  • When asked for either email address, instead of adding your real email, accept the defaults (should be use admin@example.com & bugzilla-daemon@www.example.com respectively).
  • Once the firstboot scripts are complete, the site should still be working.
  • SSH in and download the fixed inithook:
    FILE=usr/lib/inithooks/bin/bugzilla.py
    URL=https://github.com/turnkeylinux-apps/bugzilla/blob/master/overlay
    wget $URL/$FILE -O /$FILE
    
  • Re-run the init script, this time enter your proper email and desired outgoing "from" address:
    /usr/lib/inithooks/bin/bugzilla.py
    
  • Everything should still be good...!

Hopefully that does the trick. Either way, I'll be in touch directly ASAP (probably Monday).

Jeremy Davis's picture

I have responded directly to you (privately) re your config file. But for the interest of others until we get the updated/fixed appliance released, the issue was literally some junk left at the end of the config file, as suggested by the previously posted error:

Error parsing ./data/params.json: garbage after JSON object, at character offset 3541 (before "": "0"\n}") at Bugzilla/Config.pm line 309.

In Saqib's case, the resolution should be as simple as removing the additional junk after the last valid line of the config file. I.e. replace the last (invalid) part of the params.json file:

"useqacontact": "0"
}: "0"
}

So that it no longer includes the last bit of junk (and is valid JSON). I.e. instead of above, adjust the last few lines so they look like this:

"useqacontact": "0"
}

Other user's params.json file may not look exactly like that, but my guess is that it is quite similar, with some extra junk at the end of the file. FWIW the issue is occurring because we were modifying the existing file rather than reading it, then re-writing it. The reason why I was unable to reproduce it, is that I was using data that was not making it

Add new comment