Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

CouchDB failed to build against Erlang 16 #18256

Closed
hkjels opened this issue Mar 5, 2013 · 54 comments
Closed

CouchDB failed to build against Erlang 16 #18256

hkjels opened this issue Mar 5, 2013 · 54 comments

Comments

@hkjels
Copy link

hkjels commented Mar 5, 2013

$ brew doctor
Your system is raring to brew.

verbose output
config.log

@fmartingr
Copy link

Same problem here:
https://gist.github.com/fmartingr/6590687182ac4bf76060

Surfing around noticed a bug in the archlinux forums saying that Erlang R16B is not compatible with couchdb 1.2.1.

@adamv
Copy link
Contributor

adamv commented Mar 6, 2013

Not surprising, this sort of thing happens every Erlang major release.

@dch
Copy link
Contributor

dch commented Mar 10, 2013

Correct. Normally supporting the "next' erlang release is pretty quick. This is a tad tricky; erlang R16 drops support for a language feature that one of our core dependencies mochiweb uses.

Mochiweb upstream has been updated to support R16 but this hasn't been rolled into couchdb yet. I should start a fork on that next week https://issues.apache.org/jira/browse/COUCHDB-1598 if you want to follow it.

@jacknagel when this is working it might not go straight into our coming 1.3.0 release. Can we point the recipe to a fork for example?

@tnightingale
Copy link

I am also having this problem. Details: https://gist.github.com/tnightingale/1913d8a51ab46e632d78

@jodah
Copy link

jodah commented Mar 10, 2013

I think I might be having the same problem. Not too sure. Here is a little what I see as well as what hkjels posted.

make[3]: *** [etap_request.beam] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
/usr/local/Library/Homebrew/formula.rb:575:in `system'
BuildError: Failed executing: make

  1. raise
  2. ignore
  3. backtrace
  4. shell
    Choose an action: 2

'''make[2]: *** [etap_request.beam] Error 1
make[2]: *** Waiting for unfinished jobs....
etap_web.erl:45: Warning: call to http:request/4 will fail, since it was removed in R15B; use httpc:request/4
etap_web.erl:59: Warning: call to http:request/4 will fail, since it was removed in R15B; use httpc:request/4
make[1]: *** [install-recursive] Error 1
make: *** [install-recursive] Error 1
/usr/local/Library/Homebrew/formula.rb:575:in `system'
BuildError: Failed executing: make install

  1. raise
  2. ignore
  3. backtrace
  4. shell
    Choose an action: 2'''

@dch
Copy link
Contributor

dch commented Mar 11, 2013

Looks like it.

@jodah what's the output of erl +V from your terminal?

On 10 March 2013 23:57, jodah notifications@github.com wrote:

I think I might be having the same problem. Not too sure. Here is a little
what I see as well as what hkjels posted.

make[3]: *** [etap_request.beam] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
/usr/local/Library/Homebrew/formula.rb:575:in `system'
BuildError: Failed executing: make

  1. raise
  2. ignore
  3. backtrace
  4. shell
    Choose an action: 2

'''make[2]: *** [etap_request.beam] Error 1
make[2]: *** Waiting for unfinished jobs....
etap_web.erl:45: Warning: call to http:request/4 will fail, since it was
removed in R15B; use httpc:request/4
etap_web.erl:59: Warning: call to http:request/4 will fail, since it was
removed in R15B; use httpc:request/4
make[1]: *** [install-recursive] Error 1
make: *** [install-recursive] Error 1
/usr/local/Library/Homebrew/formula.rb:575:in `system'
BuildError: Failed executing: make install

  1. raise
  2. ignore
  3. backtrace
  4. shell
    Choose an action: 2'''


Reply to this email directly or view it on GitHubhttps://github.com//issues/18256#issuecomment-14691400
.

@emrox
Copy link

emrox commented Mar 11, 2013

i have the same install -v error output @tnightingale & @hkjels posted
erlang is freshly installed and erl +v prints this: Erlang (SMP,ASYNC_THREADS,HIPE) (BEAM) emulator version 5.10.1

@davidjrice
Copy link
Contributor

Can confirm, does not work on OS X 10.8.2.

CouchDB 1.3.0 is currently in release candidate. I have yet to test if it will address the Erlang R16B compatiblity. This is probably the most likely source of a fix.
http://markmail.org/message/bitxx777ldff56px

To workaround in the time being you can revert back to Erlang R15B03-1

brew uninstall erlang
cd /usr/local
git checkout 168742f Library/Formula/erlang.rb

@jodah
Copy link

jodah commented Mar 12, 2013

Perhaps not needed now, but I have the same printout as Stefan:

Erlang (SMP,ASYNC_THREADS,HIPE) (BEAM) emulator version 5.10.1

-JJ

On Mar 11, 2013, at 10:51 AM, Dave Cottlehuber notifications@github.com wrote:

Looks like it.

@jodah what's the output of erl +V from your terminal?

On 10 March 2013 23:57, jodah notifications@github.com wrote:

I think I might be having the same problem. Not too sure. Here is a little
what I see as well as what hkjels posted.

make[3]: *** [etap_request.beam] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
/usr/local/Library/Homebrew/formula.rb:575:in `system'
BuildError: Failed executing: make

  1. raise
  2. ignore
  3. backtrace
  4. shell
    Choose an action: 2

