Squiz Server issues

Hi,


We have managed to get Matrix up and running, and are now trying to get Squiz Server to operate correctly.



We have installed as per the instructions, but it does not seem to be operating correctly.



We are able to lock for editing, and make simple changes to settings, but whenever we try to edit permissions, or clone a page we get the following error message:



----------------------

PHP Warning

socket_connect() unable to connect [111]: Connection refused



MySource Warning

Could not connect : Msg: Connection refused / Code: 111



Edit Permissions HIPO Error Report

( HIPO job was not completed )



Continue >>

----------------------



If we go to run the service again, we get the error message:



----------------------



Warning: Could not bind socket to localhost on port 9090 (Msg: Address already in use / Code: 98). in /usr/local/squiz_server/code/squiz_server.inc on line 292



----------------------



but we figure that this error is occuring because the service is already running (thus port 9090 is already in use).



Any ideas what we need to do here?



Thanks,



David

Are you running a firewall on your server? You may be blocking port 9090, even from localhost. :slight_smile: Also, make sure your server.conf file details match the Squiz Server configuration details within Matrix.

Hi Avi,


Thanks for your reply.



We had set the Squiz Server configuration in Matrix to look for port 9091 (not 9090). Once I changed this, all seems to be working fine.



Just another quick question;



We've heard that there is a script located in the scripts directory that will configure the cron manager to run. We have had a look, but cannot locate it. Where will we find it?



Thanks,



David

You just need to call mysource_matrix/core/cron/run.php every 15 minutes.
For example, you could add this to crontab:


    */15 * * * * root /usr/bin/php /var/www/matrix/core/cron/run.php


Obviously, changing the path accordingly. :) You may want to make the Cron Job run as the same user as the Squiz Server as well.

Also for the Cron Manager, make sure that you go into the Options screen in System Management > Cron Manager and set the Epoch to be the first time that the cron/run.php ran.


Just so that the times are right when selecting a time for the cron to run.

Thanks Avi and Blair :slight_smile:

[quote]----------------------
PHP Warning 

socket_connect() unable to connect [111]: Connection refused 



MySource Warning 

Could not connect : Msg: Connection refused / Code: 111 



Edit Permissions HIPO Error Report

( HIPO job was not completed ) 



Continue >> 

----------------------

[right][post=“2911”]<{POST_SNAPBACK}>[/post][/right][/quote]



We have also installed Matrix on Solaris/Oracle but are receiving the above errors when we try to acquire any locks with squiz server turned on - it is fine with squiz server turned off.



When we restart squiz server (from the command line) the log contains the following error:


       Notice: Unable to register system "0", the system_type and system_root are not set in 
       /mnt/apps/squiz_server/code/squiz_server.inc on line 223


Our server.conf file looks like this:
    $systems = Array(
            $systems = Array(
                    'test1'  => Array(
                            'system_type' => 'MySource3',
                            'system_root' => '/apps/mysource_matrix',
                    )
            )
    );
           $lockfile = '/var/run/squiz_server.pid';


We seem to be having trouble with system_type and system_root - does the above look ok?

Thanks,
Sarah

Your server.conf should look like:

    <?php
    
    $systems = Array(
                'matrix' => Array(
                            'system_type' => 'MySource3',
                            'system_root' => '/path/to/matrix',
                ),
    );
    
    ?>

Thanks - that has gotten rid of the error out of the log and squiz server is starting without errors.


Unfortunately still when we acquire any locks we get the following errors and we don't receive them when squiz server is not set to run in the HIPO configuration:


    PHP Warning  
    socket_connect() unable to connect [111]: Connection refused  


    MySource Warning  
    Could not connect : Msg: Connection refused / Code: 111  


    Edit Permissions HIPO Error Report
    ( HIPO job was not completed )  
    Continue >>  


Any other ideas?

Sarah

Silly question first: Is the port you're starting the Squiz Server on the same as the one you've configured in the Squiz Server Configuration in Matrix? Also, the System Name must match the server.conf.

