{"action":"created","issue":{"url":"https://api.github.com/repos/processone/ejabberd/issues/2435","repository_url":"https://api.github.com/repos/processone/ejabberd","labels_url":"https://api.github.com/repos/processone/ejabberd/issues/2435/labels{/name}","comments_url":"https://api.github.com/repos/processone/ejabberd/issues/2435/comments","events_url":"https://api.github.com/repos/processone/ejabberd/issues/2435/events","html_url":"https://github.com/processone/ejabberd/issues/2435","id":326496079,"number":2435,"title":"ejabberd18.04 with MySQL  SASLError using SCRAM-SHA-1: not-authorized","user":{"login":"wqxcloud","id":23133414,"avatar_url":"https://avatars0.githubusercontent.com/u/23133414?v=4","gravatar_id":"","url":"https://api.github.com/users/wqxcloud","html_url":"https://github.com/wqxcloud","followers_url":"https://api.github.com/users/wqxcloud/followers","following_url":"https://api.github.com/users/wqxcloud/following{/other_user}","gists_url":"https://api.github.com/users/wqxcloud/gists{/gist_id}","starred_url":"https://api.github.com/users/wqxcloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wqxcloud/subscriptions","organizations_url":"https://api.github.com/users/wqxcloud/orgs","repos_url":"https://api.github.com/users/wqxcloud/repos","events_url":"https://api.github.com/users/wqxcloud/events{/privacy}","received_events_url":"https://api.github.com/users/wqxcloud/received_events","type":"User","site_admin":false},"labels":[{"id":179046635,"url":"https://api.github.com/repos/processone/ejabberd/labels/Component:Databases","name":"Component:Databases","color":"fef2c0","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-25T12:05:27Z","updated_at":"2018-05-28T11:57:59Z","closed_at":null,"author_association":"NONE","body":"> What version of ejabberd are you using?\r\n\r\n18.04\r\n\r\n> What operating system (version) are you using?\r\n\r\nUbuntu 14.04.5 LTS (GNU/Linux 4.4.0-85-generic x86_64)\r\n\r\n> How did you install ejabberd (source, package, distribution)?\r\n\r\n./ejabberd-18.04-linux-x86_64-installer.run\r\n\r\n> What did not work as expected? \r\nafter 7 hours about,i can`t login with the same account and password when i install ejabberd18.04\r\n\r\nHi，I need your help,please\r\nwhen i install the ejabberd successful, not to start it. i edit the ejabberd.yml as follow to use mysql 5.7 ,then  i start ejabberd, then register account and admin in  localhost  servicer,  there are accounts in  mysql  table of user, i login account with android mobile with internet(not wifi),i can successful login.\r\nbut after half day(7 hours about),i can't login with the same account and password（plain），such as  account: 123456   pwd:123456aaa, information as follows, can you help me,best wish\r\n\r\nejabberd.yml\r\n```\r\nauth_mothod: sql\r\ndefault_db: sql\r\n\r\n     sql_type: mysql\r\n     sql_server: \"\"\r\n     sql_database: \"e\"\r\n     sql_username: \"\"\r\n     sql_password: \"\"\r\n```\r\n\r\n> Arethere error messages in the log? \r\n\r\n```\r\nexception\r\n05-24 12:30:35.740 24600-24698/com.wqx.dowa I/XmppService: LogUtils:XXException e=com.wqx.dowa.exception.XXException: SASLError using SCRAM-SHA-1: not-authorized\r\n05-24 12:30:35.741 24600-24698/com.wqx.dowa I/com.wqx.dowa.service.XmppService: LogUtils:XMPPException in doConnect():\r\n05-24 12:30:35.741 24600-24698/com.wqx.dowa W/System.err: com.wqx.dowa.exception.XXException: SASLError using SCRAM-SHA-1: not-authorized\r\n05-24 12:30:35.742 24600-24698/com.wqx.dowa W/System.err:     at com.wqx.dowa.smack.SmackImpl.login(SmackImpl.java:536)\r\n05-24 12:30:35.742 24600-24698/com.wqx.dowa W/System.err:     at com.wqx.dowa.service.XmppService$1.run(XmppService.java:230)\r\n05-24 12:30:35.748 24600-24600/com.wqx.dowa I/LoginActivity: LogUtils:LoginActivity connectionStatusChanged connectedState=-1\r\n05-24 12:30:35.748 24600-24600/com.wqx.dowa I/LoginActivity: LogUtils:LoginActivity connectionStatusChanged reason=SASLError using SCRAM-SHA-1: not-authorized\r\n05-24 12:30:35.875 23178-24436/? I/SendBroadcastPermission: action:com.taobao.accs.intent.action.CONNECTINFO, mPermissionType:0\r\n```\r\n\r\n\r\nejabberd.log\r\n```\r\n2018-05-25 19:42:11.895 [error] <0.471.0>@ejabberd_sql:log:950 p1_mysql_conn: p1_mysql_recv: socket was closed {<0.486.0>,normal}\r\n2018-05-25 19:42:11.896 [error] <0.972.0>@ejabberd_sql:check_error:1100 SQL query 'Q90173024' at {ejabberd_auth_sql,152} failed: \"p1_mysql_recv: socket was closed\"\r\n2018-05-25 19:42:11.896 [info] <0.972.0>@ejabberd_c2s:handle_auth_failure:444 (tcp|<0.972.0>) Failed c2s SCRAM-SHA-1 authentication for 100000@123.56.30.171 from ::ffff:223.223.196.168: Invalid username or password\r\n2018-05-25 19:47:33.373 [info] <0.407.0>@ejabberd_listener:accept:302 (<0.978.0>) Accepted connection ::ffff:223.223.196.168:50355 -> ::ffff:172.17.181.14:5280\r\n2018-05-25 19:47:38.833 [info] <0.407.0>@ejabberd_listener:accept:302 (<0.979.0>) Accepted connection ::ffff:223.223.196.168:50367 -> ::ffff:172.17.181.14:5280\r\n2018-05-25 19:47:46.388 [info] <0.407.0>@ejabberd_listener:accept:302 (<0.980.0>) Accepted connection ::ffff:223.223.196.168:50378 -> ::ffff:172.17.181.14:5280\r\n2018-05-25 19:47:46.388 [info] <0.407.0>@ejabberd_listener:accept:302 (<0.981.0>) Accepted connection ::ffff:223.223.196.168:50379 -> ::ffff:172.17.181.14:5280\r\n2018-05-25 19:47:47.972 [error] <0.472.0>@ejabberd_sql:log:950 p1_mysql_conn: p1_mysql_recv: socket was closed {<0.487.0>,normal}\r\n2018-05-25 19:47:47.972 [error] <0.981.0>@ejabberd_sql:check_error:1100 SQL query 'Q90173024' at {ejabberd_auth_sql,152} failed: \"p1_mysql_recv: socket was closed\"\r\n2018-05-25 19:47:47.972 [warning] <0.981.0>@ejabberd_web_admin:process:234 Access of <<\"admin\">> from <<\"::ffff:223.223.196.168\">> failed with error: <<\"inexistent-account\">>\r\n```\r\n\r\n```\r\nroot@xu:/opt/ejabberd/logs# tail -f error.log \r\n2018-05-25 19:42:02.262 [error] <0.468.0>@ejabberd_sql:log:950 p1_mysql_conn: p1_mysql_recv: socket was closed {<0.483.0>,normal}\r\n2018-05-25 19:42:02.262 [error] <0.969.0>@ejabberd_sql:check_error:1100 SQL query 'Q90173024' at {ejabberd_auth_sql,152} failed: \"p1_mysql_recv: socket was closed\"\r\n2018-05-25 19:42:06.306 [error] <0.469.0>@ejabberd_sql:log:950 p1_mysql_conn: p1_mysql_recv: socket was closed {<0.484.0>,normal}\r\n2018-05-25 19:42:06.306 [error] <0.970.0>@ejabberd_sql:check_error:1100 SQL query 'Q90173024' at {ejabberd_auth_sql,152} failed: \"p1_mysql_recv: socket was closed\"\r\n2018-05-25 19:42:09.136 [error] <0.470.0>@ejabberd_sql:log:950 p1_mysql_conn: p1_mysql_recv: socket was closed {<0.485.0>,normal}\r\n2018-05-25 19:42:09.136 [error] <0.971.0>@ejabberd_sql:check_error:1100 SQL query 'Q90173024' at {ejabberd_auth_sql,152} failed: \"p1_mysql_recv: socket was closed\"\r\n2018-05-25 19:42:11.895 [error] <0.471.0>@ejabberd_sql:log:950 p1_mysql_conn: p1_mysql_recv: socket was closed {<0.486.0>,normal}\r\n2018-05-25 19:42:11.896 [error] <0.972.0>@ejabberd_sql:check_error:1100 SQL query 'Q90173024' at {ejabberd_auth_sql,152} failed: \"p1_mysql_recv: socket was closed\"\r\n2018-05-25 19:47:47.972 [error] <0.472.0>@ejabberd_sql:log:950 p1_mysql_conn: p1_mysql_recv: socket was closed {<0.487.0>,normal}\r\n2018-05-25 19:47:47.972 [error] <0.981.0>@ejabberd_sql:check_error:1100 SQL query 'Q90173024' at {ejabberd_auth_sql,152} failed: \"p1_mysql_recv: socket was closed\"`\r\n```\r\n\r\n> What was the unexpected behavior?\r\n\r\nSASLError using SCRAM-SHA-1: not-authorized\r\n\r\n> What was the expected result?\r\n\r\nlogin successful\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/processone/ejabberd/issues/comments/392507725","html_url":"https://github.com/processone/ejabberd/issues/2435#issuecomment-392507725","issue_url":"https://api.github.com/repos/processone/ejabberd/issues/2435","id":392507725,"user":{"login":"badlop","id":96807,"avatar_url":"https://avatars1.githubusercontent.com/u/96807?v=4","gravatar_id":"","url":"https://api.github.com/users/badlop","html_url":"https://github.com/badlop","followers_url":"https://api.github.com/users/badlop/followers","following_url":"https://api.github.com/users/badlop/following{/other_user}","gists_url":"https://api.github.com/users/badlop/gists{/gist_id}","starred_url":"https://api.github.com/users/badlop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/badlop/subscriptions","organizations_url":"https://api.github.com/users/badlop/orgs","repos_url":"https://api.github.com/users/badlop/repos","events_url":"https://api.github.com/users/badlop/events{/privacy}","received_events_url":"https://api.github.com/users/badlop/received_events","type":"User","site_admin":false},"created_at":"2018-05-28T11:57:59Z","updated_at":"2018-05-28T11:57:59Z","author_association":"MEMBER","body":"So, the connection to the MySQL server gets closed sometime between ejabberd start and the next time you attempt to login. Ideas so you can investigate the problem in your machine:\r\n* Check in the logs if the connection gets closed at a fixed time. \r\n* Check if you can login correctly between those hours. \r\n* Also check if the connection lives longer if you login between, or if it's closed always after X fixed hours."}}
{"actor":{"display_login":"badlop"}}