Action Controller Exception: LSWS 3.1

Discussion in 'Ruby/Rails' started by bdm, Apr 3, 2007.

  1. bdm

    bdm Member

    Hi All,

    Just d/l and configured the LSWS 3.1 STD on Ubuntu 6.10 with Ruby-LSAPI-2.3

    Setup the VHosts & Listeners are per Bob Silva's Indepth Tutorial.

    Two errors have occured:

    1). When I was seting up the VHost and had to enter the vhconf information, I did this =>

    VH Name: radiant
    VH Root: /srv/www/radiant
    Config file: $VH_ROOT/config/vhconf.xml

    Saved the edits and received error output =>

    *file /srv/www/radiant/config/vhconf.xml does not exist. <a href="javascript:createFile('configFile')">CLICK TO CREATE</a>

    ... exactly like that, the 'create' button was not correctly rendered.

    To remedy this at least to complete the setup, I did =>
    $ cd /srv/www/radiant/config
    $ sudo touch vhconf.xml
    $ sudo chmod 755 vhconf.xml
    This produced an error of /../vhconf.xml is not writable, which was rectified by =>

    $ sudo chmod 777 vhconf.xml
    However now I actually have an empty vhconf.xml. Is it supposed to be empty or was the failed 'create' supposed to make/script it?

    2). After applying all the edits, saving them and executing a graceful restart, I opened a browser and went to =>


    and received this error output =>

     ActiveRecord::StatementInvalid in SiteController#show_page
    Mysql::Error: Table 'fourwalls_development.config' doesn't exist: SHOW FIELDS FROM config
    RAILS_ROOT: /srv/www/radiant/config/..
    Application Trace | Framework Trace | Full Trace
    #{RAILS_ROOT}/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:128:in `log'
    #{RAILS_ROOT}/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:243:in `execute'
    #{RAILS_ROOT}/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:348:in `columns'
    #{RAILS_ROOT}/vendor/rails/activerecord/lib/active_record/base.rb:763:in `columns'
    #{RAILS_ROOT}/vendor/rails/activerecord/lib/active_record/base.rb:776:in `column_names'
    #{RAILS_ROOT}/vendor/rails/activerecord/lib/active_record/base.rb:789:in `column_methods_hash'
    #{RAILS_ROOT}/vendor/rails/activerecord/lib/active_record/base.rb:1262:in `all_attributes_exists?'
    #{RAILS_ROOT}/lib/login_system.rb:77:in `all?'
    #{RAILS_ROOT}/app/models/radiant/config.rb:32:in `[]'
    #{RAILS_ROOT}/app/controllers/site_controller.rb:45:in `dev?'
    #{RAILS_ROOT}/app/controllers/site_controller.rb:53:in `live?'
    #{RAILS_ROOT}/app/controllers/site_controller.rb:16:in `show_page'
    Any help appreciated, BDM
  2. bdm

    bdm Member

    Followup Post

    Did some searching, and the solution to the MySql problem was;

    $ sudo rake db:migrate

    Now the webserver is working, but there is no display except for;

    Application error (Apache)

    Change this error message for exceptions thrown outside of an action (like in Dispatcher setups or broken Ruby code) in public/500.html.

    Being served from http://my.slice.ip.address/admin/welcome ... I'll do some reading here.

    Cheers, bdm.
  3. mistwang

    mistwang LiteSpeed Staff

    It is recommended to store vhost configuration file under $SERVER_ROOT/conf/.
    Our rails templated is highly recommended.

    For the application error, you can try WEBrick first, if it works well then try trouble shoot LiteSpeed.
  4. bdm

    bdm Member

    Litespeed Web Server PHP Errors

    Hi Mistwang,

    Took your advice from the last post and made the config file => $SERVER_ROOT/conf

    Now, after 5 or so mins editing in the Admin Console, I am getting PHP error output at the top of my panel. Try to save changes, exit and re-enter via server:7080,

    Firefox can't establish a connection to the server at xx.xx.xx.xx:7080

    This happened last night also but I put it down to randomness, but now it seems to be a real error.

    cheers, bdm
  5. bdm

    bdm Member

    Litespeed Not Running


    Hard rebooted server, checked logs, supposedly started OK.

    Request connection via server.ip ... failed
    Request connection via server.ip:7080 ... failed

    I'll remove /opt/lsws etc, reinstall/reconfigure, if it fails again, will rollback to ver 3.0RC2

    Cheers, bdm
  6. mistwang

    mistwang LiteSpeed Staff

  7. bdm

    bdm Member

    LSWS 3.0.1 Admin Login PHP Errors

    Fresh install of LSWS 3.0.1 STD, 10 or so mins into configuration, getting these PHP errors appearing on the console, while logged in as admin user.

    Warning: array_keys() [function.array-keys]: The first argument should be an array in /opt/lsws/admin/html.3.0.1/classes/ws/ConfCenter.php on line 198

    Warning: sort() expects parameter 1 to be array, null given in /opt/lsws/admin/html.3.0.1/classes/ws/ConfCenter.php on line 199

    Warning: Invalid argument supplied for foreach() in /opt/lsws/admin/html.3.0.1/classes/ws/ConfCenter.php on line 201

    Warning: array_keys() [function.array-keys]: The first argument should be an array in /opt/lsws/admin/html.3.0.1/classes/ws/ConfCenter.php on line 59

    Warning: Invalid argument supplied for foreach() in /opt/lsws/admin/html.3.0.1/classes/ws/ConfCenter.php on line 60
    Litespeed Web Server Standard v3.0.1 : Log Off

    * Home
    * ControlCollapsed. Click to expand.
    o Apply Changes/Graceful Restart
    o Server Log Viewer
    o Real-Time Statistics
    o Toggle Debug Logging
    o Version Manager
    * ConfigurationsCollapsed. Click to expand.
    * Web ConsoleCollapsed. Click to expand.
    * Help

    Configuration has been modified. To apply changes, please visit Control Panel and execute a Graceful Restart. Apply Changes

    Warning: array_keys() [function.array-keys]: The first argument should be an array in /opt/lsws/admin/html.3.0.1/classes/ws/ConfCenter.php on line 59

    Warning: Invalid argument supplied for foreach() in /opt/lsws/admin/html.3.0.1/classes/ws/ConfCenter.php on line 60
    Control Panel
    This is the 5th time I have totally rebuilt my system, to give LSWS a fair chance at a clean install. Comments/suggestions welcome.

  8. mistwang

    mistwang LiteSpeed Staff

    Those warnings has been fixed in upcoming 3.0.2 release. can be safely ignored now.
    Thanks for reporting this issue. :)
  9. bdm

    bdm Member

    PHP Errors in Admin Console

    Thanks Mistwang,

    Glad to see you guys clipped these errors and they can be ignored, but unfortunately they crash the Litespeed webserver and neither port:80 nor port:7080 are available after that. Even a hard reboot doesn't seem to bring it back up again, only a clean reinstall of LSWS.

    How long before the LSWS ver 3.0.2 is available for release? Until then I might as well use 3.0RC2.

  10. mistwang

    mistwang LiteSpeed Staff

    Is it a VPS?
    You need to change the admin listener from *:7080 to <your_ip>:7080 the first thing after installation.
    Last edited: Apr 6, 2007
  11. bdm

    bdm Member



    I changed the Admin Listener from *:7080 to my.ip.address:7080, saved it and did a graceful restart: killed the webserver altogether, but after a hard reboot, came back up again.

    Yes, I am using a VPS => Slicehost. It seems now that LSWS is configured OK but my Rails (Radiant) app has some problems.
  12. mistwang

    mistwang LiteSpeed Staff

    You need to do the same for listener *:80
  13. bdm

    bdm Member

    K, Just did, got an error =>

    2007-04-06 03:35:20.613 ERROR HttpListener::start(): Can't listen at address Default: Address already in use!
    2007-04-06 03:35:20.613 ERROR HttpServer::addListener(Default) failed to create new listener
    2007-04-06 03:35:20.613 ERROR [config:server:listener:Default] failed to start listener on address!
    2007-04-06 03:35:20.613 WARN [config:server:listener] No listener is available for normal virtual host!
    2007-04-06 03:35:20.616 ERROR [config:template:centralConfigLog] Listener [Default] does not exist
    2007-04-06 03:35:20.616 ERROR [config:template:pHP_SuEXEC] Listener [Default] does not exist
    2007-04-06 03:35:20.617 ERROR [config:template:EasyRailsWithSuEXEC] Listener [Default] does not exist
  14. mistwang

    mistwang LiteSpeed Staff

    The error will go away if you restart the server again.
  15. bdm

    bdm Member

    OK, thanks Mistwang,

    It actually took 2 restarts to clear that error, was becoming a bit *frantic* ... btw, thanks for the great customer service.

    The rails bit is still broken but I'm happy!

    cheers, bdm

Share This Page