coollabsio / coolify

An open-source & self-hostable Heroku / Netlify / Vercel alternative.
https://coolify.io
Apache License 2.0
31.81k stars 1.64k forks source link

Finished wizard, but nothing running? #6

Closed geelen closed 3 years ago

geelen commented 3 years ago

Everything seemed to work, but nothing running locally at the end?

## Checking and installing Docker Engine
Installing Docker...

## Checking and installing Docker Engine
Initiating Docker Swarm...
Installing Mongodb...

## Github related questions

...

? Github Private key (you need to generate it by clicking on 'Generate private key' button): Received

Everything is ready! Now let me install Coolify itself. It will take some minutes... Grab a tea or coffee!

The initial Let's Encrypt certificate requests could be slow, so be patient if you deploy a new application.

We are done - what a ride! Visit https://coolify.gmad.dev to access your cool application! :)
glen@ubuntu-focal-1:~$ curl http://coolify.gmad.dev/
curl: (7) Failed to connect to coolify.gmad.dev port 80: Connection refused
glen@ubuntu-focal-1:~$ sudo ps aux | grep docker
glen        2139  0.0  0.0   8160   736 pts/1    S+   11:28   0:00 grep --color=auto docker
glen@ubuntu-focal-1:~$ ps aux | grep docker
glen        2142  0.0  0.0   8160   736 pts/1    R+   11:28   0:00 grep --color=auto docker
glen@ubuntu-focal-1:~$ sudo systemctl status docker
Unit docker.service could not be found.
glen@ubuntu-focal-1:~$ docker ls

Command 'docker' not found, but can be installed with:

apt install docker.io
Please ask your administrator.

glen@ubuntu-focal-1:~$ curl localhost
curl: (7) Failed to connect to localhost port 80: Connection refused

glen@ubuntu-focal-1:~$ sudo netstat -tunlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      444/systemd-resolve
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      699/sshd: /usr/sbin
tcp6       0      0 :::22                   :::*                    LISTEN      699/sshd: /usr/sbin
udp        0      0 127.0.0.53:53           0.0.0.0:*                           444/systemd-resolve
udp        0      0 10.154.0.2:68           0.0.0.0:*                           421/systemd-network
udp        0      0 127.0.0.1:323           0.0.0.0:*                           493/chronyd
udp6       0      0 ::1:323                 :::*                                493/chronyd

Any pointers?

andrasbacsai commented 3 years ago

I will take a look at it. I probably will ask you to rerun the script!

encima commented 3 years ago

If you install docker manually first and then run the script, is that successful?

andrasbacsai commented 3 years ago

I'm currently rewriting the installation script to be more explicit on errors.

andrasbacsai commented 3 years ago

Published a new version of the installation script. It should show you more errors during installation.

Please let me know if you still face the problem and the debug output if it still fails. Thanks!

I hope I don't break too many things because I totally rewrite it.

Still feels itchy when I code in it; I will replace it soon with a better solution, that's sure.

EDIT: I host the installation script on CDN. Force flushed the cache but could happen that you see the old one still. Hopefully not.

geelen commented 3 years ago
glen@ubuntu-focal-1:~$ sh <(curl -fsSL https://get.coollabs.io/install.sh) coolify -d
rm: cannot remove './coolify-installer': No such file or directory
--2021-04-01 10:32:10--  https://get.coollabs.io/coolify-installer
Resolving get.coollabs.io (get.coollabs.io)... 81.19.214.21
Connecting to get.coollabs.io (get.coollabs.io)|81.19.214.21|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 77287716 (74M) [application/octet-stream]
Saving to: ‘coolify-installer’

coolify-installer                          100%[=====================================================================================>]  73.71M  31.9MB/s    in 2.3s

2021-04-01 10:32:12 (31.9 MB/s) - ‘coolify-installer’ saved [77287716/77287716]

## HINT: For debug mode run: sh <(curl -fsSL https://get.coollabs.io/install.sh) coolify -d

? Hey. Welcome to Coolify's installer!

It will install/update a lot of stuffs on your operating system automatically, which needed for Coolify to be running! By continuing you accept this!

There are 2 ways of installation:
- express (recommended) - lots of stuffs generated automatically behind the scenes, like secure passwords, etc.
- custom - you can fill all values by hand.

Would you like the express installation (recommended)? Yes

## Installing basic libraries

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reading package lists...
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
W: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied)
W: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied)
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
35.242.190.253
? Enter a <domain> for Coolify - example 'coollabs.io' or 'coolify.coollabs.io' without http/https: coolify.gmad.dev
? Email address for Let's Encrypt: glen@cloudflare.com
35.246.45.246
Error
    at expressInstallation (/snapshot/coolify/index.js)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async coolifyMe (/snapshot/coolify/index.js)