'''make[2]: *** [etap_request.beam] Error 1
make[2]: *** Waiting for unfinished jobs....
etap_web.erl:45: Warning: call to http:request/4 will fail, since it was
removed in R15B; use httpc:request/4
etap_web.erl:59: Warning: call to http:request/4 will fail, since it was
removed in R15B; use httpc:request/4
make[1]: *** [install-recursive] Error 1
make: *** [install-recursive] Error 1
/usr/local/Library/Homebrew/formula.rb:575:in `system'
BuildError: Failed executing: make install

  1. raise
  2. ignore
  3. backtrace
  4. shell
    Choose an action: 2'''


Reply to this email directly or view it on GitHubhttps://github.com//issues/18256#issuecomment-14691400
.


Reply to this email directly or view it on GitHub.

@dch
Copy link
Contributor

dch commented Mar 12, 2013

On 12 March 2013 03:04, David Rice notifications@github.com wrote:

Can confirm, does not work on OS X 10.8.2.

CouchDB 1.3.0 is currently in release candidate. I have yet to test if
it will address the Erlang R16B compatiblity. This is probably the most
likely source of a fix.
http://markmail.org/message/bitxx777ldff56px

I'm one of the developers & I'm aware it doesn't work. I am not sure yet if
CouchDB 1.3.0 will include a fix for this as its quite a bit of change to
introduce at late notice. If we don't do that, we'll definitely be rolling
a 1.3.1 with that included.

To workaround in the time being you can revert back to Erlang R15B03-1

brew uninstall erlangcd /usr/local
git checkout 168742f Library/Formula/erlang.rb

+1 great tip, I will add that to the wiki.

@jodah
Copy link

jodah commented Mar 12, 2013

I applied the fix that David suggested and this seems to have fixed the build.

Thank you!

But when I launch couchdb I still seem to get an erlang problem:

Macs-MacBook-Pro:local macadmin$ couchdb
Apache CouchDB 1.2.1 (LogLevel=info) is starting.
Failure to start Mochiweb: eaddrinuse
[error] [<0.123.0>] {error_report,<0.30.0>,
{<0.123.0>,crash_report,
[[{initial_call,
{mochiweb_socket_server,init,['Argument__1']}},
{pid,<0.123.0>},
{registered_name,[]},
{error_info,
{exit,eaddrinuse,
[{gen_server,init_it,6,
[{file,"gen_server.erl"},{line,320}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,227}]}]}},
{ancestors,
[couch_secondary_services,couch_server_sup,<0.31.0>]},
{messages,[]},
{links,[<0.92.0>]},
{dictionary,[]},
{trap_exit,true},
{status,running},
{heap_size,1597},
{stack_size,24},
{reductions,469}],
[]]}}
{"init terminating in do_boot",{{badmatch,{error,{bad_return,{{couch_app,start,[normal,["/usr/local/etc/couchdb/default.ini","/usr/local/etc/couchdb/local.ini"]]},{'EXIT',{{badmatch,{error,shutdown}},[{couch_server_sup,start_server,1,[{file,"couch_server_sup.erl"},{line,98}]},{application_master,start_it_old,4,[{file,"application_master.erl"},{line,274}]}]}}}}}},[{couch,start,0,[{file,"couch.erl"},{line,18}]},{init,start_it,1,[]},{init,start_em,1,[]}]}}

