MySQL - Can't connect to the database

৭০টি ভিউ
প্রথম অপঠিত মেসেজটিতে চলে আসুন

Mert Öztürk

পড়া হয়নি,
২৯ ফেব, ২০১৬, ২:৪৫:২৯ PM২৯/২/১৬
প্রাপক ChicagoBoss
Hello,

I am using the current CB master for OTP 18, and running erlang 18.2.
In my local, everything was going fine with MySQL connection. Now i am trying to setup my CB app on remote vps but can not connect to MySQL. I checked a lot but couldnt figure out the problem.
My db shards model looks like this in boss.config;

{db_shards, [ 
              [
                 {db_host, "localhost"}, 
                 {db_adapter,mysql}, 
                 {db_port, 3306}, 
                 {db_write_mode, safe},
                 {db_read_mode, master},
                 {db_username, "root"}, 
                 {db_password, "123456"}, 
                 {db_name, "all_data"},
                 {db_shard_id,all_data}, 
                 {db_shard_models, [data1,data2,data3,data4,data5,data6]}   
              ]
     ]},

Although i check root password and all root privileges still can not connect to the database named "all_data" containing tables: data1,data2,data3,data4,data5,data6
I get the following error;

 [error] gen_server <0.105.0> terminated with reason: no match of right hand value {connection_error,{error,failed_changing_database}} in boss_db_controller:'-make_shards/2-fun-0-'/4 line 370
14:32:16.358 [error] gen_server <0.104.0> terminated with reason: no match of right hand value {connection_error,{error,failed_changing_database}} in boss_db_controller:'-make_shards/2-fun-0-'/4 line 370
14:32:16.359 [error] gen_server <0.103.0> terminated with reason: no match of right hand value {connection_error,{error,failed_changing_database}} in boss_db_controller:'-make_shards/2-fun-0-'/4 line 370
14:32:16.359 [error] gen_server <0.102.0> terminated with reason: no match of right hand value {connection_error,{error,failed_changing_database}} in boss_db_controller:'-make_shards/2-fun-0-'/4 line 370
14:32:16.359 [error] gen_server <0.101.0> terminated with reason: no match of right hand value {connection_error,{error,failed_changing_database}} in boss_db_controller:'-make_shards/2-fun-0-'/4 line 370
14:32:16.382 [error] CRASH REPORT Process <0.105.0> with 0 neighbours exited with reason: no match of right hand value {connection_error,{error,failed_changing_database}} in boss_db_controller:'-make_shards/2-fun-0-'/4 line 370 in gen_server:terminate/7 line 826
14:32:16.383 [error] CRASH REPORT Process <0.104.0> with 0 neighbours exited with reason: no match of right hand value {connection_error,{error,failed_changing_database}} in boss_db_controller:'-make_shards/2-fun-0-'/4 line 370 in gen_server:terminate/7 line 826
14:32:16.383 [error] CRASH REPORT Process <0.103.0> with 0 neighbours exited with reason: no match of right hand value {connection_error,{error,failed_changing_database}} in boss_db_controller:'-make_shards/2-fun-0-'/4 line 370 in gen_server:terminate/7 line 826
14:32:16.383 [error] CRASH REPORT Process <0.102.0> with 0 neighbours exited with reason: no match of right hand value {connection_error,{error,failed_changing_database}} in boss_db_controller:'-make_shards/2-fun-0-'/4 line 370 in gen_server:terminate/7 line 826
14:32:16.384 [error] CRASH REPORT Process <0.101.0> with 0 neighbours exited with reason: no match of right hand value {connection_error,{error,failed_changing_database}} in boss_db_controller:'-make_shards/2-fun-0-'/4 line 370 in gen_server:terminate/7 line 826
14:32:16.384 [error] Supervisor {<0.100.0>,poolboy_sup} had child undefined started with {boss_db_controller,start_link,undefined} at <0.105.0> exit with reason no match of right hand value {connection_error,{error,failed_changing_database}} in boss_db_controller:'-make_shards/2-fun-0-'/4 line 370 in context child_terminated
14:32:16.384 [error] Supervisor {<0.100.0>,poolboy_sup} had child undefined started with {boss_db_controller,start_link,undefined} at <0.104.0> exit with reason no match of right hand value {connection_error,{error,failed_changing_database}} in boss_db_controller:'-make_shards/2-fun-0-'/4 line 370 in context child_terminated
14:32:16.385 [error] Supervisor {<0.100.0>,poolboy_sup} had child undefined started with {boss_db_controller,start_link,undefined} at <0.103.0> exit with reason no match of right hand value {connection_error,{error,failed_changing_database}} in boss_db_controller:'-make_shards/2-fun-0-'/4 line 370 in context child_terminated
14:32:16.385 [error] Supervisor {<0.100.0>,poolboy_sup} had child undefined started with {boss_db_controller,start_link,undefined} at <0.102.0> exit with reason no match of right hand value {connection_error,{error,failed_changing_database}} in boss_db_controller:'-make_shards/2-fun-0-'/4 line 370 in context child_terminated
14:32:16.386 [error] Supervisor {<0.100.0>,poolboy_sup} had child undefined started with {boss_db_controller,start_link,undefined} at <0.101.0> exit with reason no match of right hand value {connection_error,{error,failed_changing_database}} in boss_db_controller:'-make_shards/2-fun-0-'/4 line 370 in context child_terminated

