Forums / Install & configuration / Linux Installer: "Connection refused"

Linux Installer: "Connection refused"

Author Message

Terje J. Hanssen

Sunday 03 April 2005 11:20:11 am

Hello everyone,

This is my first attempt to install and test eZ publish. I downloaded the Linux Installer on Suse Linux 9.1 Pro, and next unpacked the tar.gz file /opt/ezpublish/ezpublish-3.5.1-Linux-STABLE.i386.tar.gz

I tried to follow the installation instructions in the README file. That is as root "su -" in a terminal window run the install script and selected the default suggestions, including port no 8085 for Apache. Afterwards I set the root password for MySQL.

However, trying to connect with web browsers (Mozilla 1.7.5, Opera 8 beta, Konqueror 3.2.1) using the url "http://localhost:8085", they all refused with a message like "The connection was refused when attempting to contact localhost:8085".

What can be wrong? On Suse9.1 I tried to enable the Yast2 HTTP server and set it to listen on port 8085. But still I couldn't get the browser to connect to the server.
Is this a known missing Linux setup problem or a installer problem? How to troubleshoot it?

Rgds,
Terje J. Hanssen

Jack Rackham

Sunday 03 April 2005 11:46:01 am

Well with this limited information it's hard to say what's wrong with your Suse 9 system.
Have you remembered to open port 8050?

Terje J. Hanssen

Sunday 03 April 2005 3:04:34 pm

Maybe a little progress:

I re-enabled the http server, added listen to ports 8085 and 8050, checked Customize the firewall and rebooted.
Then, trying http://localhost:8085/ on Mozilla, Opera and Konqueror all do present a "Test page for Apache Installation"!

According to the last eZ installation widget and in the manual, the eZ publish Setup Wizard should be presented.
How can it possibly be manually loaded now?

The Apache test page tells:
"If you can see this, it means that the installation of the Apache web server software on this system was successful. You may now add content to this directory and replace this page.
Seeing this instead of the website you expected?
This page is here because the site administrator has changed the configuration of this web server. Please contact the person responsible for maintaining this server with questions ..." etc

Is "opening" the port 8050 as suggested the same as setting the http server to "listen" to this port?
And how to possibly secure the ports from outside access, as long as this should be a test on the localhost only?

Sten Thorstensen

Monday 04 April 2005 1:53:35 am

Hey Terje!

As you mention, you are using the installer package, which is a complete package (with all needed software) of eZ publish meant for testing. This package includes a pre-configured installation of Apache running on the ports you choose during the installation, and the reason you have this problem is because (as you also mentioned) installed another web server, running on the same ports. Try to kill all servers running on the selected ports (8050 and 8085?) and then start the eZ publish installation package with:

$ /opt/ezpublish/bin/ezpublish start

Please note: If you just wants to look at eZ publish for testing, you can also have a look at the eZ publish live CD, which is a bootable cd-image containing a complete Mandrakelinux based system pre-configured and ready to run eZ publish.

-Sten Thorstensen

Terje J. Hanssen

Tuesday 05 April 2005 6:18:45 am

Hello Sten,

Thank you for your suggestions. As I have not used these packages before, I was neither aware of that both Apache2, MySQL and PHP were included with my Suse9.1Pro "Full distro" installation.
Well, to be "sure", I therefore have deleted all these packages from the rpm database using the Yast2 tool.

I also run the eZ publish bundle install script again, and uninstalled everything. Then rebooted and started a new eZ bundle installation from schratch, as mentioned in my previous post.

1) But sorry, still I get "only" a Test page for the Apache installation displayed in Mozilla, when using the url http://localhost:8085/