Crash dump was written to: erl_crash.dump
init terminating in do_boot ()

Is this still related?

Cheers
JJ

On Mar 12, 2013, at 1:15 AM, Dave Cottlehuber notifications@github.com wrote:

On 12 March 2013 03:04, David Rice notifications@github.com wrote:

Can confirm, does not work on OS X 10.8.2.

CouchDB 1.3.0 is currently in release candidate. I have yet to test if
it will address the Erlang R16B compatiblity. This is probably the most
likely source of a fix.
http://markmail.org/message/bitxx777ldff56px

I'm one of the developers & I'm aware it doesn't work. I am not sure yet if
CouchDB 1.3.0 will include a fix for this as its quite a bit of change to
introduce at late notice. If we don't do that, we'll definitely be rolling
a 1.3.1 with that included.

To workaround in the time being you can revert back to Erlang R15B03-1

brew uninstall erlangcd /usr/local
git checkout 168742f Library/Formula/erlang.rb

+1 great tip, I will add that to the wiki.

Reply to this email directly or view it on GitHub.

@davidjrice
Copy link
Contributor

@jodah I think that error you are now having is unrelated.

This error with CouchDB failing to boot is usually due to an error in permissions.

I would run brew doctor and ensure everything is okay with your system. You could also try launching it with sudo couchdb temporarily, but I would recommend fixing your homebrew install than using this.

Another version of CouchDB could potentially be started on your machine try seeing if ps auwx | grep couch turns up any old processes

On Tuesday, 12 March 2013 at 16:54, jodah wrote:

I applied the fix that Davis suggested and this seems to have fixed the build.

Thank you!

But when I launch couchdb I still seem to get an erlang problem:

Macs-MacBook-Pro:local macadmin$ couchdb
Apache CouchDB 1.2.1 (LogLevel=info) is starting.
Failure to start Mochiweb: eaddrinuse
[error] [<0.123.0>] {error_report,<0.30.0>,
{<0.123.0>,crash_report,
[[{initial_call,
{mochiweb_socket_server,init,['Argument__1']}},
{pid,<0.123.0>},
{registered_name,[]},
{error_info,
{exit,eaddrinuse,
[{gen_server,init_it,6,
[{file,"gen_server.erl"},{line,320}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,227}]}]}},
{ancestors,
[couch_secondary_services,couch_server_sup,<0.31.0>]},
{messages,[]},
{links,[<0.92.0>]},
{dictionary,[]},
{trap_exit,true},
{status,running},
{heap_size,1597},
{stack_size,24},
{reductions,469}],
[]]}}
{"init terminating in do_boot",{{badmatch,{error,{bad_return,{{couch_app,start,[normal,["/usr/local/etc/couchdb/default.ini","/usr/local/etc/couchdb/local.ini"]]},{'EXIT',{{badmatch,{error,shutdown}},[{couch_server_sup,start_server,1,[{file,"couch_server_sup.erl"},{line,98}]},{application_master,start_it_old,4,[{file,"application_master.erl"},{line,274}]}]}}}}}},[{couch,start,0,[{file,"couch.erl"},{line,18}]},{init,start_it,1,[]},{init,start_em,1,[]}]}}

Crash dump was written to: erl_crash.dump
init terminating in do_boot ()

Is this still related?

Cheers
JJ

On Mar 12, 2013, at 1:15 AM, Dave Cottlehuber <notifications@github.com (mailto:notifications@github.com)> wrote:

On 12 March 2013 03:04, David Rice <notifications@github.com (mailto:notifications@github.com)> wrote:

Can confirm, does not work on OS X 10.8.2.

CouchDB 1.3.0 is currently in release candidate. I have yet to test if
it will address the Erlang R16B compatiblity. This is probably the most
likely source of a fix.
http://markmail.org/message/bitxx777ldff56px

I'm one of the developers & I'm aware it doesn't work. I am not sure yet if
CouchDB 1.3.0 will include a fix for this as its quite a bit of change to
introduce at late notice. If we don't do that, we'll definitely be rolling
a 1.3.1 with that included.

To workaround in the time being you can revert back to Erlang R15B03-1

brew uninstall erlangcd /usr/local
git checkout 168742f Library/Formula/erlang.rb

