DreamCompute / Digital Ocean Staging Server Setups both Fail Multiple Times

Trying to setup my Lemp server using Trellis on a DreamCompute Server. Connection can be made with SSH key and it manages to get to Fail2Ban installation and hung. On second try it did not hang but stopped with errors checking whether ip table rules were enabled:

   TASK: [ferm | ensure iptables rules are enabled] ****************************** 
    failed: [xx.xxx.xx.xx] => {"changed": false, "cmd": ["ferm", "--slow", "/etc/ferm/ferm.conf"], "delta": "0:00:00.365786", "end": "2015-11-05 07:37:07.003610", "rc": 25, "start": "2015-11-05 07:37:06.637824", "warnings": []}
    stderr: Error in /etc/ferm/filter-input.d/50_dport_accept_ssh.conf line 7:
    ) 
    { 
        saddr 
        ( 
            html head meta http-equiv = <--
    equals operator ("=") is not allowed here
    
    PLAY RECAP ******************************************************************** 
               to retry, use: --limit @/Users/jasper/server.retry
    
    xx.xxx.xx.xx               : ok=21   changed=1    unreachable=0    failed=1   

It refers to this line:

<meta http-equiv="content-type" content="text/html;charset=utf-8">

I tried to run

ansible-playbook -i hosts/staging server.yml --limit @/Users/jasper/server.retry

but in the end had the same error.The file server.retry does not exist as far as I know anyways… Ideas?

Well I wiped the instance and added a new instance and tried it all again with the Ansible Playbook. I am at Composer now where I get the error:

TASK: [composer | Composer self update] *************************************** 
failed: [xx.xxx.xx.xx] => {"changed": false, "cmd": ["composer", "self-update"], "delta": "0:01:00.854499", "end": "2015-11-05 10:20:41.857062", "rc": 1, "start": "2015-11-05 10:19:41.002563", "stdout_lines": [], "warnings": []}
stderr: Updating to version e8b6a08a51258726b5fc877c20f0b147d228b220.
    Downloading: 100%         
                                                                                                                         
  [Composer\Downloader\TransportException]                                                                               
  The "https://getcomposer.org/composer.phar" file could not be downloaded: failed to open stream: Connection timed out  
                                                                                                                         

self-update [-r|--rollback] [--clean-backups] [--no-progress] [version]

Trying to update composer manually gets stuck at premissions isuses:

dhc-user@name:~$ composer selfupdate
                                                                                 
  [Composer\Downloader\FilesystemException]                                      
  Filesystem exception:                                                          
  Composer update failed: the "/usr/lib/composer/composer.phar" file could not   
  be written    

as I guess that user dhc-user does not have enought rights or the web user that was added now does not… and the step with adding wpcli and WordPress have not been taken care of of course… Is there now way to continue with remaining tasks when one does not pass? Now I have an outdated Composer and no WP Cli nor WordPress…

Two, tried a setup a Digital Ocean Droplet (Ubuntu 14.0.4) as I thought Dreamhost perhaps had connectivity issues at DreamCompute network I tried the whole thing following the Trellis Ansible Playbook. And again things did not work out. Things hung at creating WordPress setup with the database and so on and restarting or reloading other items failed too:

TASK: [wordpress-setup | Create/assign database user to db and grant permissions] *** 
fatal: [xxx.xxx.xxx.xxx] => error parsing argument string 'name="imagewize_dbuser" password="password"" priv="imagewize_staging.*:ALL" state=present login_host="localhost" login_user="root" login_password="stagingpw"', try quoting the entire line.

NOTIFIED: [common | restart memcached] **************************************** 
FATAL: no hosts matched or all hosts have already failed -- aborting


NOTIFIED: [common | reload nginx] ********************************************* 
FATAL: no hosts matched or all hosts have already failed -- aborting


NOTIFIED: [common | reload php-fpm] ******************************************* 
FATAL: no hosts matched or all hosts have already failed -- aborting


NOTIFIED: [fail2ban | restart fail2ban] *************************************** 
FATAL: no hosts matched or all hosts have already failed -- aborting


NOTIFIED: [ferm | restart ferm] *********************************************** 
FATAL: no hosts matched or all hosts have already failed -- aborting


NOTIFIED: [ntp | restart ntp] ************************************************* 
FATAL: no hosts matched or all hosts have already failed -- aborting


NOTIFIED: [sshd | restart ssh] ************************************************ 
FATAL: no hosts matched or all hosts have already failed -- aborting


PLAY RECAP ******************************************************************** 
           to retry, use: --limit @/Users/jasper/server.retry

146.185.152.145            : ok=77   changed=57   unreachable=1    failed=0 

Seems the Ansible Playbook does not work on a 1 GB RAM VCPU Digital Ocean Droplet or DreamCompute instance. I did the setup 5 times now. Three or 4 setups with new instances on DreamCompute (Open Stack) and once on a Digital Ocean Droplet. And to no avail.

Update: Dreamhost said they might be experiencing issues at their Ashburn Virginia Data Center.

Why the DO Droplet setup failed at the database setup level I am not sure yet.

I find that I sometimes need to run the Ansible provisioning script multiple times, but in the end it always works.

That’s the thing with Ansible scripts, they are designed to be run again and again without issue. Ansible will intelligently detect if a given task has already completed and skip it if necessary.

I have around ten 1GM RAM DO droplets that I have successfully provisioned with trellis. Give it another go…

1 Like

Thanks @treb0r. Will try DO again once I have given up on DreamCompute. They mentioned:

We are
seeing some issues with ipv6 in the datacenter that DreamCompute is
located, which can cause issues with installing composer. You can get
around these issues temporarily by supplying the -4 flag to curl so it
uses ipv4 instead.

Not sure if I can adjust the script to add the ipv4 flag. Do not see how I could do that in server.yml … Any ideas anyone?

Well DreamCompute connectivity issues resolved it seems as I was able to pass the Composer update. And when I removed the " in the database password I was able to finish the entire installation. Now I am only getting an error 404 hitting the NGINX server using the subdomain I attached to the ip address using an a record. These 404s do not show up in the log tail /var/log/nginx/access.log but do show up in /srv/www/domain.com/logs/access.log Just don’t know why I get these erorrs… My NGINX congid states that this is the root: root /srv/www/imagewize.com/current/web. And the folder current/web does not exist (yet). So perhaps I skipped a step…

After provisioning the server you need to deploy to it

1 Like

Yeah, that is what I figured out last night. Deploy.sh needs to take care of the rest. Thanks for the heads up @benword !