2) Entering your command as normal user in a terminal displays the following messages (this doesn't open a browser window; trying it manually as 1) above, still displays the Apache test page):

> /opt/ezpublish/bin/ezpublish start

"Starting MySQL.../opt/ezpublish/bin/ezpublish: line 34: /opt/ezpublish/mysql-4.1.10/logs/eZ_mysqld.log: Ikke tilgang
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
050405 14:12:14 InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
050405 14:12:16 InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
050405 14:12:17 InnoDB: Log file ./ib_logfile1 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
050405 14:12:18 InnoDB: Started; log sequence number 0 0
/opt/ezpublish/mysql-4.1.10/libexec/mysqld: ready for connections.
Version: '4.1.10' socket: '/opt/ezpublish/mysql.sock' port: 3400 Source distribution
done
Starting Apache.../opt/ezpublish/bin/ezpublish: line 16: /opt/ezpublish/apache_1.3.33/logs/eZ_apache.log: Ikke tilgang
done"

3) I also tried the same command as root (su -) in the terminal (this doesn't open a browser window; trying it manually as 1) above, still displays the Apache test page):

# /opt/ezpublish/bin/ezpublish start

"Starting MySQL...InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
050405 14:12:14 InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
050405 14:12:16 InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
050405 14:12:17 InnoDB: Log file ./ib_logfile1 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
050405 14:12:18 InnoDB: Started; log sequence number 0 0
/opt/ezpublish/mysql-4.1.10/libexec/mysqld: ready for connections.
Version: '4.1.10' socket: '/opt/ezpublish/mysql.sock' port: 3400 Source distribution
050405 14:57:45 [ERROR] Can't start server: Bind on TCP/IP port: Address already in use
050405 14:57:45 [ERROR] Do you already have another mysqld server running on port: 3400 ?
050405 14:57:45 [ERROR] Aborting
050405 14:57:45 [Note] /opt/ezpublish/mysql-4.1.10/libexec/mysqld: Shutdown complete
done
Starting Apache...done"

And now I am not able to use the Yast2 gui tool to configure the HTTP server or port (it require some of Apace2 to be reinstalled).

Therefore, I need the commands to try more! Hopefully I get more suggestions troubleshoot and solve this problem?

Terje J. Hanssen

Petter Neumann

Tuesday 05 April 2005 7:51:03 am

For testing I suggest you just do a normal EZ installation in your "public_html" folder on your Suse Linux 9.1 Pro box. Just follow the normal install instructions, and unpack EZ in your "public_html" folder. Connect to http://localhost/~yourusername. and follow the install wizard. If Apache and mysql is installed with default options, this should work without problems on Suse Linux 9.1 Pro.

/ Petter

Terje J. Hanssen

Sunday 10 April 2005 1:01:03 pm

Petter,

Thank you for your suggestion.
I removed the bundled to prepare a normal eZ publish installation.

1) First I reinstalled the following rpm packages on Suse Linux 9.1Pro with YaST2:
* Apache 2.0.49
* MySQL 4.0.18
* PHP 4.3.4
* phpMyAdmin 2.5.6

2) To start MySQL at bootup, and created a symbolic link according to the /usr/share/doc/packages/mysql/README.SuSE:

# /sbin/insserv /etc/init.d/mysql
I rebooted but I'm not sure MySQL started as it should

3) According to eZ publish's first installation procedure, I tried to login as root (to create a database next), but got the following error:

# mysql -u root -p <mysql_password>
Enter password: <mysql_password>
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

What can be wrong here?
Has e.g MySQL's internal database (mysql) been set up is it should during the default installation?
Is there any users set up and possibly is there already a default root password?

Terje

Petter Neumann

Sunday 10 April 2005 1:33:35 pm

Terje, in Yast, go to system -> runlevel editor and check that MySql is enabled and rinning, if not you will have to do so there. If you cant figure out this , I can try to guide you by phone if you post a phone number i can reach you.

/ Petter

Terje J. Hanssen

Sunday 10 April 2005 1:33:43 pm

I will add the following as the same error still occures:

# mysql
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

I verified that '/var/lib/mysql/mysql.sock' did not exist.
Below is however the content of /var/lib/mysql/mysqld.log *)
And where is e.g. the boot log file located to verify the messages I saw regarding startup of MySQL?

Have I missed some steps that need to done after the Yast2 installation?
Can possibly phpMyAdmin be used for this troubleshooting?

Terje

*)
# cat /var/lib/mysql/mysqld.log
050410 20:54:09 mysqld started
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
050410 20:54:10 InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
050410 20:54:11 InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
050410 20:54:12 InnoDB: Log file ./ib_logfile1 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
050410 20:54:15 InnoDB: Started
050410 20:54:15 Fatal error: Can't open privilege tables: Table 'mysql.host' doesn't exist
050410 20:54:15 Aborting

050410 20:54:15 InnoDB: Starting shutdown...
050410 20:54:19 InnoDB: Shutdown completed
050410 20:54:19 /usr/sbin/mysqld-max: Shutdown Complete

050410 20:54:19 mysqld ended

Terje J. Hanssen

Sunday 10 April 2005 5:24:05 pm

Petter,
I think I found some of the problem and (partly) solved it. For one or another reason (ADSL router, Ethernet switch or ISP dns), the dhcp doesn't look to provide a properly hostname in the initial boot process.
When I manually configured my Ethernet interface with Yast2 and put in the right hostname (default was linux) and rebooted, then the internal mysql internal database was set up during startup.

Then I also was able to create a root password for mysql, log in as root and create a database for eZ publish.
I unpacked eZ publish to /home/terje/public_html which created a folder ezpublish-3.5.1. However I got "connection refused" again when trying this url in Mozilla:
http://localhost/~terje/public_html/ezpublish-3.5.1/index.php

