Troubleshooting docker info and discourse

NuLL3rr0r

Active Member

Thanks: 14
Messages: 174

#1
I've been trying to install Discourse on a FreeBSD VM without any success.

According to discourse installation guide the only supported platform is Docker, although it is possible to install it without Docker. Since I have to install two Discourse instance, going without Docker is not an option (Yes, I know there is jail but the discourse bundled web-based GUI for updating won't work without Docker which is a pain in the butt).

I followed this guide on FreeBSD wiki:

$ cd /usr/ports/sysutils/docker-freebsd
$ make config-recursive
$ make install clean

$ kldload zfs
$ dd if=/dev/zero of=/usr/local/dockerfs bs=1024K count=4000
$ zpool create -f zroot /usr/local/dockerfs
$ zfs list
$ zpool list
$ zfs create -o mountpoint=/usr/docker zroot/docker
$ service docker onestart
$ ps auxw | grep docker


But, upon bootstraping Discourse:
$ bash launcher bootstrap app

I get the following error

Code:
Cannot connect to the docker daemon - verify it is running and you have access
I investigated the bootstrap script:

Code:
  # 1. docker daemon running?
  # we send stderr to /dev/null cause we don't care about warnings,
  # it usually complains about swap which does not matter
  test=`$docker_path info 2> /dev/null`
  if [[ $? -ne 0 ]] ; then
  echo "Cannot connect to the docker daemon - verify it is running and you have access"
  exit 1
  fi
And, tried the following command on csh/bash prompt:
$ docker info

Which outputs the following:
Code:
Get http://%2Fvar%2Frun%2Fdocker.sock/v1.19/info: EOF. Are you trying to connect to a TLS-enabled daemon without TLS?
I also checked if I have ca_root_nss installed, and it was there.

So, does anyone knows why docker info fails?
 

priyadarshan

Active Member

Thanks: 33
Messages: 116

#4
You could look into this, or you could install docker on bhyve running a linux guest.

In that way you would have the latest version of docker, too.
 

priyadarshan

Active Member

Thanks: 33
Messages: 116

#6
Nice, thank you for the How-To guide.

Perhaps you could consider publishing on this Forums as well (Howtos and FAQs section), as it can be quite handy.
 
OP
OP
NuLL3rr0r

NuLL3rr0r

Active Member

Thanks: 14
Messages: 174

#7
Sorry for my tardy reply, been busy with my TOEFL iBT exam.

Well, I would like too. But, unfortunately I'm giving up on Discourse as a comment system for various reasons. For example, I just realized out of a sudden it duplicates my posts and creates a new thread for each post which means it won't show previous comments. Furthermore, it's a memory hog (perhaps RoR faults). I believe it's too heavy for such a small task such as a comment system. A small comment system in Go Lang would be nice. I may start implementing my own comment system as I did with my subscription system because I wasn't satisfied with the current ones. Last but not least, I do not want to deal with building Ruby Gems which is a tedious task in case they fail to build.

Anyway I updated that posts with a few pitfalls and their solutions on FreeBSD 11.0-RELEASE. Perhaps you can ask the moderators and maintain a guide on Discourse if you would like, too. I'll be glad to use that as a basis for your Howto/Guide.
 
Last edited:
OP
OP
NuLL3rr0r

NuLL3rr0r

Active Member

Thanks: 14
Messages: 174

#9
Thank you so much @jukadan. Even though it's at 0.3 version, it looks so nice. I must give it a try.

Btw, I probably move away from Hexo, too. I benchmarked Hugo and it's blazing fast. Octopress (my original blog generation engine) took approximately 8 minutes to generate the blog (that's why I migrated to Hexo). Hexo takes ~8 seconds to generate the same contents. Hugo does that in milliseconds. The only thing I miss from Hexo which Hugo lacks is the Post Asset Folder feature. When it comes to feature vs performance I always go with the performance.

I must admit however, I'm a bit fanatic when it comes to native languages such as C, C++, D, Rust and Go and their performance. Hopefully, many people started moving to native languages for their web-related FLOSS projects. e.g. Hugo, Gogs (compare it to GitLab), ... Regarding Node.js usage in the blog subscription system (C++), it only gets pulled-in by CMake at compile time for converting SASS to CSS and HTML/JS/CSS optimization by Gulp at compile time (yes, no native tool comparable to Grunt or Gulp). There is no need for that at run-time.
 

hukadan

Active Member

Thanks: 153
Messages: 244

#11
Well, it is even simpler. You just need to install www/npm2, it will pull all the dependencies you need (Edit : except for database dependencies). To be complete, I also propose a non official package. It needs some polishing though. I will update it to the latest version of NodeBB (v1.2.0 released this week-end) later this week.
 

TomHsiung

Active Member

Thanks: 6
Messages: 134

#13
Thanks for the answer. Actually I solved the issue and there is no need for docker now.

BTW, I wrote that guide on installing Discourse on FreeBSD without Docker.
Hi,

Where is the guide for installing Discourse without Docker on FreeBSD you had written? Thanks.
 
Top