+1 great tip, I will add that to the wiki.

Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub (#18256 (comment)).

@jodah
Copy link

jodah commented Mar 12, 2013

@david Rice, Thanks man!

Your last thought was exactly right. I downloaded your easy install a couple of days ago and I guess I never turned it off appropriately.

Cheers

-JJ

On Mar 12, 2013, at 12:34 PM, David Rice notifications@github.com wrote:

@jodah I think that error you are now having is unrelated.

This error with CouchDB failing to boot is usually due to an error in permissions.

I would run brew doctor and ensure everything is okay with your system. You could also try launching it with sudo couchdb temporarily, but I would recommend fixing your homebrew install than using this.

Another version of CouchDB could potentially be started on your machine try seeing if ps auwx | grep couch turns up any old processes

On Tuesday, 12 March 2013 at 16:54, jodah wrote:

I applied the fix that Davis suggested and this seems to have fixed the build.

Thank you!

But when I launch couchdb I still seem to get an erlang problem:

Macs-MacBook-Pro:local macadmin$ couchdb
Apache CouchDB 1.2.1 (LogLevel=info) is starting.
Failure to start Mochiweb: eaddrinuse
[error] [<0.123.0>] {error_report,<0.30.0>,
{<0.123.0>,crash_report,
[[{initial_call,
{mochiweb_socket_server,init,['Argument__1']}},
{pid,<0.123.0>},
{registered_name,[]},
{error_info,
{exit,eaddrinuse,
[{gen_server,init_it,6,
[{file,"gen_server.erl"},{line,320}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,227}]}]}},
{ancestors,
[couch_secondary_services,couch_server_sup,<0.31.0>]},
{messages,[]},
{links,[<0.92.0>]},
{dictionary,[]},
{trap_exit,true},
{status,running},
{heap_size,1597},
{stack_size,24},
{reductions,469}],
[]]}}
{"init terminating in do_boot",{{badmatch,{error,{bad_return,{{couch_app,start,[normal,["/usr/local/etc/couchdb/default.ini","/usr/local/etc/couchdb/local.ini"]]},{'EXIT',{{badmatch,{error,shutdown}},[{couch_server_sup,start_server,1,[{file,"couch_server_sup.erl"},{line,98}]},{application_master,start_it_old,4,[{file,"application_master.erl"},{line,274}]}]}}}}}},[{couch,start,0,[{file,"couch.erl"},{line,18}]},{init,start_it,1,[]},{init,start_em,1,[]}]}}

Crash dump was written to: erl_crash.dump
init terminating in do_boot ()

Is this still related?

Cheers
JJ

On Mar 12, 2013, at 1:15 AM, Dave Cottlehuber <notifications@github.com (mailto:notifications@github.com)> wrote:

On 12 March 2013 03:04, David Rice <notifications@github.com (mailto:notifications@github.com)> wrote:

Can confirm, does not work on OS X 10.8.2.

CouchDB 1.3.0 is currently in release candidate. I have yet to test if
it will address the Erlang R16B compatiblity. This is probably the most
likely source of a fix.
http://markmail.org/message/bitxx777ldff56px

I'm one of the developers & I'm aware it doesn't work. I am not sure yet if
CouchDB 1.3.0 will include a fix for this as its quite a bit of change to
introduce at late notice. If we don't do that, we'll definitely be rolling
a 1.3.1 with that included.

To workaround in the time being you can revert back to Erlang R15B03-1

brew uninstall erlangcd /usr/local
git checkout 168742f Library/Formula/erlang.rb