Your help would be appreciated.
Regards
Mert


Mert Öztürk

পড়া হয়নি,
২৯ ফেব, ২০১৬, ৪:৩৫:১৯ PM২৯/২/১৬
প্রাপক ChicagoBoss
Hello,

Just realized {db_shards, [  was wrong for only using MySQL and corrected it.
Now i faced with a simple_bridge issue like below;

Application simple_bridge exited with reason: bad return value 'no backend defined' from simple_bridge_app:start(normal, [])

May i get help about this?

Thanks
Mert

29 Şubat 2016 Pazartesi 21:45:29 UTC+2 tarihinde Mert Öztürk yazdı:

Mert Öztürk

পড়া হয়নি,
২৯ ফেব, ২০১৬, ৫:৩১:৪৩ PM২৯/২/১৬
প্রাপক ChicagoBoss
Well i got in more and realized ranch,cowlib, and cowboy does not start automatically so http listener doesnt start and nothing happens without server.
Do you have any idea why they are not starting automatically?
I am using the current CB master for OTP 18, and running erlang 18.2.

Mert


29 Şubat 2016 Pazartesi 23:35:19 UTC+2 tarihinde Mert Öztürk yazdı:

Mert Öztürk

পড়া হয়নি,
২৯ ফেব, ২০১৬, ৬:৩৮:৫৮ PM২৯/২/১৬
প্রাপক ChicagoBoss
I have changed the boss config as the latest release. Now all applications started but still no response from the server..

18:32:20.371 [info] Application ranch started on node user@app
18:32:20.374 [info] Application cowlib started on node user@app
Starting Cowboy Server on {127,0,0,1}:8001
18:32:20.386 [info] Application cowboy started on node user@app
Using Cowboy Dispatch Table:
  [{'_',[],
        [{[<<"static">>,'...'],
          [],cowboy_static,
          {priv_dir,app,"static",[{mimetypes,cow_mimetypes,all}]}},
         {'_',[],cowboy_simple_bridge_anchor,[]}]}]

Still could not find where i got stuck





29 Şubat 2016 Pazartesi 21:45:29 UTC+2 tarihinde Mert Öztürk yazdı:
Hello,

Dmitry Polyanovsky

পড়া হয়নি,
৩ মার্চ, ২০১৬, ৫:২১:৫০ AM৩/৩/১৬
প্রাপক ChicagoBoss
Hello,

you should not use shards, unless you really need them. Also, if you upgraded from v0.8 to latest master, please update boss.config too.
সকলকে উত্তর দিন
লেখককে লিখে পাঠান
ফরওয়ার্ড করুন
মেসেজ মুছে দেওয়া হয়েছে
0টি নতুন মেসেজ