2

I am using Ubuntu 14.04 server, have MaaS as Juju environment. I was having some issues which my bootstrapped node couldn't access the charm store, so I installed the squid proxy server.

Here's what I did:

enter image description here

Default

enter image description here

Commented

enter image description here

enter image description here

Commented the http_access deny_all

Added http_access allow network

Added http_acces allow all

enter image description here

Added acl network src 172.16.1.0/24

enter image description here

Juju status

enter image description here

enter image description here

The ~/.juju/environments.yaml file:

enter image description here

juju debug-log --replay :

enter image description here

I don't know why is not working, even the charms WordPress and MySQL are still allocating...

Any tips? Thanks in advance

EDITED

On the MaaS Server:

route -n

enter image description here

tracepath google.com

enter image description here

Now juju ssh 0:

route -n

enter image description here

tracepath google.com

enter image description here

curl -v google.com

enter image description here

Information about my setup on MaaS Server:

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

I re-bootstrapped my MaaS environment, deployed mysql+wordpress+relation and deployed juju gui, and this is my actual status, but my wordpress node can't seem to do: add-apt-repository ppa:charmers/charm-helpers despite having installed it on my server

enter image description here

enter image description here

enter image description here

Testing add-apt-repository ppa:charmers/charm-helpers on my MaaS server:

enter image description here

Testing add-apt-repository ppa:charmers/charm-helpers on the wordpress node ( hook failed install ):

enter image description here

EDITED

route -n

enter image description here

curl www.google.com

enter image description here

sudo apt-get install --reinstall ca-certificates

enter image description here

juju resolved --retry wordpress/0

juju resolved --retry phpmyadmin/0

juju debug-log --replay

wordpress:

enter image description here

phpmyadmin:

enter image description here

enter image description here

EDITED

enter image description here

juju ssh 2

su

cd /var/log/juju

export http_proxy=http://root:redeslinux@172.16.1.160:3128/

export https_proxy=http://root:redeslinux@172.16.1.160:3128/

cat unit-wordpress-0.log

enter image description here

enter image description here

plus apt-get update

and did too:

sudo visudo

Added Defaults env_keep="https_proxy" to the end of the file.

But when I go to my MaaS server where juju is installed:

juju resolved --retry wordpress/0

enter image description here

and so I went again to the node where wordpress is installed to check why is not working:

juju ssh 2

su

enter image description here

It works if I add export http_proxy=http://root:redeslinux@172.16.1.160:3128/ but when I close the wordpress node PuTTY, and open the MaaS server PuTTY and do juju resolved --retry wordpress/0 gives hook failed install.

What to do, to make export http_proxy=http://root:redeslinux@172.16.1.160:3128/ permanent in the wordpress node or similiar?

EDITED

enter image description here

The bootstrapped node show some messages:

enter image description here

juju debug-log --replay

machine-0: 2015-05-11 20:13:30 ERROR juju.worker.firewaller firewaller.go:435 failed to lookup "machine-0", skipping port change machine-0: 2015-05-11 20:13:30 ERROR juju.worker runner.go:219 exited "firewaller": gomaasapi: got error back from server: 401 OK (Expired timestamp: given 1431375210 and now 1431382411 has a greater difference than threshold 300) machine-0: 2015-05-11 20:13:31 ERROR juju.provisioner provisioner.go:204 environ provisioner died: failed to process updated machines: failed to get all instances from broker: gomaasapi: got error back from server: 401 OK (Expired timestamp: given 1431375211 and now 1431382412 has a greater difference than threshold 300) machine-0: 2015-05-11 20:13:31 ERROR juju.worker runner.go:219 exited "environ-provisioner": failed to process updated machines: failed to get all instances from broker: gomaasapi: got error back from server: 401 OK (Expired timestamp: given 1431375211 and now 1431382412 has a greater difference than threshold 300) machine-0: 2015-05-11 20:13:33 ERROR juju.worker runner.go:219 exited "firewaller": gomaasapi: got error back from server: 401 OK (Expired timestamp: given 1431375213 and now 1431382414 has a greater difference than threshold 300)

How to fix this?

Mario
  • 187
  • 1
  • 12

2 Answers2

2

I assume by charm store you are referring to the website? I'm almost sure that Squid is overkill.

I see that machine 0 uses your proxy successfully. I can also see that the default route of machine 0 is 172.16.1.1, but the default route of the MAAS host is 172.16.1.2. It is set up incorrectly in the MAAS web interface, as you show in your screenshot. Change the "Router" configuration in the MAAS DHCP website to 172.16.1.2, and re-try

noleti
  • 4,053
  • 27
  • 25
  • I think not. How do I configure that? – Mario Apr 26 '15 at 15:27
  • 1
    @Mario You should not have to set up a squid server, it should work magically. So something else must be configured incorrectly in your setup. My first guess was that you use some proxy settings on the host that are re-used for the new node. Please provide more information on the network setup. In particular, let me know if you can ssh into machine-0, in that case just show us the output of route -n and tracepath google.com, check if you can curl -v google.com or similar. – noleti Apr 28 '15 at 01:35
  • Added more info about the setup. – Mario Apr 28 '15 at 19:33
  • I changed the router ip to 172.16.1.2 and it still gives the ppa:charmers/charm-helpers error because it cannot add the ppa, any tips? – Mario May 01 '15 at 19:20
  • 1
    @Mario Can you please rerun route -n on machine-0 and check if the route is updated now? If it is, are you still using the proxy when doing curl www.google.com on machine-0? What is the result of sudo apt-get install --reinstall ca-certificates? – noleti May 02 '15 at 01:47
  • Added more info. – Mario May 02 '15 at 23:30
  • 1
    @Mario thanks. It's really hard to pin down what the problem could be. Did you try sudo -E as suggested in http://askubuntu.com/questions/452595/cannot-add-ppa-behind-proxy-ubuntu-14-04 ? you could also check the root https proxy settings with sudo curl -v https://www.google.com or similar – noleti May 03 '15 at 01:10
  • Added more info. – Mario May 06 '15 at 21:27
  • 1
    @Mario how about adding the https_proxy to the environments.yaml? I think you only have the http_proxy there so far. There are also apt-specific proxy settings: https://jujucharms.com/docs/devel/howto-proxies – noleti May 11 '15 at 00:09
  • Added more info. – Mario May 11 '15 at 22:20
  • @Mario that is now a time-related error. sudo dpkg-reconfigure tzdata is suggested here: http://askubuntu.com/questions/465508/juju-bootstrap-debug-failed-to-connect-https-streams-canonical-com ntpdate ntp.ubuntu.com is suggested here: http://askubuntu.com/questions/469778/juju-bootstraping-gomaasapi-timestamp-error – noleti May 13 '15 at 02:12
0

I had same error check your time zone and set all to UTC, after installation you can return it back in any local time zone

Rastin
  • 784