+1 great tip, I will add that to the wiki.

Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub (#18256 (comment)).


Reply to this email directly or view it on GitHub.

@dch
Copy link
Contributor

dch commented Mar 12, 2013

Failure to start Mochiweb: eaddrinuse

Error Address In Use.

means you already have something running on port 5984. This is usually
another couch instance not shut down.

Protip, never run couchdb under sudo/root. you screw the pooch with
permissions. Ref http://wiki.apache.org/couchdb/Installing_on_OSX for a fix
for that.

On 12 March 2013 20:34, David Rice notifications@github.com wrote:

@jodah I think that error you are now having is unrelated.

This error with CouchDB failing to boot is usually due to an error in
permissions.

I would run brew doctor and ensure everything is okay with your system.
You could also try launching it with sudo couchdb temporarily, but I
would recommend fixing your homebrew install than using this.

Another version of CouchDB could potentially be started on your machine
try seeing if ps auwx | grep couch turns up any old processes

On Tuesday, 12 March 2013 at 16:54, jodah wrote:

I applied the fix that Davis suggested and this seems to have fixed the
build.

Thank you!

But when I launch couchdb I still seem to get an erlang problem:

Macs-MacBook-Pro:local macadmin$ couchdb
Apache CouchDB 1.2.1 (LogLevel=info) is starting.
Failure to start Mochiweb: eaddrinuse
[error] [<0.123.0>] {error_report,<0.30.0>,
{<0.123.0>,crash_report,
[[{initial_call,
{mochiweb_socket_server,init,['Argument__1']}},
{pid,<0.123.0>},
{registered_name,[]},
{error_info,
{exit,eaddrinuse,
[{gen_server,init_it,6,
[{file,"gen_server.erl"},{line,320}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,227}]}]}},
{ancestors,
[couch_secondary_services,couch_server_sup,<0.31.0>]},
{messages,[]},
{links,[<0.92.0>]},
{dictionary,[]},
{trap_exit,true},
{status,running},
{heap_size,1597},
{stack_size,24},
{reductions,469}],
[]]}}
{"init terminating in
do_boot",{{badmatch,{error,{bad_return,{{couch_app,start,[normal,["/usr/local/etc/couchdb/default.ini","/usr/local/etc/couchdb/local.ini"]]},{'EXIT',{{badmatch,{error,shutdown}},[{couch_server_sup,start_server,1,[{file,"couch_server_sup.erl"},{line,98}]},{application_master,start_it_old,4,[{file,"application_master.erl"},{line,274}]}]}}}}}},[{couch,start,0,[{file,"couch.erl"},{line,18}]},{init,start_it,1,[]},{init,start_em,1,[]}]}}

Crash dump was written to: erl_crash.dump
init terminating in do_boot ()

Is this still related?

Cheers
JJ

On Mar 12, 2013, at 1:15 AM, Dave Cottlehuber <notifications@github.com(mailto:
notifications@github.com)> wrote:

On 12 March 2013 03:04, David Rice <notifications@github.com (mailto:
notifications@github.com)> wrote:

Can confirm, does not work on OS X 10.8.2.

CouchDB 1.3.0 is currently in release candidate. I have yet to
test if
it will address the Erlang R16B compatiblity. This is probably the
most
likely source of a fix.
http://markmail.org/message/bitxx777ldff56px

I'm one of the developers & I'm aware it doesn't work. I am not sure
yet if
CouchDB 1.3.0 will include a fix for this as its quite a bit of change
to
introduce at late notice. If we don't do that, we'll definitely be
rolling
a 1.3.1 with that included.

To workaround in the time being you can revert back to Erlang
R15B03-1

brew uninstall erlangcd /usr/local
git checkout 168742f Library/Formula/erlang.rb

+1 great tip, I will add that to the wiki.

Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub (
#18256 (comment)).


Reply to this email directly or view it on GitHubhttps://github.com//issues/18256#issuecomment-14797819
.

@adamv
Copy link
Contributor

adamv commented Mar 12, 2013

@jacknagel @mistydemeo @MikeMcQuaid what's our long-term plan for newer versions of Erlang breaking high-profile stuff like CouchDB? Maintain the last major version of Erlang in core?

@MikeMcQuaid
Copy link
Member

@adamv I'd say just not update them.

@adamv
Copy link
Contributor

adamv commented Mar 12, 2013

Not update what?

@MikeMcQuaid
Copy link
Member

Sorry, not update Erlang until CouchDB is working. Perhaps we could add a DSL or something which maintains important packages that depend on a library that we want to make sure work before upgrading?

@dch
Copy link
Contributor

dch commented Mar 13, 2013

TBH I should have this fixed end of next week latest, I already got a
partially functioning branch up.

What would be good is for things like couch that have tight integration, to
be able to specify an erlang version in the recipe directly. Like an
extended version of `depends_on "Erlang" < R16 && depends_on "Erlang" > R14
for example.

I can do this in the configure script, but by then it's too late for most
users and the message will be hidden inside a crufty layer of autotools
logs.

On 13 March 2013 09:16, Mike McQuaid notifications@github.com wrote:

Sorry, not update Erlang until CouchDB is working. Perhaps we could add a
DSL or something which maintains important packages that depend on a
library that we want to make sure work before upgrading?


Reply to this email directly or view it on GitHubhttps://github.com//issues/18256#issuecomment-14829164
.

@MikeMcQuaid
Copy link
Member

Unfortunately we don't handle versions that way but we should track these things that have tight integration, agreed.

@janl
Copy link
Contributor

janl commented Mar 17, 2013

It might be a little longer until we achieve R16B compat. You can follow the issue here: https://issues.apache.org/jira/browse/COUCHDB-1696

Is there anything we can do on the homebrew front to make this less painful for users?

Something like:

$ brew install couchdb
NOTE: You have Erlang R16B, CouchDB needs R15B03-1 or earlier for a few more weeks.

Do:

    $ brew unlink erlang
    $ cd /usr/local
    $ git checkout 168742f Library/Formula/erlang.rb
    $ brew install erlang
    $ brew install couchdb

Or so?

@adamv
Copy link
Contributor

adamv commented Mar 17, 2013

We can write a "Erlang15Requirement" class for CouchDB with this message.

@janl
Copy link
Contributor

janl commented Mar 17, 2013

I’m happy to do the legwork if you can point me to an example to steal from.

@adamv
Copy link
Contributor

adamv commented Mar 17, 2013

Check out boost.rb and dsniff.rb for Requirement examples

@janl
Copy link
Contributor

janl commented Mar 17, 2013

Hope this is roughly okay, I tested this locally, but I am sure this can be improved :)

@awatts
Copy link

awatts commented Mar 18, 2013

I'm getting a weird error after following the work-around instructions, in that it's telling me that I need a version of Erlang less than or equal to the one I have installed, not the version I have installed:

drew@kaji:~$ brew install couchdb
Erlang <= R15B03-1 is required to install.

You have a erlang version R15B03-1

The work-around is:

brew unlink erlang
cd /usr/local
git checkout 168742f Library/Formula/erlang.rb
brew install erlang
brew install couchdb

Error: An unsatisfied requirement failed this build.

Thoughts?

@jacknagel
Copy link
Contributor

There are multiple things wrong with the check being used for the erlang version. I'm just going to make it depend on erlang-r15 from homebrew-versions.

@janl
Copy link
Contributor

janl commented Mar 19, 2013

Cool, thanks! Sorry for getting it wrong, I just copied the broad strokes and hoped the reviews would catch any errors :)

@samueljohn
Copy link
Contributor

Oh @jacknagel I pulled the R15B requirement mentioned above. I did not spot something terribly wrong so, as a quick-fix, I pulled that. Agree that explicitly depending on erlang R15B from homebrew-versions is probably the better approach.

@janl
Copy link
Contributor

janl commented Mar 19, 2013

Oh @jacknagel I pulled the R15B requirement mentioned above. I did not spot something terribly wrong so, as a quick-fix, I pulled that.

Got it, thank! :) brew updates

Agree that explicitly depending on erlang R15B from homebrew-versions is probably the better approach.

What does that mean exactly? Where can I read up on “homebrew-versions”?

@janl
Copy link
Contributor

janl commented Mar 19, 2013

Ah, brew tap homebrew/versions

But then:

> brew install erlang-r15
==> Downloading https://github.com/erlang/otp/archive/OTP_R15B03-1.tar.gz
######################################################################## 100.0%
Error: SHA1 mismatch
Expected: 5ba866722de79956b06966c232490d32bb7ba0a6
Actual: 7843070f5d325f95ef13022fc416b22b6b14120d
Archive: /Users/jan/Library/Caches/Homebrew/erlang-r15-R15B03-1.tar.gz
(To retry an incomplete download, remove the file above.)

Observations:

  1. I already have R15B03-1 in `/usr/local/Cellar/erlang/R15B03-1
    (I understand that homebrew/versions/erlang-r15 is a a different package)
  2. hombrew/versions does not seem to use a bottle, which is a very unfortunate since Erlang takes forever to build.
  3. It is broken. (I tried the download twice)

Sorry for being a pain, but I am trying to find a convenient solution for CouchDB users.

Thanks for your patience!

@jacknagel
Copy link
Contributor

The reasons that the requirement didn't work are (a) Formula#version doesn't necessarily correspond to the installed version, (b) it returns a Version object, not a string, so the pattern matching fails, and (c) the condition was reversed.

I've fixed the broken checksum on erlang-r15.

@jacknagel
Copy link
Contributor

@adamv @MikeMcQuaid Do we want to pull erlang-r15 into core and add the bottles back?

@jacknagel
Copy link
Contributor

Perhaps we should just roll erlang back to R15 and put R16 in versions.

@MikeMcQuaid
Copy link
Member

@jacknagel That's what I'm thinking. I'd think most users of Erlang are using CouchDB so it makes sense to just roll back until it's sorted.

@samueljohn
Copy link
Contributor

Ops, I wasn't aware of that, sorry, Jack.
But if you revert, note, I did a little fix to erlang and erlang-r15 so that it can build on Xcode-only Macs.

@samueljohn
Copy link
Contributor

Won't we upset erlang users if we revert to R15? I would prefer to to leave it as is with the depends_on 'homebrew/versions/erlang-r15.

@dch
Copy link
Contributor

dch commented Mar 19, 2013

Hard to say, there is also riak, elixir, ejabberd, disco, rabbitmq,
geocouch**, sinan, thrift, yaws, wrangler and tsung. I can't comment on
their compatibility.

On 19 March 2013 19:14, Samuel John notifications@github.com wrote:

Won't we upset erlang users if we revert to R15? I would prefer to to
leave it as is with the depends_on 'homebrew/versions/erlang-r15.


Reply to this email directly or view it on GitHubhttps://github.com//issues/18256#issuecomment-15132972
.

@janl
Copy link
Contributor

janl commented Mar 19, 2013

Given the circumstances I think reverting to R15B03-1 seems easiest. I don’t think others would mind much, erlang enthusiasts and devs can always build the latest version from versions or by hand (or use the Erlang Solutions distribution) and casual users will just see things work. Users of the other projects may disagree though :)

Again, we hope to get this fixed soon, so it won’t be long, but this is already affecting our users, so any help is greatly appreciated.

@jacknagel
Copy link
Contributor

Alright, I'm going to revert it.

@jodah
Copy link

jodah commented Mar 19, 2013

Homebrew's defaulted is now R15B03-1, correct?

@jacknagel
Copy link
Contributor

Yeah.

@jodah
Copy link

jodah commented Mar 19, 2013

Thanks guys. If Hombrew is not a godsend, its damn near close. Cheers!

@janl
Copy link
Contributor

janl commented Mar 19, 2013

<3 Homebrew.

@natevw
Copy link

natevw commented May 7, 2013

My system ended up getting upgraded to Erlang R16B and I could no longer re-install CouchDB (to try deal with #19641). Brew was claiming "erlang-R15B03-1 already installed" but erl was reporting R16B. I had to brew unlink erlang && brew link erlang to make the previous version usable again.

Hope this helps someone.

@adagios
Copy link

adagios commented May 7, 2013

Hope this helps someone.

It did, thanks!

@Hussein1147
Copy link

Im having the same issue as @jodah and when i start couchdb it logs this error message

Apache CouchDB 1.4.0 (LogLevel=info) is starting.
Error opening log file /opt/local/var/log/couchdb/couch.log: permission denied{"init terminating in do_boot",{{badmatch,{error,{bad_return,{{couch_app,start,[normal,["/opt/local/etc/couchdb/default.ini","/opt/local/etc/couchdb/local.ini"]]},{'EXIT',{{badmatch,{error,{shutdown,{failed_to_start_child,couch_primary_services,{shutdown,{failed_to_start_child,couch_log,{error,"permission denied","/opt/local/var/log/couchdb/couch.log"}}}}}}},[{couch_server_sup,start_server,1,[{file,"couch_server_sup.erl"},{line,98}]},{application_master,start_it_old,4,[{file,"application_master.erl"},{line,269}]}]}}}}}},[{couch,start,0,[{file,"couch.erl"},{line,18}]},{init,start_it,1,[]},{init,start_em,1,[]}]}}

Crash dump was written to: erl_crash.dump
init terminating in do_boot ()
DJIBRILs-MacBook-Air:~ djibrilkeita$ sudo couchdb
Apache CouchDB 1.4.0 (LogLevel=info) is starting.
Failure to start Mochiweb: eaddrinuse
[error] [<0.103.0>] {error_report,<0.30.0>,
{<0.103.0>,crash_report,
[[{initial_call,
{mochiweb_socket_server,init,['Argument__1']}},
{pid,<0.103.0>},
{registered_name,[]},
{error_info,
{exit,eaddrinuse,
[{gen_server,init_it,6,
[{file,"gen_server.erl"},{line,320}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,239}]}]}},
{ancestors,
[couch_secondary_services,couch_server_sup,<0.31.0>]},
{messages,[]},
{links,[<0.93.0>]},
{dictionary,[]},
{trap_exit,true},
{status,running},
{heap_size,987},
{stack_size,27},
{reductions,594}],
[]]}}
{"init terminating in do_boot",{{badmatch,{error,{bad_return,{{couch_app,start,[normal,["/opt/local/etc/couchdb/default.ini","/opt/local/etc/couchdb/local.ini"]]},{'EXIT',{{badmatch,{error,{shutdown,{failed_to_start_child,couch_secondary_services,{shutdown,{failed_to_start_child,httpd,eaddrinuse}}}}}},[{couch_server_sup,start_server,1,[{file,"couch_server_sup.erl"},{line,98}]},{application_master,start_it_old,4,[{file,"application_master.erl"},{line,269}]}]}}}}}},[{couch,start,0,[{file,"couch.erl"},{line,18}]},{init,start_it,1,[]},{init,start_em,1,[]}]}}

Crash dump was written to: erl_crash.dump
init terminating in do_boot ()

please help,

@janl
Copy link
Contributor

janl commented Mar 10, 2014

@Hussein1147 Your error message is distinctly different :)