Is this a wrong url and how does I possibly verify if this directory really is web-served?

I checked with Yast2 System>Run level editor that mysql was running. However, Apache2 was not running and I enabled it. But still I am not able to start the eZ publish wizard.
Suggestion?

Terje

Petter Neumann

Monday 11 April 2005 1:10:46 am

Terje, you use wrong url.
the URL should be http://localhost/~terje/ezpublish-3.5.1/index.php

and not
http://localhost/~terje/public_html/ezpublish-3.5.1/index.php

the URL http://localhost/~terje/ is using the public_html/ directory of the user terje as webroot.

/ Petter

Terje J. Hanssen

Monday 11 April 2005 2:24:52 am

Petter,
Thank you, I will try this url later after work today on my home PC. However, when I didn't get it to work, I tried various url alternatives, maybe also that you mentione.

Browsing to the same file with Konqueror file manager showed me the filename file:/home/terje/public_html/ezpublish-3.5.1/index.php
And in normal unix path syntax ~ = /home/terje in my case.
Therefore I think it looks some confusing or remarkable to use ~terje/ezpublish-3.5.1/index.php
in this case.
That is, "~terje" is equivalent to the unix path "~/public_html"
Is this a correct understanding?

And is there some way to verify the the public_html directory is set up and web-serviced by Apache?

Terje

Petter Neumann

Monday 11 April 2005 7:17:48 am

Terje !
Since you has unpacked the Ez files in a subfolder in the webroot named /ezpublish-3.5.1/ the URL will be
http://localhost/~terje/ezpublish-3.5.1/index.php
If you move all the files from the ezpublish-3.5.1 folder and place them directely in your webroot the URL will be http://localhost/~terje/index.php
<b> "~terje" </b> is equivalent to the unix path "~/public_html" for the useraccount terje (/home/terje/public_html) If you want to acess your site by DNS domanin name ( http://www.mysite.com ), you just configue this by pointing the webroot of your virtual host to the directory containing your EZ instalation.

/ Petter

Terje J. Hanssen

Monday 11 April 2005 11:48:20 am

Petter,

Sorry, the url still does not start the eZ publish setup wizard.

1) First I tried http://localhost/~terje/ezpublish-3.5.1/index.php
and got similar connection refused as 2) below

2) Next I copied all files from "ezpublish-3.5.1" to "public_html" and tried http://localhost/~terje/index.php
but this resulted in error messages:
Mozilla: "!The connection was refused when attempting to contact localhost."
Opera: "Could not connect to remote server. You tried to access the address http://localhost/~terje/index.php, which is currently unavailable."
Konqueror: "An error occurred while loading http://localhost/~terje/index.php:
Could not connect to host localhost"

3) With another test using http://localhost:8085/ displayed the "Test page for Apache Installation" telling on the first line:
"If you can see this, it means that the installation of the Apache web server software on this system was successful. You may now add content to this directory and replace this page."

4) I also get this Apache test page displayed if I browse with the Konqueror file manager to file:/srv/www/htdocs/index.html.en

5) But if I try Konqueror with http://localhost/~htdocs/index.html.en
nothing else than this is displayed;
"An error occurred while loading http://localhost/~htdocs/index.html.en:

Therefore I wonder

1) If the above directories really are enabled as "web-seviced" (published) by Apache, and if there is some tests to verify it? Do I need to enable the http service and set the portnumber to be listened to with Yast2?

2) Maybe "localhost" does not work because there still can be some missing with my dhcp, hostname or network configuration? I think I saw something like resolv.conf could not be found during the boot process.

Terje

Terje J. Hanssen

Wednesday 13 April 2005 5:18:07 am

I have made progress and think I have been able to create a basic database and get the web server running.

I have had a lot of trouble to get the url "http:localhost" to connect to the Apache test page, while adding port number like the previous ":8085" or ":8080" did work.
But at last I happened to try "http://localhost:80" and suddenly some(thing) (re)setting happened. Mozilla automatically changed this url automatically to "http://localhost" and displayed the Apace test page. After this also the latter url did work in Opera and Konqueror.

Now also the eZ publish setup wizard is started and displayed as it should, without the previous need to add port number in these alternative urls:
http://localhost/~terje/ezp/index.php
http://localhost/~terje/ezp

From this experience it looks like the url "http://localhost" doesn't work at once, not at least when another port number has been used in the browser previously.

Any idea or suggestion how and where to set "http://localhost" to work directly?

I had some problems to find the right entries in long file /etc/services. I just wonder if port setting with the Yast2 http service tools also edits both /etc/Apache2/listen.conf and /etc/services?

Terje