[quote]Silly question first: Is the port you’re starting the Squiz Server on the same as the one you’ve configured in the Squiz Server Configuration in Matrix? Also, the System Name must match the server.conf.
[right][post=“6867”]<{POST_SNAPBACK}>[/post][/right][/quote]



Yep and yep.



Our initialisation script specifies port 9097 and we also have 9097 specified on the Matrix Squiz Server configuration screen.



We have cms set as the system name in server.conf and on the Matrix System Configuration screen.

Also note that the server names have to be identical too - typically this will be 'localhost' for both; if you started the Squiz Server using a certain host name you have to use the same host name in the Squiz Server config - if you're using a 'real' domain name in one place and 'localhost' in another then it won't work.

[quote]Also note that the server names have to be identical too - typically this will be ‘localhost’ for both; if you started the Squiz Server using a certain host name you have to use the same host name in the Squiz Server config - if you’re using a ‘real’ domain name in one place and ‘localhost’ in another then it won’t work.
[right][post=“6872”]<{POST_SNAPBACK}>[/post][/right][/quote]



I believe we are starting the Squiz Server using localhost.



On the Matrix Squiz Server configuration screen none of the values (System Root, System ID, Domain…) are set to localhost. I tried changing the System ID to localhost but this did not work.



Sarah

From your configuration, the Squiz Server configuration screen should look like this:


System Root: /usr/local/squiz_server

System ID: cms

Domain: localhost

Port: 9097



Though, that suggests to me that "Domain" should be renamed to "Hostname" for clarity.

[quote]From your configuration, the Squiz Server configuration screen should look like this:


System Root: /usr/local/squiz_server

System ID:   cms

Domain:   localhost

Port: 9097



Though, that suggests to me that “Domain” should be renamed to “Hostname” for clarity.

[right][post=“6877”]<{POST_SNAPBACK}>[/post][/right][/quote]



Great thanks - it has improved things - we’re no longer getting the PHP or MySource warnings - we only get the HIPO error:





Edit Permissions HIPO Error Report

( HIPO job was not completed )

Continue >>





Unfortunately we still can’t acquire the lock and there are no HIPO jobs stuck in the HIPO Herder to delete.

[quote]Unfortunately we still can’t acquire the lock and there are no HIPO jobs stuck in the HIPO Herder to delete.
[right][post=“6879”]<{POST_SNAPBACK}>[/post][/right][/quote]



How odd. Is there anything in Apache or Matrix’s error logs?

Sorry I should have included more information. The Matrix error log shows a DB error:




9:10:18 - 22 Sep

User: MySource System (0)

Level: MySource Error

(/core/include/mysource.inc:1583) - DB Error: connect failed





Sarah

[quote]Sorry I should have included more information. The Matrix error log shows a DB error:
[right][post=“6895”]<{POST_SNAPBACK}>[/post][/right][/quote]



That suggests to me that your CLI version of PHP can’t connect to Oracle. You’ll need to ensure that the user that Squiz Server can connect to Oracle properly via PHP.

Sarah, is the cron job working?
We can't test the Squiz Server yet, but we had (and still have) a very similar problem with the cron jobs (DB Error: connect failed).



Avi,

running 'php -m' on the command line returns 'oci8' (among other things). Is that enough to ensure the php cli is compiled with oci8 support?

[quote]running ‘php -m’ on the command line returns ‘oci8’ (among other things). Is that enough to ensure the php cli is compiled with oci8 support?
[right][post=“6907”]<{POST_SNAPBACK}>[/post][/right][/quote]



I usually create an info.php file containing:

    <?php phpinfo(); ?>


And run the CLI php with that, piped to a file. Then I can check both oci8 support and the correct environment variables (ie. ORACLE_HOME and ORACLE_SID). Usually oci8 support is fine, but the Oracle environment variables are not present when the script starts, which causes the same problem.