The solution is in the first line:

Error opening log file /opt/local/var/log/couchdb/couch.log: permission denied

Make sure that the file has write permissions for the user you are starting CouchDB with.

This tends to happen when you try starting CouchDB with sudo first and later without.

@Hussein1147
Copy link

@janl Hey! Thanks for writing back, i have set the permissions now its loging this message, im not sure if its a problem with Mochiweb

Failure to start Mochiweb: eaddrinuse
{"init terminating in do_boot",{{badmatch,{error,{bad_return,{{couch_app,start,[normal,["/opt/local/etc/couchdb/default.ini","/opt/local/etc/couchdb/local.ini"]]},{'EXIT',{{badmatch,{error,{shutdown,{failed_to_start_child,couch_secondary_services,{shutdown,{failed_to_start_child,httpd,eaddrinuse}}}}}},[{couch_server_sup,start_server,1,[{file,"couch_server_sup.erl"},{line,98}]},{application_master,start_it_old,4,[{file,"application_master.erl"},{line,269}]}]}}}}}},[{couch,start,0,[{file,"couch.erl"},{line,18}]},{init,start_it,1,[]},{init,start_em,1,[]}]}}

Crash dump was written to: erl_crash.dump
init terminating in do_boot ()

1 similar comment
@Hussein1147
Copy link

