I am trying to setup an Elo rating system for my local 8 ball pool league using:
https://github.com/elovation/elovation
The only changes I have made to above repo prior to deployment are specifying heroku:stack-18 in app.json and running bundle install after specifying to use https:// instead of git://
I have deployed my app to Heroku without error but when loading my app I get a "We're sorry, something went wrong page"
After deployment I have ran heroku run rake db:migrate and heroku restart but my error persists
I have included below output of heroku logs ; any help with the below errors would be greatly appreciated as I am not particularly familiar with Ruby or Heroku postgres.
2022-06-21T12:54:08.886300+00:00 app[web.1]: I, [2022-06-21T12:54:08.886206 #9] INFO -- : [dc5be6b7-715a-47a0-8936-e0ba1c6b2c13] Processing by DashboardController#show as HTML
2022-06-21T12:54:08.888800+00:00 app[web.1]: D, [2022-06-21T12:54:08.888726 #9] DEBUG -- : [dc5be6b7-715a-47a0-8936-e0ba1c6b2c13] Player Load (0.5ms) SELECT "players".* FROM "players"
2022-06-21T12:54:08.889854+00:00 app[web.1]: I, [2022-06-21T12:54:08.889789 #9] INFO -- : [dc5be6b7-715a-47a0-8936-e0ba1c6b2c13] Rendering dashboard/show.html.erb within layouts/application
2022-06-21T12:54:08.891005+00:00 app[web.1]: D, [2022-06-21T12:54:08.890942 #9] DEBUG -- : [dc5be6b7-715a-47a0-8936-e0ba1c6b2c13] Game Load (0.5ms) SELECT "games".* FROM "games" ORDER BY updated_at DESC
2022-06-21T12:54:08.891468+00:00 app[web.1]: I, [2022-06-21T12:54:08.891374 #9] INFO -- : [dc5be6b7-715a-47a0-8936-e0ba1c6b2c13] Rendered dashboard/show.html.erb within layouts/application (1.5ms)
2022-06-21T12:54:08.893279+00:00 app[web.1]: I, [2022-06-21T12:54:08.893225 #9] INFO -- : [dc5be6b7-715a-47a0-8936-e0ba1c6b2c13] Completed 500 Internal Server Error in 7ms (ActiveRecord: 1.1ms)
2022-06-21T12:54:08.894220+00:00 app[web.1]: F, [2022-06-21T12:54:08.894169 #9] FATAL -- : [dc5be6b7-715a-47a0-8936-e0ba1c6b2c13]
2022-06-21T12:54:08.894271+00:00 app[web.1]: F, [2022-06-21T12:54:08.894239 #9] FATAL -- : [dc5be6b7-715a-47a0-8936-e0ba1c6b2c13] ActionView::Template::Error (The asset "chartkick.js" is not present in the asset pipeline.
2022-06-21T12:54:08.894272+00:00 app[web.1]: ):
2022-06-21T12:54:08.894439+00:00 app[web.1]: F, [2022-06-21T12:54:08.894403 #9] FATAL -- : [dc5be6b7-715a-47a0-8936-e0ba1c6b2c13] 11: <%= csrf_meta_tags %>
2022-06-21T12:54:08.894440+00:00 app[web.1]: [dc5be6b7-715a-47a0-8936-e0ba1c6b2c13] 12: <link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700' rel='stylesheet' type='text/css'>
2022-06-21T12:54:08.894441+00:00 app[web.1]: [dc5be6b7-715a-47a0-8936-e0ba1c6b2c13] 13:
2022-06-21T12:54:08.894441+00:00 app[web.1]: [dc5be6b7-715a-47a0-8936-e0ba1c6b2c13] 14: <%= javascript_include_tag "//www.google.com/jsapi", "chartkick" %>
2022-06-21T12:54:08.894442+00:00 app[web.1]: [dc5be6b7-715a-47a0-8936-e0ba1c6b2c13] 15: </head>
2022-06-21T12:54:08.894442+00:00 app[web.1]: [dc5be6b7-715a-47a0-8936-e0ba1c6b2c13] 16: <body>
2022-06-21T12:54:08.894443+00:00 app[web.1]: [dc5be6b7-715a-47a0-8936-e0ba1c6b2c13] 17: <div id='container'>
2022-06-21T12:54:08.894482+00:00 app[web.1]: F, [2022-06-21T12:54:08.894452 #9] FATAL -- : [dc5be6b7-715a-47a0-8936-e0ba1c6b2c13]
2022-06-21T12:54:08.894523+00:00 app[web.1]: F, [2022-06-21T12:54:08.894495 #9] FATAL -- : [dc5be6b7-715a-47a0-8936-e0ba1c6b2c13] app/views/layouts/application.html.erb:14:in `_app_views_layouts_application_html_erb___4496802780226790006_47054455194320'
I was trying redis locally,
launched redis server with
"redis-server"
01 Feb 06:22:50 * Warning: no config file specified, using the default config. In order to specify a config file use 'redis-server /path/to/redis.conf'
01 Feb 06:22:50 - Server started, Redis version 1.000
01 Feb 06:22:50 - The server is now ready to accept connections on port 6379
01 Feb 06:22:51 . 0 clients connected (0 slaves), 5168 bytes in use, 0 shared objects
01 Feb 06:22:54 . Accepted 127.0.0.1:54766
01 Feb 06:22:56 . 1 clients connected (0 slaves), 5888 bytes in use, 0 shared objects
..........
but then when trying to access the redis from rails c console, I keep seeing "Redis::CommandError: ERR unknown command", I don't know what went wrong.
Is this a version compatible issue?
irb(main):009:0> redis = Redis.new(host: 'localhost', port: 6379)
irb(main):008:0* redis.get "1"
Redis::CommandError: ERR unknown command
from /Users/xx/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/redis-3.2.0/lib/redis/client.rb:110:in `call'
from /Users/xx/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/redis-3.2.0/lib/redis.rb:784:in `block in get'
from /Users/xx/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/redis-3.2.0/lib/redis.rb:37:in `block in synchronize'
from /Users/xx/.rbenv/versions/2.1.2/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
from /Users/xx/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/redis-3.2.0/lib/redis.rb:37:in `synchronize'
from /Users/xx/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/redis-3.2.0/lib/redis.rb:783:in `get'
from (irb):8
from /Users/xx/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/railties-4.1.0/lib/rails/commands/console.rb:90:in `start'
from /Users/xx/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/railties-4.1.0/lib/rails/commands/console.rb:9:in `start'
from /Users/xx/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:69:in `console'
from /Users/xx/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
from /Users/xx/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/railties-4.1.0/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
I'm trying to learn Guard using Jeffrey Way's book, but having issues when I do guard. Although I followed the guides without making any mistake.
C:\Users\Imaqtpie\Desktop\LaravelTestingDecoded\chapter3>guard
18:41:48 - INFO - Guard is using TerminalTitle to send notifications.
18:41:48 - INFO - Running all tests
PHP Fatal error: Call to undefined method PHPUnit_Framework_TestResult::allCompletlyImplemented() in C:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\guard-phpunit-0.1.4\lib\guard\phpunit\formatters\PHPUnit-Progress\PHPUnit\Extensions\Progress\ResultPrinter.php on line 250
PHP Stack trace:
PHP 1. {main}() C:\Users\Imaqtpie\Desktop\LaravelTestingDecoded\chapter3\vendor\phpunit\phpunit\composer\bin\phpunit:0
PHP 2. PHPUnit_TextUI_Command::main() C:\Users\Imaqtpie\Desktop\LaravelTestingDecoded\chapter3\vendor\phpunit\phpunit\composer\bin\phpunit:63
PHP 3. PHPUnit_TextUI_Command->run() C:\Users\Imaqtpie\Desktop\LaravelTestingDecoded\chapter3\vendor\phpunit\phpunit\PHPUnit\TextUI\Command.php:129
PHP 4. PHPUnit_TextUI_TestRunner->doRun() C:\Users\Imaqtpie\Desktop\LaravelTestingDecoded\chapter3\vendor\phpunit\phpunit\PHPUnit\TextUI\Command.php:176
PHP 5. PHPUnit_Extensions_Progress_ResultPrinter->printResult() C:\Users\Imaqtpie\Desktop\LaravelTestingDecoded\chapter3\vendor\phpunit\phpunit\PHPUnit\TextUI\TestRunner.php:355
PHP 6. PHPUnit_Extensions_Progress_ResultPrinter->printFooter() C:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\guard-phpunit-0.1.4\lib\guard\phpunit\formatters\PHPUnit-Progress\PHPUnit\Extensions\Progress\ResultPrinter.php:72
18:41:48 - INFO - .
> [#E489C62F50B0]
> [#E489C62F50B0] Finished in 52 ms
> [#E489C62F50B0]
> [#E489C62F50B0] Fatal error: Call to undefined method PHPUnit_Framework_TestResult::allCompletlyImplemented() in C:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\guard-phpunit-0.1.4\lib\guard\phpunit\formatters\PHPUnit-Progress\PHPUnit\Extensions\Progress\ResultPrinter.php on line 250
> [#E489C62F50B0]
> [#E489C62F50B0] Call Stack:
> [#E489C62F50B0] 0.0007 235072 1. {main}() C:\Users\Imaqtpie\Desktop\LaravelTestingDecoded\chapter3\vendor\phpunit\phpunit\composer\bin\phpunit:0
> [#E489C62F50B0] 0.0044 556064 2. PHPUnit_TextUI_Command::main() C:\Users\Imaqtpie\Desktop\LaravelTestingDecoded\chapter3\vendor\phpunit\phpunit\composer\bin\phpunit:63
> [#E489C62F50B0] 0.0044 561304 3. PHPUnit_TextUI_Command->run() C:\Users\Imaqtpie\Desktop\LaravelTestingDecoded\chapter3\vendor\phpunit\phpunit\PHPUnit\TextUI\Command.php:129
> [#E489C62F50B0] 0.0359 2805856 4. PHPUnit_TextUI_TestRunner->doRun() C:\Users\Imaqtpie\Desktop\LaravelTestingDecoded\chapter3\vendor\phpunit\phpunit\PHPUnit\TextUI\Command.php:176
> [#E489C62F50B0] 0.0521 3267312 5. PHPUnit_Extensions_Progress_ResultPrinter->printResult() C:\Users\Imaqtpie\Desktop\LaravelTestingDecoded\chapter3\vendor\phpunit\phpunit\PHPUnit\TextUI\TestRunner.php:355
> [#E489C62F50B0] 0.0521 3267632 6. PHPUnit_Extensions_Progress_ResultPrinter->printFooter() C:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\guard-phpunit-0.1.4\lib\guard\phpunit\formatters\PHPUnit-Progress\PHPUnit\Extensions\Progress\ResultPrinter.php:72
18:41:48 - INFO - Guard is now watching at 'C:/Users/Imaqtpie/Desktop/LaravelTestingDecoded/chapter3'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- wdm (LoadError)
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/listen-1.3.0/lib/listen/adapter.rb:207:in `load_dependent_adapter'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/listen-1.3.0/lib/listen/adapters/windows.rb:33:in `load_dependent_adapter'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/listen-1.3.0/lib/listen/adapter.rb:198:in `usable?'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/listen-1.3.0/lib/listen/adapters/windows.rb:25:in `usable?'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/listen-1.3.0/lib/listen/adapter.rb:190:in `usable_and_works?'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/listen-1.3.0/lib/listen/adapter.rb:57:in `block in select_and_initialize'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/listen-1.3.0/lib/listen/adapter.rb:55:in `each'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/listen-1.3.0/lib/listen/adapter.rb:55:in `select_and_initialize'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/listen-1.3.0/lib/listen/listener.rb:290:in `initialize_adapter'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/listen-1.3.0/lib/listen/listener.rb:282:in `setup'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/listen-1.3.0/lib/listen/listener.rb:52:in `start'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/guard-1.8.2/lib/guard.rb:213:in `block in start'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/guard-1.8.2/lib/guard.rb:387:in `block in within_preserved_state'
from <internal:prelude>:10:in `synchronize'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/guard-1.8.2/lib/guard.rb:384:in `within_preserved_state'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/guard-1.8.2/lib/guard.rb:209:in `start'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/guard-1.8.2/lib/guard/cli.rb:110:in `start'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/guard-1.8.2/bin/guard:6:in `<top (required)>'
from C:/RailsInstaller/Ruby1.9.3/bin/guard:23:in `load'
from C:/RailsInstaller/Ruby1.9.3/bin/guard:23:in `<main>'
I have tried editing my PATH to point correct PHPUnit, it's still the same.
What's wrong?
Also, should I learn Guard or move Grunt? I'm a PHP dev.
I've found the solution.
The problem was a typing mistake in Ruby1.9.3\lib\ruby\gems\1.9.1\gems\guard-phpunit-0.1.4\lib\guard\phpunit\formatters\PHPUnit-Progress\PHPUnit\Extensions\Progress\ResultPrinter.php which affects 3.7.* versions.
You have to find allCompletlyImplemented() method and rename it to allCompletelyImplemented() on line 250 and 256.
My Rails app has been running fine until this morning. I tried restarting the app and here is the error i'm getting before i even hit a page. Out of Memory error on the Postgres connection! I can connect fine to the database from my dev machine. I have a Dev account with Heroku Postgres. I also ran that that SQL statement, and it was fine it should just return 1.
The config var DATABASE_URL is set correctly.
Any ideas?
thx,
matt
app[web.1]: => Booting WEBrick
app[web.1]: => Rails 3.2.13 application starting in production on http://0.0.0.0:23827
app[web.1]: => Call with -d to detach
app[web.1]: => Ctrl-C to shutdown server
app[web.1]: Exiting
app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:1161:in `exec': PG::OutOfMemory: ERROR: out of memory (ActiveRecord::StatementInvalid)
app[web.1]: DETAIL: Failed on request of size 96.
app[web.1]: : SELECT COUNT(*)
app[web.1]: FROM pg_class c
app[web.1]: LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
app[web.1]: WHERE c.relkind in ('v','r')
app[web.1]: AND c.relname = 'spree_shipments'
app[web.1]: AND n.nspname = ANY (current_schemas(false))
app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2
I tried to connect to my XMPP server using xmpp4r in ruby and my code is very simple, but I don't know why I got error.
I can successfully use ichat to log in using chat#localhost and also to the 5280/admin website.
require 'xmpp4r/client'
include Jabber
Jabber::debug = true
jid = Jabber::JID.new('chat#localhost')
client = Jabber::Client.new(jid)
client.connect
client.auth('123456')
client.close
And the error is:
D, [2013-02-18T03:24:55.768029 #15238] DEBUG -- : Debugging mode enabled.
W, [2013-02-18T03:24:55.768341 #15238] WARN -- : Warnings mode enabled.
D, [2013-02-18T03:24:55.772467 #15238] DEBUG -- : RESOLVING:
_xmpp-client._tcp.localhost (SRV)
D, [2013-02-18T03:24:55.778631 #15238] DEBUG -- : CONNECTING:
localhost:5222
D, [2013-02-18T03:24:55.780122 #15238] DEBUG -- : SENDING:
<stream:stream xmlns:stream='http://etherx.jabber.org/streams'
xmlns='jabber:client' to='localhost' xml:lang='en' version='1.0' >
D, [2013-02-18T03:24:55.782276 #15238] DEBUG -- : RECEIVED:
<stream:stream from='localhost' id='3021975152' xml:lang='en'
xmlns:stream='http://etherx.jabber.org/streams' version='1.0'
xmlns='jabber:client'/>
D, [2013-02-18T03:24:55.784022 #15238] DEBUG -- : RECEIVED:
<stream:features><mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
<mechanism>SCRAM-SHA-1</mechanism><mechanism>DIGEST-MD5</mechanism>
<mechanism>PLAIN</mechanism></mechanisms><c hash='sha-1'
node='http://www.process-one.net/en/ejabberd/'
ver='yy7di5kE0syuCXOQTXNBTclpNTo=' xmlns='http://jabber.org/protocol/caps'/>
<register xmlns='http://jabber.org/features/iq-register'/></stream:features>
D, [2013-02-18T03:24:55.784203 #15238] DEBUG -- : FEATURES: waiting...
D, [2013-02-18T03:24:55.784785 #15238] DEBUG -- : FEATURES: received
D, [2013-02-18T03:24:55.785290 #15238] DEBUG -- : PROCESSING:
<stream:features xmlns='jabber:client'><mechanisms
xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><mechanism>SCRAM-SHA-1</mechanism>
<mechanism>DIGEST-MD5</mechanism><mechanism>PLAIN</mechanism></mechanisms><c
hash='sha-1' node='http://www.process-one.net/en/ejabberd/'
ver='yy7di5kE0syuCXOQTXNBTclpNTo=' xmlns='http://jabber.org/protocol/caps'/>
<register xmlns='http://jabber.org/features/iq-register'/></stream:features>
(REXML::Element)
D, [2013-02-18T03:24:55.785360 #15238] DEBUG -- : FEATURES: waiting finished
D, [2013-02-18T03:24:55.785450 #15238] DEBUG -- : TRYING stanzacbs...
D, [2013-02-18T03:24:55.785556 #15238] DEBUG -- : TRYING
message/iq/presence/cbs...
D, [2013-02-18T03:24:55.785987 #15238] DEBUG -- : SENDING:
<auth mechanism='DIGEST-MD5' xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
D, [2013-02-18T03:24:55.787784 #15238] DEBUG -- : RECEIVED:
<challenge xmlns='urn:ietf:params:xml:ns:xmppsasl'>bm9uY2U9IjE5NzEzNzk5NzQiLHFvcD0iYXV0aCIsY2hhcnNldD11dGYtOCxhbGdvcml0aG09bWQ1LXNlc3M=</challenge>
D, [2013-02-18T03:24:55.788143 #15238] DEBUG -- : SASL DIGEST-MD5 challenge:
nonce="1971379974",qop="auth",charset=utf-8,algorithm=md5-sess
{"nonce"=>"1971379974", "qop"=>"auth", "charset"=>"utf-8", "algorithm"=>"md5-sess"}
D, [2013-02-18T03:24:55.788475 #15238] DEBUG -- : SASL DIGEST-MD5 response:
nonce="1971379974",charset=utf-8,username="chat",realm="localhost",cnonce="92a37c018b9c32339c4b52ee0b02d67e",nc=00000001,qop=auth,digest-uri="xmpp/localhost",response=9c6bca9f4cf6f8daf3197a914023729a
{"nonce"=>"\"1971379974\"", "charset"=>"utf-8", "username"=>"\"chat\"", "realm"=>"\"localhost\"", "cnonce"=>"\"92a37c018b9c32339c4b52ee0b02d67e\"", "nc"=>"00000001", "qop"=>"auth", "digest-uri"=>"\"xmpp/localhost\"", "response"=>"9c6bca9f4cf6f8daf3197a914023729a"}
D, [2013-02-18T03:24:55.788761 #15238] DEBUG -- : SENDING:
<response xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>bm9uY2U9IjE5NzEzNzk5NzQiLGNoYXJzZXQ9dXRmLTgsdXNlcm5hbWU9ImNoYXQiLHJlYWxtPSJsb2NhbGhvc3QiLGNub25jZT0iOTJhMzdjMDE4YjljMzIzMzljNGI1MmVlMGIwMmQ2N2UiLG5jPTAwMDAwMD
AxLHFvcD1hdXRoLGRpZ2VzdC11cmk9InhtcHAvbG9jYWxob3N0IixyZXNwb25zZT05YzZiY2E5ZjRjZjZm
OGRhZjMxOTdhOTE0MDIzNzI5YQ==</response>
D, [2013-02-18T03:24:55.818548 #15238] DEBUG -- : RECEIVED:
<challenge xmlns='urn:ietf:params:xml:ns:xmpp-
sasl'>cnNwYXV0aD01NTQ2NTVlYjljYWUzZGExMjhmZjBkMWUzNDUzYmIwZQ==</challenge>
D, [2013-02-18T03:24:55.819064 #15238] DEBUG -- : SENDING:
<response xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
D, [2013-02-18T03:24:56.147820 #15238] DEBUG -- : RECEIVED:
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
D, [2013-02-18T03:24:56.148432 #15238] DEBUG -- : SENDING:
<stream:stream xmlns:stream='http://etherx.jabber.org/streams'
xmlns='jabber:client' to='localhost' xml:lang='en' version='1.0' >
D, [2013-02-18T03:25:56.151018 #15238] DEBUG -- : SENDING:
W, [2013-02-18T03:25:56.212617 #15238] WARN -- : EXCEPTION:
Jabber::ServerDisconnected
Server Disconnected!
/home/ubuntu/.rvm/gems/ruby-1.9.3-p385/gems/xmpp4r-
0.5/lib/xmpp4r/streamparser.rb:68:in `block in parse'
/home/ubuntu/.rvm/rubies/ruby-1.9.3-
p385/lib/ruby/1.9.1/rexml/parsers/sax2parser.rb:195:in `call'
/home/ubuntu/.rvm/rubies/ruby-1.9.3-
p385/lib/ruby/1.9.1/rexml/parsers/sax2parser.rb:195:in `block in handle'
/home/ubuntu/.rvm/rubies/ruby-1.9.3-
p385/lib/ruby/1.9.1/rexml/parsers/sax2parser.rb:195:in `each'
/home/ubuntu/.rvm/rubies/ruby-1.9.3-
p385/lib/ruby/1.9.1/rexml/parsers/sax2parser.rb:195:in `handle'
/home/ubuntu/.rvm/rubies/ruby-1.9.3-
p385/lib/ruby/1.9.1/rexml/parsers/sax2parser.rb:95:in `parse'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p385/gems/xmpp4r-
0.5/lib/xmpp4r/streamparser.rb:79:in `parse'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p385/gems/xmpp4r-
0.5/lib/xmpp4r/stream.rb:75:in `block in start'
W, [2013-02-18T03:25:56.212740 #15238] WARN -- : Exception caught in Parser
thread! (Jabber::ServerDisconnected)
/home/ubuntu/.rvm/gems/ruby-1.9.3-p385/gems/xmpp4r-
0.5/lib/xmpp4r/streamparser.rb:68:in `block in parse'
Any ideas?
Thanks!!
I also faced this issue when sending message over facebook using Jabber.
Even wrapped in a try/catch, sometimes, Jabber::ServerDisconnected thrown and caused web server stop.
In xmpp4r source code, they thrown Jabber::ServerDisconnected when received disconnected signal and Thread.abort_on_exception = true in each thread
Ref https://github.com/lnussbaum/xmpp4r/blob/master/lib/xmpp4r/streamparser.rb and https://github.com/lnussbaum/xmpp4r/blob/master/lib/xmpp4r/stream.rb
I guess exception thrown in an orphan thread.
I have no solution, but a workaround that set Thread::abort_on_exception = false globally (in class/method using Jabber). So exception still thrown, but we ignore it.
There is a better way of handling errors, as mentioned in the docs:
If you want your connection to survive disconnects and timeouts, catch exception in Stream#on_exception and re-call Client#connect and Client#auth. Don‘t forget to re-send initial Presence and everything else you need to setup your session.
Stream#on_exception link