Will start this VM again from scratch and try once more

geelen commented 3 years ago

Exactly the same on a fresh VM :(

Tried using sudo and while I got more output, it crashed in the same spot:

glen@ubuntu-focal-1:~$ sudo ./coolify-installer -d
## HINT: For debug mode run: sh <(curl -fsSL https://get.coollabs.io/install.sh) coolify -d

? Hey. Welcome to Coolify's installer!

It will install/update a lot of stuffs on your operating system automatically, which needed for Coolify to be running! By continuing you accept this!

There are 2 ways of installation:
- express (recommended) - lots of stuffs generated automatically behind the scenes, like secure passwords, etc.
- custom - you can fill all values by hand.

Would you like the express installation (recommended)? Yes

## Installing basic libraries

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Hit:1 http://europe-west2.gce.archive.ubuntu.com/ubuntu focal InRelease
Get:2 http://europe-west2.gce.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:3 http://europe-west2.gce.archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
Get:4 http://security.ubuntu.com/ubuntu focal-security InRelease [109 kB]
Get:5 http://europe-west2.gce.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [894 kB]
Get:6 http://europe-west2.gce.archive.ubuntu.com/ubuntu focal-updates/main Translation-en [208 kB]
Get:7 http://europe-west2.gce.archive.ubuntu.com/ubuntu focal-updates/main amd64 c-n-f Metadata [12.9 kB]
Get:8 http://europe-west2.gce.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [758 kB]
Get:9 http://europe-west2.gce.archive.ubuntu.com/ubuntu focal-updates/universe Translation-en [160 kB]
Get:10 http://europe-west2.gce.archive.ubuntu.com/ubuntu focal-updates/universe amd64 c-n-f Metadata [16.5 kB]
Get:11 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [574 kB]
Get:12 http://security.ubuntu.com/ubuntu focal-security/main amd64 c-n-f Metadata [7380 B]
Get:13 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages [550 kB]
Get:14 http://security.ubuntu.com/ubuntu focal-security/universe amd64 c-n-f Metadata [10.7 kB]
Fetched 3515 kB in 1s (2646 kB/s)
Reading package lists...
Building dependency tree...
Reading state information...
44 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists...
Building dependency tree...
Reading state information...
ca-certificates is already the newest version (20210119~20.04.1).
ca-certificates set to manually installed.
git is already the newest version (1:2.25.1-1ubuntu3.1).
git set to manually installed.
software-properties-common is already the newest version (0.98.9.4).
software-properties-common set to manually installed.
The following package was automatically installed and is no longer required:
  libnuma1
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
  bind9-libs libcurl4
The following NEW packages will be installed:
  apt-transport-https gnupg-agent
The following packages will be upgraded:
  bind9-dnsutils bind9-libs curl libcurl4
4 upgraded, 2 newly installed, 0 to remove and 40 not upgraded.
Need to get 1651 kB of archives.
After this operation, 207 kB of additional disk space will be used.
Get:1 http://europe-west2.gce.archive.ubuntu.com/ubuntu focal-updates/main amd64 bind9-dnsutils amd64 1:9.16.1-0ubuntu2.7 [134 kB]
Get:2 http://europe-west2.gce.archive.ubuntu.com/ubuntu focal-updates/main amd64 bind9-libs amd64 1:9.16.1-0ubuntu2.7 [1114 kB]
Get:3 http://europe-west2.gce.archive.ubuntu.com/ubuntu focal-updates/universe amd64 apt-transport-https all 2.0.4 [1704 B]
Get:4 http://europe-west2.gce.archive.ubuntu.com/ubuntu focal-updates/main amd64 curl amd64 7.68.0-1ubuntu2.5 [161 kB]
Get:5 http://europe-west2.gce.archive.ubuntu.com/ubuntu focal-updates/main amd64 libcurl4 amd64 7.68.0-1ubuntu2.5 [234 kB]
Get:6 http://europe-west2.gce.archive.ubuntu.com/ubuntu focal-updates/universe amd64 gnupg-agent all 2.2.19-3ubuntu2.1 [5232 B]
Fetched 1651 kB in 0s (3427 kB/s)
(Reading database ... 63149 files and directories currently installed.)
Preparing to unpack .../0-bind9-dnsutils_1%3a9.16.1-0ubuntu2.7_amd64.deb ...
Unpacking bind9-dnsutils (1:9.16.1-0ubuntu2.7) over (1:9.16.1-0ubuntu2.6) ...
Preparing to unpack .../1-bind9-libs_1%3a9.16.1-0ubuntu2.7_amd64.deb ...
Unpacking bind9-libs:amd64 (1:9.16.1-0ubuntu2.7) over (1:9.16.1-0ubuntu2.6) ...
Selecting previously unselected package apt-transport-https.
Preparing to unpack .../2-apt-transport-https_2.0.4_all.deb ...
Unpacking apt-transport-https (2.0.4) ...
Preparing to unpack .../3-curl_7.68.0-1ubuntu2.5_amd64.deb ...
Unpacking curl (7.68.0-1ubuntu2.5) over (7.68.0-1ubuntu2.4) ...
Preparing to unpack .../4-libcurl4_7.68.0-1ubuntu2.5_amd64.deb ...
Unpacking libcurl4:amd64 (7.68.0-1ubuntu2.5) over (7.68.0-1ubuntu2.4) ...
Selecting previously unselected package gnupg-agent.
Preparing to unpack .../5-gnupg-agent_2.2.19-3ubuntu2.1_all.deb ...
Unpacking gnupg-agent (2.2.19-3ubuntu2.1) ...
Setting up apt-transport-https (2.0.4) ...
Setting up bind9-libs:amd64 (1:9.16.1-0ubuntu2.7) ...
Setting up gnupg-agent (2.2.19-3ubuntu2.1) ...
Setting up libcurl4:amd64 (7.68.0-1ubuntu2.5) ...
Setting up curl (7.68.0-1ubuntu2.5) ...
Setting up bind9-dnsutils (1:9.16.1-0ubuntu2.7) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
35.242.190.253
? Enter a <domain> for Coolify - example 'coollabs.io' or 'coolify.coollabs.io' without http/https: coolify.gmad.dev
? Email address for Let's Encrypt: glen@cloudflare.com
35.246.45.246
Error
    at expressInstallation (/snapshot/coolify/index.js)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async coolifyMe (/snapshot/coolify/index.js)
andrasbacsai commented 3 years ago

Ah, I see the problem!

Sudo access (or executed by root user) is necessary for the installation!

Your public IP address (server's public address) does not match with the coolify.gmad.dev's A type DNS configuration. Are you sure that the server's public IP should be 35.246.45.246? And not 35.242.190.253?

I will add some further checks to that part and also a select menu if there is more than one public IP address for a server!

geelen commented 3 years ago

Ah yes when I rebooted the image it got a new IP address. Strange that this time it didn't stop and ask me to change the DNS value any more?

Can the install script invoke sudo automatically for me or should that be added to the documentation?

andrasbacsai commented 3 years ago

Yeah, good catch! I left some buggy code in there. Updated the installation script again.

It should shout at you if:

Thanks for pointing this out to me!

andrasbacsai commented 3 years ago

I've updated the installation scripts because of some bash feature/bug (#26). You need to install it like this:

/bin/bash -c "$(curl -fsSL https://get.coollabs.io/install.sh)"

or with normal user (sudo):

sudo /bin/bash -c "$(curl -fsSL https://get.coollabs.io/install.sh)"

andrasbacsai commented 3 years ago

Closing now as it's probably solved already.

If you have any further questions, let me know!