@janl Hey! Thanks for writing back, i have set the permissions now its loging this message, im not sure if its a problem with Mochiweb

Failure to start Mochiweb: eaddrinuse
{"init terminating in do_boot",{{badmatch,{error,{bad_return,{{couch_app,start,[normal,["/opt/local/etc/couchdb/default.ini","/opt/local/etc/couchdb/local.ini"]]},{'EXIT',{{badmatch,{error,{shutdown,{failed_to_start_child,couch_secondary_services,{shutdown,{failed_to_start_child,httpd,eaddrinuse}}}}}},[{couch_server_sup,start_server,1,[{file,"couch_server_sup.erl"},{line,98}]},{application_master,start_it_old,4,[{file,"application_master.erl"},{line,269}]}]}}}}}},[{couch,start,0,[{file,"couch.erl"},{line,18}]},{init,start_it,1,[]},{init,start_em,1,[]}]}}

Crash dump was written to: erl_crash.dump
init terminating in do_boot ()

@janl
Copy link
Contributor

janl commented Mar 10, 2014

Failure to start Mochiweb: eaddrinuse

that’s a standard unix message that says that the port your CouchDB is configured to bind to is already in use.

@Hussein1147
Copy link

I think i have to change the port in the /etc/couchdb/couch.ini no?

@janl
Copy link
Contributor

janl commented Mar 10, 2014

maybe check if CouchDB is already running in an older instance. The standard port (5984) should not be used by any other programme.

@Hussein1147
Copy link

@janl Thank you so much!!!

@Homebrew Homebrew locked and limited conversation to collaborators Feb 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests