Hi Simon
I have my site running on port 80 on a vps using authbind.
I had similar symptoms to you and the problem was indeed that zotonic was trying to bind to ipv6 ports.
There's a paragraph in the cookbook entry you link to that solves this (setting ZOTONIC_IP, ZOTONIC_PORT etc). The important thing is these need to be set in the environment you lanch zotonic from.
I posted an example init.d script for this to the forum a while ago. You might want to try that (sending this from phone & can't find link). Let me know if you can't find it & want it. I'll send when I get back to laptop.
Hth,
Scott.
export ZOTONIC_PORT=80
export ZOTONIC_PORT_SSL=443
public_interface=eth0
export ZOTONIC_IP=`/sbin/ifconfig $public_interface | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'`
export ERL="authbind --deep erl"
3.
create /etc/init.d/zotonic. See link below for file contents.
Set owner as root:root and permissions as 755//Andreas
2012/2/23 Simon Smithies <simon.s...@gmail.com>:
Hi Simon, sorry to hear you're still having problems. The app error I'll have to leave to Andreas etc. I'm afraid, don't know about that one.
Re. IP address though: easiest fix is to set it manually in the .zotonic_defaults file:
ZOTONIC_IP=<your IP>
I.e. replace the current shell command. Means you'd need to change manually too if server ip changes but since it's a public server i assume the ip will be static.
It's strange the script is returning the loopback address though. If you run ifconfig does it definitely show another address?
- Scott.
Ok good, one problem out of the way.
Don't really have a clue about the public_key problem so this is speculation...
Did you just copy over bin/zotonic from the link i sent you? I don't know if the base script has changed since 0.7. If so that could (?) be a source of errors. In the absence of something more meaningful (and assuming you haven't done it already) you might want to try:
1. Patching the 'read preferences' code into the 0.8 version of bin/zotonic
2. Trying to start by directly running bin/zotonic from the command line for the zotonic user.
The former should remove anything arising from changes in the script. The latter should remove any issues arising from different user environments (root for init.d/zotonic, zotonic for bin/zotonic). I wonder if the latter is the source of the '2 erlang versions' problem you mention.
Bit of a 'blunt weapon' suggestion I know, sorry...
- S.
We managed to resolve his remaining issues during the day today.
There were a number of things. First, he had two different versions of
erlang installed. One of which seems to have been a broken install.
One was found when he ran erl from the command line, another when
invoking the zotonic script (I guess he used sudo while doing that,
otherwise I don't see why that would be the case).
The other was that he had apache (or something) already running on port 80.
I'll let simon fill in the rest, if he wants.
//Andreas
2012/2/24 Scott Finnie <scott....@gmail.com>:
Hey, a couple of low priority questions, for understanding as much as anything:
I've just tried '/etc/init.d/zotonic start' as zotonic without sudo. That seems to workfine. Do you see any issues with that?
Also, what purpose does '/etc/init.d/zotonic' serve? ... why not just use 'bin/zotonic start' -- that seems to work too.
Finally, a big thank you! Great authbind instructions Scott -- putting aside my environmental issues, they worked perfectly.