Testing my SplayWeb on localhost with 10 splayd and 1 controller

For testing my SplayWeb, i have changed the value of google_key with my Google Map key (generated for http://localhost) but the map representation still did not display anything (http://localhost:8080/map -> 10 registered, 10 available, 0 unavailable, 0 reset)...

Secondly, when trying out to get the demo working, i get this two errors messages :

1) http://localhost:8080/splayd
===============================
NoMethodError in Splayd#index

Showing splayd/list.rhtml where line #20 raised:

You have a nil object when you didn't expect it!
The error occurred while evaluating nil.login

Extracted source (around line #20):

17:
18: <%= splayd.name %>
19: <%= splayd.ip %>
20: <%= splayd.user.login %>
21:
22: <%=
23: if splayd.status == "AVAILABLE"

Application trace :
--------------------
app/views/splayd/list.rhtml:20:in `_run_erb_47app47views47splayd47list46rhtml'
app/views/splayd/list.rhtml:16:in `each'
app/views/splayd/list.rhtml:16:in `_run_erb_47app47views47splayd47list46rhtml'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_view/base.rb:338:in `send'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_view/base.rb:338:in `execute'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_view/template_handlers/compilable.rb:29:in `send'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_view/template_handlers/compilable.rb:29:in `render'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_view/template.rb:35:in `render'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_view/template.rb:22:in `render_template'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_view/base.rb:245:in `render_file'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:1108:in `render_for_file'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:865:in `render_with_no_layout'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:880:in `render_with_no_layout'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/layout.rb:251:in `render_without_benchmark'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/benchmarking.rb:51:in `render'
/var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/core_ext/benchmark.rb:8:in `realtime'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/benchmarking.rb:51:in `render'
app/controllers/splayd_controller.rb:12:in `index'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:1162:in `send'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:1162:in `perform_action_without_filters'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/filters.rb:580:in `call_filters'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/filters.rb:573:in `perform_action_without_benchmark'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/rescue.rb:201:in `perform_action_without_caching'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/caching/sql_cache.rb:13:in `perform_action'
/var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in `cache'
/var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/query_cache.rb:8:in `cache'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/caching/sql_cache.rb:12:in `perform_action'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:529:in `send'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:529:in `process_without_filters'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/filters.rb:569:in `process_without_session_management_support'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/session_management.rb:130:in `process'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:389:in `process'
/var/lib/gems/1.8/gems/rails-2.1.0/lib/webrick_server.rb:78:in `service'
/var/lib/gems/1.8/gems/rails-2.1.0/lib/commands/servers/webrick.rb:66
/var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in `require'
/var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:in `new_constants_in'
/var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in `require'
/var/lib/gems/1.8/gems/rails-2.1.0/lib/commands/server.rb:39

2) http://localhost:8080/job/create
====================================

New Job Resources Request / Demo SPLAYschool tutorial

ActiveRecord::StatementInvalid in JobController#create

sql::Error: Column 'script' cannot be null: INSERT INTO `jobs` (`name`, `endianness`, `network_max_sockets`, `script`, `status_msg`, `latitude`, `max_load`, `network_max_send`, `code`, `die_free`, `scheduler_description`, `command`, `disk_max_file_descriptors`, `udp_drop_ratio`, `min_uptime`, `network_receive_speed`, `nb_splayds`, `splayd_version`, `command_msg`, `network_send_speed`, `user_id`, `bits`, `network_nb_ports`, `status_time`, `localization`, `network_max_receive`, `hostmasks`, `keep_files`, `scheduler`, `list_type`, `ref`, `description`, `longitude`, `max_mem`, `disk_max_size`, `disk_max_files`, `factor`, `list_size`, `status`, `distance`, `max_time`) VALUES('test1', 'little', 32, NULL, NULL, '46.83639694229223', '999.99', 134217728, '-- SPLAYschool tutorial\n\n-- BASE libraries (threads, events, sockets, ...)\nrequire\"splay.base\"\n\n-- RPC library\nrpc = require\"splay.rpc\"\n\n-- accept incoming RPCs\nrpc.server(job.me.port)\n\nfunction call_me(position)\n log:print(\"I received an RPC from node \"..position)\nend\n\n-- our main function\nfunction SPLAYschool()\n -- print bootstrap information about local node\n log:print(\"I\'m \"..job.me.ip..\":\"..job.me.port)\n log:print(\"My position in the list is: \"..job.position)\n log:print(\"List type is \'\"..job.list_type..\"\' with \"..#job.nodes..\" nodes\")\n\n -- wait for all nodes to be started (conservative)\n events.sleep(5)\n\n -- send RPC to random node of the list\n rpc.call(job.nodes[1], {\"call_me\", job.position})\n\n -- you can also spawn new threads (here with an anonymous function)\n events.thread(function() log:print(\"Bye bye\") end)\n\n -- wait for messages from other nodes\n events.sleep(5)\n\n -- explicitly exit the program (necessary to kill RPC server)\n os.exit()\nend\n\n-- create thread to execute the main function\nevents.thread(SPLAYschool)\n\n-- start the application\nevents.loop()\n\n-- now, you can watch the logs of your job and enjoy ;-)\n-- try this job with multiple splayds and different parameters\n', 'TRUE', NULL, NULL, 32, '0.0', 0, 51200, 1, '0.9621', NULL, 51200, 1, '32', 1, 1295462077, 'FR', 134217728, NULL, 'FALSE', 'standard', 'HEAD', '077c9fa442065fcafa566e32ebe79fff', 'premier test', '-1.0052490234375', 2097152, 67108864, 512, '1.25', 0, 'LOCAL', NULL, 300)

Application trace :
--------------------

/var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract_adapter.rb:147:in `log'
/var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/mysql_adapter.rb:299:in `execute'
/var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract/database_statements.rb:161:in `insert_sql'
/var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/mysql_adapter.rb:309:in `insert_sql'
/var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract/database_statements.rb:44:in `insert_without_query_dirty'
/var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract/query_cache.rb:19:in `insert'
/var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:2506:in `create_without_callbacks'
/var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/callbacks.rb:220:in `create_without_timestamps'
/var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/timestamp.rb:29:in `create'
/var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:2472:in `create_or_update_without_callbacks'
/var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/callbacks.rb:207:in `create_or_update'
/var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:2200:in `save_without_validation'
/var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/validations.rb:901:in `save_without_dirty'
/var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/dirty.rb:75:in `save_without_transactions'
/var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/transactions.rb:106:in `save'
/var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract/database_statements.rb:66:in `transaction'
/var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/transactions.rb:79:in `transaction'
/var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/transactions.rb:98:in `transaction'
/var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/transactions.rb:106:in `save'
/var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/transactions.rb:118:in `rollback_active_record_state!'
/var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/transactions.rb:106:in `save'
app/controllers/job_controller.rb:162:in `create'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:1162:in `send'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:1162:in `perform_action_without_filters'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/filters.rb:580:in `call_filters'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/filters.rb:573:in `perform_action_without_benchmark'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/rescue.rb:201:in `perform_action_without_caching'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/caching/sql_cache.rb:13:in `perform_action'
/var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in `cache'
/var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/query_cache.rb:8:in `cache'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/caching/sql_cache.rb:12:in `perform_action'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:529:in `send'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:529:in `process_without_filters'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/filters.rb:569:in `process_without_session_management_support'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/session_management.rb:130:in `process'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:389:in `process'
/var/lib/gems/1.8/gems/rails-2.1.0/lib/webrick_server.rb:78:in `service'
/var/lib/gems/1.8/gems/rails-2.1.0/lib/commands/servers/webrick.rb:66
/var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in `require'
/var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:in `new_constants_in'
/var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in `require'
/var/lib/gems/1.8/gems/rails-2.1.0/lib/commands/server.rb:39

Finally, it seems that the demo mode is always active on my local SplayWeb (Demo: only this code is authorized).

I have followed each steps and downloaded the lastest packages with the version proposed.
I am on Ubuntu 9.04 (x64).

Thanks,

Bruno

Hello Bruno, 1) If the splay

Hello Bruno,

1) If the splay machines are running into your local cluster, the geo-localization feature will not work anyway. To have something meaningful, you should deploy on a world-wide testbed like PlanetLab. If this is not your case, the google-map will never display anything.

2) this seems to be a problem with the users. Did you register a new user for your instance of SplayWeb, and logged in with this user?

Some more information

Hello Bruno,

I will just complement the reply from Valerio.

1> it indeed does not make any sense to have geo-localization for splayds running on a single machine. This feature is only meant to be used for PlanetLab and is absolutely not required to use Splay and to deploy jobs: frankly speaking, its primary role is to make things visual when demonstrating the project. I would recommend, knowing the context in which you want to use Splay, to not spend too many hours on this. We will most probably remove this feature from the released version in the future.

2> when you create an user using the splayweb, the account is by default in demo mode. Using the command line tools (please wait for the upcoming release for these), one can add an user and set the credentials for that user at the same time. Using the splayweb, one has to change the value of the Demo field in the database. My suggestion is to install phpmyadmin on the machine that runs the MySQL: this is trivial to do on Ubuntu: https://help.ubuntu.com/community/phpMyAdmin ; then, browse the content of the users table, and set the Demo field to 0 for the user(s) you created. Note that you can also set the admin field to 1. In this case, admin users are allowed to see the jobs of other admin and regular users.

Hope this helps.
KR,
Etienne.

Hello, I'm in the same case

Hello,

I'm in the same case as Bruno. I have well noted your comments Etienne. However, I don't think that it's an account problem. When I trying to create a job, I get the same error. However, I think this error is due to the SQL error (Column 'script' cannot be null), returned when I trying to insert datas into the 'jobs' table :

Mysql::Error: Column 'script' cannot be null: INSERT INTO `jobs` (`name`, `endianness`, `network_max_sockets`, `script`, `status_msg`, `latitude`, `max_load`, `network_max_send`, `code`, `die_free`, `scheduler_description`, `command`, `disk_max_file_descriptors`, `udp_drop_ratio`, `min_uptime`, `network_receive_speed`, `nb_splayds`, `splayd_version`, `command_msg`, `network_send_speed`, `user_id`, `bits`, `network_nb_ports`, `status_time`, `localization`, `network_max_receive`, `hostmasks`, `keep_files`, `scheduler`, `list_type`, `ref`, `description`, `longitude`, `max_mem`, `disk_max_size`, `disk_max_files`, `factor`, `list_size`, `status`, `distance`, `max_time`) VALUES('test', 'little', 32, NULL, NULL, NULL, '999.99', 134217728, '-- SPLAYschool tutorial\n\n-- BASE libraries (threads, events, sockets, ...)\nrequire\"splay.base\"\n\n-- RPC library\nrpc = require\"splay.rpc\"\n\n-- accept incoming RPCs\nrpc.server(job.me.port)\n\nfunction call_me(position)\n log:print(\"I received an RPC from node \"..position)\nend\n\n-- our main function\nfunction SPLAYschool()\n -- print bootstrap information about local node\n log:print(\"I\'m \"..job.me.ip..\":\"..job.me.port)\n log:print(\"My position in the list is: \"..job.position)\n log:print(\"List type is \'\"..job.list_type..\"\' with \"..#job.nodes..\" nodes\")\n\n -- wait for all nodes to be started (conservative)\n events.sleep(5)\n\n -- send RPC to random node of the list\n rpc.call(job.nodes[1], {\"call_me\", job.position})\n\n -- you can also spawn new threads (here with an anonymous function)\n events.thread(function() log:print(\"Bye bye\") end)\n\n -- wait for messages from other nodes\n events.sleep(5)\n\n -- explicitly exit the program (necessary to kill RPC server)\n os.exit()\nend\n\n-- create thread to execute the main function\nevents.thread(SPLAYschool)\n\n-- start the application\nevents.loop()\n\n-- now, you can watch the logs of your job and enjoy ;-)\n-- try this job with multiple splayds and different parameters\n', 'TRUE', NULL, NULL, 32, '0.0', 0, 51200, 1, '1', NULL, 51200, 2, '32', 1, 1295912474, NULL, 134217728, NULL, 'FALSE', 'standard', 'HEAD', 'bc4e55d09cbc5a40638f6fd3b06cc505', 'test', NULL, 2097152, 67108864, 512, '1.25', 0, 'LOCAL', NULL, 300)

Please try the new versions!

Hello, can you please try the new versions of Splayweb (1.0.1), Controller (1.0.3) and Client Commands (1.0.1)?

The problem was due to some inconsistencies between on the MySQL DB and the fields requested by Splayweb.

Please tell us in case the problem persists.

José

we have identified the problem

and we are working to find a solution to it... expect a new release of splayweb in next few days.

José Valerio