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

Mantis fresh EC2 install not working - ajax.turnkeylinux.org Host Error #547

Closed
luciusf opened this issue Jan 13, 2016 · 11 comments
Closed

Comments

@luciusf
Copy link

luciusf commented Jan 13, 2016

A fresh install of Mantis (v14) as EC2, does not bring up Mantis.
Fails to start with php error message

[Tue Jan 12 16:38:14.029334 2016] [:error] [pid 1162] [client 80.152.176.85:58122] PHP Parse error: syntax error, unexpected '<' in /var/www/mantis/index.php on line 33

row 33 refers to https://ajax.turnkeylinux.org

<script src="https://ajax.turnkeylinux.org/webcp/ec2/14.0-jessie-amd64/mantis.js" async></script>

which itself cannot be reached (cloudflare 520 error)

It works fine if you take the ISO and do a fresh local install (vmware in my case).

*posted yesterday also to the forum

@JedMeister
Copy link
Member

Hi @luciusf, Thanks for your post. We'll need to look into why you are getting that error.

I am fairly sure that the issue is related to our dynamic "fence" page. If I'm right he page that should be being displayed shows how to initialise your instance. Essentially you need to log in via SSH and run the inithooks (as you would have done after reboot when installing from ISO).

PS apologies on delayed response; I was sidetracked on other stuff. The forums was the best place to post this. But it is clear also that you have experienced a bug so the line is a bit blurry really... Anyway I'm going to commandeer this "issue"! 😄

@JedMeister
Copy link
Member

How are you launching this instance to EC2? Is this via the Hub?

I just realised that if you launched via the Hub then you shouldn't see this page anyway?! Using the Hub to launch should allow you to sidestep having to initialise your instance via SSH... Very strange...

@luciusf
Copy link
Author

luciusf commented Jan 13, 2016

Hi @JedMeister, thanks for your response!!

Exactly, I'm launching it via the hub, following the documented standard procedure. So no manual additions or so. I noticed that when adding the port :80 to the IP I can access it normally. After doing that, it would als resolve the IP to the x.tklapp.com page.

... I just wanted to double check, but I guess you already fixed it? Booted the EC2 machine, and It's now working just fine!

@JedMeister
Copy link
Member

Hmm, no I haven't done anything...

So did you just reboot your original instance, or did you destroy the old one and launch a new one?

I'm guessing that this was caused by a race condition (i.e. things not happening in quite the right order so something fails).

@luciusf
Copy link
Author

luciusf commented Jan 14, 2016

I just booted the original instance. I tried that before without success
though.
The only thing which did change is my location. I'm at home now. The error
occurred at work. Will check again tomorrow.

Am Donnerstag, 14. Januar 2016 schrieb Jeremy Davis :

Hmm, no I haven't done anything...

So did you just reboot your original instance, or did you destroy the old
one and launch a new one?

I'm guessing that this was caused by a race condition (i.e. things not
happening in quite the right order so something fails).


Reply to this email directly or view it on GitHub
#547 (comment)
.

Maximilian Lucius Fischer
0175 / 17 12 166
lucius.fischer@gmail.com

@JedMeister
Copy link
Member

Thanks very much 😄

@luciusf
Copy link
Author

luciusf commented Jan 14, 2016

I'm an idiot. There was a manual change I forget to revoke when testing for the cause yesterday. I uncommented those two additional lines at the bottom in /var/www/mantis/index.php.

<script src="https://ajax.turnkeylinux.org/webcp/ec2/14.0-jessie-amd64/mantis.js" async></script>
<script src="https://ajax.turnkeylinux.org/webcp/ec2/14.0-jessie-amd64/mantis.direct" async></script>

So my initial report is still valid. I also tested it "successfully" with another freshly created mantis ec2 instance. Same faulty behaviour again.

edit: to clarify:

  • uncommenting those two lines solved the problem
  • de-uncommenting them again, brings back the same behaviour

@JedMeister
Copy link
Member

Thanks for the update. I'll have to have a closer look when I get a chance...

@luciusf
Copy link
Author

luciusf commented Jan 15, 2016

one more note,
I created a new machine, and the result was the same.
After a while (few hours) the url was still not working, but I added the port

x.tklapp.com:80

With this i reached the mantis installation under the URL I would have expected it.
From that point, the x.tklapp.com also redirected me to mantis without adding the port.
Not sure if this has to do with some local DNS caching. But I tested the URL without the port with another OS, and the x.tklapp.com was working just fine.

@lirazsiri
Copy link
Member

Yikes. This isn't an initialization fence bug, but it is a bug in the inithook package. firstboot.d/29tagid naively assumes it can just tack on html to PHP files.

My bad, I'll fix this and we'll have to rebuild all the apps that may have been affected.

FWIW, the purpose of this code is to allow us to update content on that first page when issues occur without having to rebuild the app.

@lirazsiri
Copy link
Member

I committed a fix to inithooks that should squash this as soon as we refresh the builds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants