Plots2: "Address already in use - listen(2) (Errno::EADDRINUSE)" when running 'passenger start' on WSL Debian.

Created on 28 Mar 2018  Â·  16Comments  Â·  Source: publiclab/plots2

Likely to do with Passenger not supporting WSL,
https://github.com/phusion/passenger/issues/2036

There's a patch here https://github.com/phusion/passenger/pull/2037/files but that's for version 5.2 which doesn't work with publiclab(I tried). I am not experienced enough with ruby and my own patched version of 5.1.12 failed to run after I built it.

A possible solution for me could be being able to use passenger 5.2 (the patched version runs by itself but not with publiclab.)

What happened just before the problem occurred? Or what problem could this idea solve?

Followed the instructions and ran "passenger start"

What did you expect to see that you didn't?

Expected to see the publiclab wiki page in the browser at localhost:3000. Instead saw an error page.

OS and browser

Windows 10, Debian stretch on WSL, Firefox Nightly (61.0a1)


help wanted

Most helpful comment

@gptshubham595 I was able to solve the Address Already in Use error on WSL by manually editing passenger with this (not yet merged, but it worked for me):
https://github.com/phusion/passenger/pull/2037/commits

Now I'm getting a different error:

ActiveRecord::StatementInvalid in Home#home

Showing /home/jcrabb/Projects/plots2/app/views/layouts/application.html.erb where line #37 raised:

SQLite3::SQLException: cannot rollback - no transaction is active: rollback transaction

Will update if I find a fix.

All 16 comments

Hi, is it possible you already have an instance of Passenger running on
port 3000 (the default)? Could you try passenger start -p 3001 and going
to https://localhost:3001 ?

Thanks!

On Wed, Mar 28, 2018 at 9:03 AM, r0vina notifications@github.com wrote:

Likely to do with Passenger not supporting WSL,
phusion/passenger#2036 https://github.com/phusion/passenger/issues/2036

There's a patch here https://github.com/phusion/passenger/pull/2037/files
but that's for version 5.2 which doesn't work with publiclab(I tried). I am
not experienced enough with ruby and my own patched version of 5.1.12
failed to run after I built it.

A possible solution for me could be being able to use passenger 5.2 (the
patched version runs by itself but not with publiclab.)

What happened just before the problem occurred? Or what problem could this
idea solve?

Followed the instructions and ran "passenger start"

What did you expect to see that you didn't?

Expected to see the publiclab wiki page in the browser at localhost:3000.
Instead saw an error page.

OS and browser

Windows 10, Debian stretch on WSL, Firefox Nightly (61.0a1)

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/2552, or mute the thread
https://github.com/notifications/unsubscribe-auth/AABfJxzHy_ZA2XqI-z-a6JxLP11NTfrIks5ti4omgaJpZM4S-mv6
.

Tried that, still the same. It runs fine in the terminal, but once I access the webpage
error

@publiclab/solvers
I'm running into this error when trying to run plots 2 locally with ubuntu. I'm not running an application at that address. I've shut down any processes and ran a command that should've given me any running processes and from what I can tell it doesn't seem anything is running.

image

I also tried using the command sof -wni tcp:3000 but that didn't return anything. I even changed the port when running passenger as @jywarren suggested but that didn't work either.

This is the the error:
image

Has anyone run into this problem? What am I missing?

OK! you can try to run passenger stop -p 3001 or whatever port number, to find and kill any stray processes, and if that doesn't work, you may look for 3001.pid or something similar in the local directory -- because maybe there's no process already running, and you just need to remove the lock file?

Finally, i think i remember when we were looking at Windows "WSL" setup that if it doesn't think it has permission to run on a port #, it will say this EADDRINUSE thing, but actually it's not in use -- it's just not able to use that port for some reason. You might try searching for EADDRINUSE WSL rails to see if others have that problem?

Hello, I've been working on this for the past hour and still no success. I tried all the suggestions and in googling EADDRINUSE WSL rails I ran into using puma to run the application instead of webrick. I used this command "RAILS_ENV=production bundle exec rails s" and then this command "rails s -b 0.0.0.0 -p 3000" which booted with Puma but now I have another error:
image
I've researched this as well but it seems I'd have to add certain gems and import them, change file names to achieve correcting the situation which I don't think we should be doing. Just an update. I'll keep trying but if there are any other ideas, I would appreciate them.

