Content
You are here:
Cant connect to openproject on port 3000
Added by steven branigan over 10 years ago
Hi,
I’m new to openproject and have just finished the install of 3.0 on an Ubuntu Server 12.04 box. However, when I try to connect to the localhost:3000 port I just get a timeout message.
I know that the server is accepting connections because I can connect from a windows client with putty.
Is there something that I have missed?
Any help would be greatly appreciated.
Thanks,
Steve
Replies (21)
Hello Steven,
just two questions for clarification:
Kind regards,
Hagen
I use these instructions:
https://www.openproject.org/projects/openproject/wiki/Installation_Ubuntu
And, I am assuming that the final command, “bundle exec rails server”, starts the server?
I also added these lines after in an attempt to get the server started..
RAILS_ENV=“production” bundle exec rake db:migrate
RAILS_ENV=“production” bundle exec rake db:seed
RAILS_ENV=“production” bundle exec rake assets:precompile
Which I found here:
https://www.openproject.org/topics/542
What do you reckon I’ve done wrong? or missed?
Hi Steven,
the steps look alright. Here are some more points to check:
log/production.log
)?Kind regards,
Hagen
Hagen,
I will check log/production.log first thing in the morning and report back. But as far as I could tell everything installed without error.
Yes, I did an ifconfig and used the ipaddress:3000 to connect from the windows host.
Thanks for you help,
Regards,
Steve
Hagen,
I checked the production.log this morning. I had saved the state of the VM before running the shutdown command so I am assuming that when I brought the server back up this morning that the log would have returned to its original state.
The only entries in that log are:
Connecting to database specified by database.yml
Connecting to database specified by database.yml
Connecting to database specified by database.yml
Connecting to database specified by database.yml
Connecting to database specified by database.yml
Connecting to database specified by database.yml
So it doesn’t look like there were any errors when I went through the setup steps. Any ideas? Is there somewhere I can check whether the port 3000 is correct? Is there a chance is accepting on another port? I have checked the iptables and they are completely unconfigured so they should be accepting connections on all ports.
Plus as I said I managed to successfully connect using putty on the windows host machine.
I’d love to get openproject up and running. I am itching to get my project team using it so that we can test it out and possibly offer it as a solution to anyone in the company that would be interested in using it.
Thanks for your help here too,
Regards,
Steve
Hi Steven,
if you start the rails server with
bundle exec rails server
you should get a promt like this:Here you can check the port. To start the server with a port of your choice you can do it like this:
To check if the server is working run the following command in a terminal of your VM:
If everything works you should see the HTML source of the OpenProject landing page.
Best
Ratzi
PS: If you plan to run OpenProject in production you should not use the build in Thin webserver. We recommend a setup with Apache or Nginx together with Phusion Passenger
Me again ;)
If you start the server without @ RAILS_ENV=“production” @ you run OpenProject in development mode and you have to check the development log (log/development.log).
Best
Ratzi
Christian,
Thanks, will give those things a try. Maybe that is where I messed up. Setting the server up as a web server is not included in the step by step setup guide. I did set it up as a LAMP server after the ruby/rails install.
Do you think I should go with Apache + Phusion Passenger first, then install ruby/rails openproject?
Thanks for the help,
Really appreciate it.
Regards,
Steve
Hi,
you can install Apache and Phusion Passenger in your existing VM and use it with your current OpenProject installation you don’t have to start from scratch.
You can find a howto for the apache2/passenger installation/configuration here
This howto is for Debian but the steps should be the same except the ‘Install necessary packages’ part.
Best
Ratzi
Did you get it to work now?
Best
Ratzi
Christian,
No, I managed to get to the httpd.conf file and enter the edits:
LoadModule passenger_module /home/openproject/.rvm/gems/ruby-2.1.0/gems/passenger-4.0.37/buildout/apache2/mod_passenger.so
<IfModule mod_passenger.c>
PassengerRoot /home/openproject/.rvm/gems/ruby-2.1.0/gems/passenger-4.0.37
PassengerDefaultRuby /home/openproject/.rvm/gems/ruby-2.1.0/wrappers/ruby
The only problem now is that when I run the service, which is slightly different in Ubuntu Server 12.04, the command is “service apache2 start” I get the following error:
apache2: Syntax serror on line 214 of /etc/apache2/apache2.conf: Syntax error on
line 1 of /etc/apache2/httpd.conf: Cannot load /home/openproject/.rvm/gems/ruby-
2.1.0/gems.passenger-4.0.37/buildout/apache2/mod_passenger.so into server: /home
/openproject/.rvm/gems/ruby-2.1.0/gems/passenger-4.0.37/biuldout/apache2/mod_pas
senger.so: cannot open shared object file: No such file or directory
Action ‘start’ failed
The Apache error log may have more information
[fail]
So, right now I am trying to figure out the problem. Yes, there is no directory “/.rvm/” in openproject directory so I can see why that is failing. I think I need to make some changes to the entry for that file so that it suits how passenger installs in Ubuntu. I don’t know, I am relatively new to this so I am learning.
Any help would be greatly appreciated though.
Thanks mate,
Regards,
Steve
At the end of passenger-install-apache2-module the script will promt you the correct lines depending on your rvm installation folder, may be you can find the output in the shell history.
If you installed rvm in the ‘/home/openproject/.rvm’ folder it should work with the lines from the howto obviously you don’t so you have to change the path to your rvm installation.
E.g.:
Get the path to rvm
Adapt http config:
Best
Ratzi
The /.rvm/ path was /home/openproject/.rvm/
I corrected the httpd.conf as you suggested. I am still getting the same error as before.
I have narrowed it down to the passenger install directory. /passenger-4.0.37/ doesn’t exist. I have installed passenger-4.0.41, but there is no sub directory /buildout/
So,
/home/openproject/.rvm/gems/ruby-2.1.0/gems/passenger-4.0.41/…
There is a directory in this called /build/, but there is no sub-directory called apache2. There is a file called apache2.rb
I’ve vi’d into this file and the first lines are:
APACHE2_MODULE = APACHE2_OUTPUT_DIR + “mod_passenger.so”
APACHE2_MODULE_INPUT_FILES = {
APACHE2_OUTPUT_DIR + ‘Configuration.o’ => %w(…. and on
I think this might be what we are looking for?
Regards,
Steve
You can just re run ‘passenger-install-apache2-module’ and copy the lines from the script output so you don’t have to search the files by hand.
After you added the lines to the http.conf restart Apache an OpenProject should be available under the default HTTP port 80 running in production mode.
Best
Ratzi
Ok,
So I’ve written the following changes to httpd.conf in /etc/apache2/:
LoadModule passenger_module /home/my_user/.rvm/gems/ruby-2.1.0/gems/passenger-4.0.41/build/apache2.rb
<IfModule mod_passenger.c>
PassengerRoot /home/my_user/.rvm/gems/ruby-2.1.0/gems/passenger-4.0.41
PassengerDefaultRuby /home/my_user/.rvm/gems/ruby-2.1.0/wrappers/ruby
Now the error I get when I try sudo service apache2 start is:
apache2: Syntax error on line 214 of /etc/apache2/apache2.conf: Syntax error on
line 1 of /etc/apache2/httpd.conf: Cannot load /home/openproject/.rvm/gems/ruby-2.1.0/gems/passenger-4.0.41/build/apache2.rb into server: /home/openproject/.rvm
/gems/ruby-2.1.0/gems/passenger-4.0.41/build/apache2.rb: invalid ELF header
Action ‘start’ failed.
The Apache error log may have more information.
[fail]
I’ve tried to get into /var/log/apache2/ to have a look at the error file but permission was denied.
Regards,
Steve
Christian Ratz wrote:
Sorry,
Ignore my previous comment. I will try what you have suggested.
Thanks again.
Steve
Just getting the apache “It Works”.html when I browse to localhost:80
But at least the apache2 server is running..
Thanks,
Steve
I am delighted to say that once I recycled my server the phusion passenger error page once I connected remotely to host:80.
Getting very close now.
Thank you Christian and Hagen. Really appreciate all the help you guy’s have offered up. I hope now I get over the next hurdle and begin to test this and eventually roll it out.
Thanks again
and
Best Regards,
Steve
my error is : curl: (7) couldn’t connect to host,when run “curl localhost:3000” command, why?
I know it’s an old topic, but for the people who suffer from the same problem. My OpenProject is running on port 6000 in production.