mirror of
https://github.com/RD17/ambar.git
synced 2026-04-25 15:35:49 +03:00
[GH-ISSUE #57] Bug: Fresh install, going to server IP redirects me to "https://frontend" #57
Labels
No labels
$$ Paid Support
bug
bug
enhancement
help wanted
invalid
pull-request
question
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ambar#57
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @hbh7 on GitHub (Aug 5, 2017).
Original GitHub issue: https://github.com/RD17/ambar/issues/57
Hey all. I tried to freshly install this using the directions and the ambar.py script. Running Ubuntu Server 17.04. Initially it said ambar running on http://:80 but putting in the IP into the config under fe and host gets it to say http://i.p.i.p:80 but still no change.
Anyone have any ideas what I might be doing wrong? I can provide any more info needed.
Thanks,
hbh7
@hbh7 commented on GitHub (Aug 6, 2017):
Just set up a brand new Ubuntu 16.04 VM, and it did the exact same thing. "Ambar is running on http://10.20.31.108:80" but if i go to that IP, it brings me right to "https://frontend"
https://blog.ambar.cloud/ambar-installation-step-by-step-guide-2/ These are the directions I followed btw
@sochix commented on GitHub (Aug 7, 2017):
@hbh7 can you post your
config.jsonhere?@hbh7 commented on GitHub (Aug 7, 2017):
@hbh7 commented on GitHub (Aug 14, 2017):
Anyone have any ideas? Would really love to get this working. Thanks
@isido993 commented on GitHub (Aug 15, 2017):
Hi @hbh7
Please run:
sudo docker exec -i -t ambar_proxy_1 /bin/bashcat /etc/nginx/conf.d/default.confand post the result here.
Thanks.
@hbh7 commented on GitHub (Aug 15, 2017):
@isido993 commented on GitHub (Aug 15, 2017):
@hbh7 this seems ok. Let's go further, please also post your docker-compose.yml file.
@hbh7 commented on GitHub (Aug 15, 2017):
Sure
@isido993 commented on GitHub (Aug 15, 2017):
Ok, now:
wget -O ambar.py https://static.ambar.cloud/ambar.py && chmod +x ./ambar.pysudo ./ambar.py updateAnd
cat docker-compose.ymlagainThnx
@hbh7 commented on GitHub (Aug 15, 2017):
Sure.
Not sure if this is relevant or not, but saw this and thought it odd. This is an excerpt from the script running the update.
And here's the docker compose file after startup finished.
@isido993 commented on GitHub (Aug 15, 2017):
@hbh7 thnaks, but you posted not the entire
docker-compose.yml, please repost the missing part.Also please
sudo docker ps -aand post the result.@hbh7 commented on GitHub (Aug 15, 2017):
My apologies, I'm on a phone on my way to work so it's a bit difficult lol
Here's the docker command
@isido993 commented on GitHub (Aug 15, 2017):
@hbh7
Looks like your management script isn't working properly.
Try
sudo pyton3 ./ambar.py update@hbh7 commented on GitHub (Aug 15, 2017):
Good catch, I think Ubuntu defaults their python command to python2. Sadly, no change. Should I spin up a fresh VM to test?
@isido993 commented on GitHub (Aug 15, 2017):
The thing is that your
docker-compose.ymlis malformed, see- api=http://:80line infrontendblock.It's formed by
ambar.pyscript, by this line:composeTemplate = composeTemplate.replace('${API_EXT_HOST}', configuration['api']['external']['host'])So,
${API_EXT_HOST}was replaced by an empty string, instead of10.20.31.103.I'm running out of ideas now.. To me it looks like python is interpreting the script with some strange errors.
Maybe spinning up a fresh VM is an option.
@hbh7 commented on GitHub (Aug 15, 2017):
Makes sense to me.
I'll fire up a new VM now, and set up an alias for python to python3. I'll let you know how it goes in maybe a half hour. Thanks!
@hbh7 commented on GitHub (Aug 15, 2017):
No change, but I did some digging. config.json has a host option under "fe" that was unset, so I added the IP in. Sadly that didn't help. (new VM IP is 10.20.31.119 btw)
I changed the line
composeTemplate = composeTemplate.replace('${API_EXT_HOST}', configuration['fe']['external']['host'])in the config to say
composeTemplate = composeTemplate.replace('${API_EXT_HOST}', "10.20.31.119")instead.
This fixes the
- api=http://:80to- api=http://10.20.31.119:80bit in the frontend block. However, no change in the issue. I think this could also be solved by setting that in the config.json file, because it's also unset. Is there a time when this config.json file is populated with values such as this?Edit: I just wiped the python file and redownloaded it and set the config, and this does populate that value correctly now in the docker-compose.yml file.
In Chome, I can see the server is responding with a 301 Moved Permanently... Maybe this is an nginx config issue?
Are there any programs I need that I might not have? The install guide doesn't list any special requirements.
@hbh7 commented on GitHub (Aug 17, 2017):
If I enter the frontend docker container, and install wget and
wget localhost, i get a HTML file for the loading page. This makes me think it's definitely a proxy issue. Thoughts?@isido993 commented on GitHub (Aug 18, 2017):
@hbh7
Now it should work properly. Maybe it's just your browser caching previous 301 response. Try clearing your browser's cache.
@hbh7 commented on GitHub (Aug 18, 2017):
I thought the same thing. That's why I've tested with multiple browsers... I'll double check again in a bit.
@hbh7 commented on GitHub (Aug 22, 2017):
Actually we made some progress. I'll be honest, I don't know what I did at this point lol, but now we're here.
http://i.imgur.com/eD4gJ32.png
Here's the config.json: https://pastebin.com/ypHeezeq
and the docker-compose.yml: https://pastebin.com/TXDxbxDB
Funny story though... This is after a fresh reboot of the VM. Once I did a
sudo ./ambar.py restart, we're back to being redirected tohttps://frontend... how bizarreThis is repeatable btw, just rebooted again and we're back to first screenshot.
@hbh7 commented on GitHub (Aug 31, 2017):
Just tried on physical hardware, freshly downloaded Ubuntu Server 17.04 on a laptop and tried the ambar installer. Sadly I've got the same issue still.... So not a VM issue.
Any thoughts? Thanks
@sochix commented on GitHub (Sep 5, 2017):
@hbh7 We're out of ideas. Let's schedule a skype call to dig in. You're need a working screen sharing connection to your virtual server to start.
@hbh7 commented on GitHub (Sep 5, 2017):
Sure. When do you have time? I should be free tomorrow from about 1-4 EST, or some time this Sunday.
@sochix commented on GitHub (Sep 6, 2017):
let's discuss it by email. Write to us at hello@ambar.cloud
@imperian commented on GitHub (Oct 1, 2017):
I had this problem as well, but managed to resolve it by removing the "proxy" from the "depends_on" section of "webapi" and adding "frontend" to the "depends_on" section of "proxy" in the docker-compose.yml.
The problem was that proxy was being created before frontend so proxy's hosts file didn't have a "frontend" entry. This shouldn't matter for newer versions of docker with docker's network, but I don't think they have the bugs worked out because it doesn't always work right.
@sochix commented on GitHub (Oct 30, 2017):
Thanks @imperian !