This last one may be because you need to install your javascript assets
with "yarn install"?

On Fri, Jun 14, 2019 at 12:13 PM rarrunategu1 notifications@github.com
wrote:

Hello, I've been working on this for the past hour and still no success. I
tried all the suggestions and in googling EADDRINUSE WSL rails I ran into
using puma to run the application instead of webrick. I used this command
"RAILS_ENV=production bundle exec rails s" and then this command "rails s
-b 0.0.0.0 -p 3000" which booted with Puma but now I have another error:
[image: image]
https://user-images.githubusercontent.com/29240939/59522788-8bebb200-8e9d-11e9-803d-f88c429d2c2d.png
I've researched this as well but it seems I'd have to add certain gems and
import them, change file names to achieve correcting the situation which I
don't think we should be doing. Just an update. I'll keep trying but if
there are any other ideas, I would appreciate them.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/2552?email_source=notifications&email_token=AAAF6J4HUOPLPWIAKC3BXWLP2O7SFA5CNFSM4EX2NP5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXXICPY#issuecomment-502169919,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAAF6JY3G6QBGJ3JJFRQMT3P2O7SFANCNFSM4EX2NP5A
.

I did have yarn installed but I was missing some steps so after doing the install correctly, it fixed the issue.....and gave me another one.

image

I just don't know what to do with this. Researching doesn't return anything I can use. I'm currently googling "running wsl rails app @' is not allowed as an instance variable". Maybe it's something that has to do with the initial setup that is making this difficult.

Darn, i recognize this! Ummm.
https://github.com/publiclab/plots2/issues/4396 maybe?
https://stackoverflow.com/questions/27364081/ruby-on-rails-nameerror-not-allowed-as-an-instance-variable-name
linked
from there...

On Fri, Jun 14, 2019 at 1:41 PM rarrunategu1 notifications@github.com
wrote:

I did have yarn installed but I was missing some steps so after doing the
install correctly, it fixed the issue.....and gave me another one.

[image: image]
https://user-images.githubusercontent.com/29240939/59527023-78921400-8ea8-11e9-88e8-5b94395260b0.png

I just don't know what to do with this. Researching doesn't return
anything I can use. I'm currently googling "running wsl rails app @' is not
allowed as an instance variable". Maybe it's something that has to do with
the initial setup that is making this difficult.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/2552?email_source=notifications&email_token=AAAF6J4ODHRJGLTFCDDA7K3P2PJZJA5CNFSM4EX2NP5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXXPS6Q#issuecomment-502200698,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAAF6JYPH7IYIMRUAT56JP3P2PJZJANCNFSM4EX2NP5A
.

I'm all set. It was a yarn installation error that I hadn't noticed before. Now it's installed correctly and I can run my application just fine. Thank you @gauravano for your help. I truly appreciate you.

We can close this issue now. Right?

I believe so, unless it was an issue that stayed open for a reason like the installations issue. I didn't open it therefore I wasn't sure if we were supposed to close it.

Seems like it's been solved, closing.

@rarrunategu1 can you tell how you solved

@gptshubham595 I was able to solve the Address Already in Use error on WSL by manually editing passenger with this (not yet merged, but it worked for me):
https://github.com/phusion/passenger/pull/2037/commits

Now I'm getting a different error:

ActiveRecord::StatementInvalid in Home#home

Showing /home/jcrabb/Projects/plots2/app/views/layouts/application.html.erb where line #37 raised:

SQLite3::SQLException: cannot rollback - no transaction is active: rollback transaction

Will update if I find a fix.

@jairus-crabb patch worked for me. thanks!

_PASSENGER_FORCE_HTTP_SESSION=true passenger start -p 3000 this command helped me to resolve the issue

Was this page helpful?
0 / 5 - 0 ratings

Related issues

divyabaid16 picture divyabaid16  Â·  3Comments

keshavsethi picture keshavsethi  Â·  3Comments

milaaraujo picture milaaraujo  Â·  3Comments

keshavsethi picture keshavsethi  Â·  3Comments

first-timers[bot] picture first-timers[bot]  Â·  3Comments