creating user via remoting does not work

Discussion in 'Installation/Configuration' started by AllanJ, Apr 27, 2008.

  1. AllanJ

    AllanJ ISPConfig Developer ISPConfig Developer

    Hi

    I am trying to make an interface so that I can manage my ISPconfig server from an other server, and I hav no problems listing the webs and user etc, but when i tried to create a new user it fails. I can see in the mysql.log that the user i initially createrd but after some more mysql creating anf selcts it is then deleted again.
    Is anyone using the remoting plugin, or can come with some help on this ?

    Best regards
    Allan Jacobsen
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Which version of the remoting framework do you use?
     
  3. AllanJ

    AllanJ ISPConfig Developer ISPConfig Developer

    I am running ISPConfig 2.2.23 and the remoting plugin 4.1beta on a debian etch server.
    I just tried again from the example test.php script and the result is the same, you can see the mysql.log here:


    62088 Init DB db_ispconfig
    62088 Query INSERT INTO isp_isp_user (doctype_id,user_name,user_email,user_username,user_passwort,user_speicher,user_mailquota,user_admin) VALUES ('1014','Uwe Meier','[email protected]','web33_allan','sagichnicht','10','10','0')
    62088 Init DB db_ispconfig
    62088 Query INSERT INTO isp_nodes ( userid, groupid, parent, type, doctype_id, status, icon, modul, doc_id, title
    ) VALUES (
    4,
    1,
    '',
    'a',
    '1014',
    '1',
    '',
    '',
    53,
    ''
    )
    62088 Init DB db_ispconfig
    62088 Query INSERT INTO isp_dep (userid, groupid, parent_doc_id, parent_doctype_id, parent_tree_id, child_doc_id, child_doctype_id, child_tree_id, status)
    VALUES (
    4,
    1,
    4,
    '1013',
    17,
    53,
    '1014',
    182,
    1)
    62088 Init DB db_ispconfig
    62088 Query SELECT * from doctype where doctype_id = '1014'
    62088 Init DB db_ispconfig
    62088 Query SELECT * from isp_server
    62088 Init DB db_ispconfig
    62088 Query select * from isp_isp_user where doc_id = '53'
    62088 Init DB db_ispconfig
    62088 Query SELECT count(doc_id) as doc_count from isp_isp_user where user_username = 'web33_allan'
    62088 Init DB db_ispconfig
    62088 Query UPDATE isp_isp_user SET user_passwort = '||||:xWnMZQ8qF9/8g' where doc_id = '53'
    62088 Init DB db_ispconfig
    62088 Query SELECT * from isp_isp_web, isp_dep where
    isp_isp_web.doc_id = isp_dep.parent_doc_id and
    isp_isp_web.doctype_id = isp_dep.parent_doctype_id and
    isp_dep.child_doctype_id = 1014 and isp_dep.child_doc_id = 53
    62088 Init DB db_ispconfig
    62088 Query SELECT count(doc_id) as doc_count from isp_isp_user, isp_dep where
    isp_isp_user.doc_id = isp_dep.child_doc_id and isp_isp_user.doctype_id = isp_dep.child_doctype_id and
    isp_dep.parent_doctype_id = 1013 and isp_dep.parent_doc_id = 4 and isp_dep.child_doctype_id = 1014
    62088 Init DB db_ispconfig
    62088 Query SELECT * from isp_nodes where doc_id = 4 and doctype_id = 1013
    62088 Init DB db_ispconfig
    62088 Query SELECT * from isp_isp_reseller where reseller_group = 1
    62088 Init DB db_ispconfig
    62088 Query SELECT count(*) AS anzahl FROM isp_isp_user, isp_dep where
    isp_isp_user.doc_id = isp_dep.child_doc_id and isp_isp_user.doctype_id = isp_dep.child_doctype_id and
    isp_dep.parent_doctype_id = 1013 and isp_dep.parent_doc_id = 4 and
    isp_dep.child_doctype_id = 1014 and isp_isp_user.user_email = '[email protected]'
    62088 Init DB db_ispconfig
    62088 Query SELECT count(doc_id) as admin_count from isp_isp_user, isp_dep where
    isp_isp_user.doc_id = isp_dep.child_doc_id and isp_isp_user.doctype_id = isp_dep.child_doctype_id and
    isp_dep.parent_doctype_id = 1013 and isp_dep.parent_doc_id = 4 and isp_dep.child_doctype_id = 1014 and user_admin = '1'
    62088 Init DB db_ispconfig
    62088 Query DELETE from isp_isp_user where doc_id = '53'
    62088 Init DB db_ispconfig
    62088 Query DELETE from isp_nodes where doc_id = '53' and doctype_id = '1014'
    62088 Quit

    Best regards
    Allan
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    ISPConfig removes the record because the user_email field contains unallowed characters. Set user email to: 'uwe' and not '[email protected]'.
     
  5. AllanJ

    AllanJ ISPConfig Developer ISPConfig Developer

    No, that is not the problem, I tried that yesterday, but i tried something else, and it turns out that I am not able to create a user with the normal ISPConfig webinterface.
    To check this I have just installed a fresh copy of ISPconfig 2.2.23 and remoting beta4.1 on another server, and I am not able to create users with the normal webinterface. I dont know if the database can be corrupt, but I will try to clean the db_ispconfig and start over.

    Best regards
    Allan Jacobsen
     
  6. AllanJ

    AllanJ ISPConfig Developer ISPConfig Developer

    OK, this just gets worse, I deleted the database, /root/ispconfig and /home/admispconfig. Then I made a clean install, created a reseller, and logged in as that reseller. Then I made a client, and a website for that client, but when I try to create a user under that website it fails every time.
    The errormessage is:

    The following error occurred:



    The selected diskspace exceeds site's limits.


    Next >>


    Is there an error in 2.2.23 or is it just me ?

    Best regards
    Allan Jacobsen
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    there is no error in 2.2.3, you just set the limit wrong.

    Please set the disk space limut of the user to a value that does not exceed the quota of the site. Be aware that if you set the limit of the user to -1 then the site must be set to -1 too, otherwise the users limit is larger then the site limt.
     
  8. AllanJ

    AllanJ ISPConfig Developer ISPConfig Developer

    OK, now things are clearing up a bit, all webinterfaces work, including on the testserver, where I am trying to get remoting to work, but remoting "user_add" still does not work, and I have removed the @domain part of the email.

    "web_list" and "user_list" work fine with remoting, so it must be something specific with user_add.

    Is there something else I can try to find the problem ?
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post the INSERT mysql statement from the mysql log that is used now.
     
  10. AllanJ

    AllanJ ISPConfig Developer ISPConfig Developer

    The start of the mysql log for a remoting "user_add" looks like this:

    68251 Query INSERT INTO isp_isp_user (doctype_id,user_name,user_email,user_username,user_passwort,user_speicher,user_mailquota,user_admin) VALUES ('1014','Uwe Mer','uwe','web33_uwe','sagichnicht','0','1
    68251 Init DB db_ispconfig
    68251 Query INSERT INTO isp_nodes ( userid, groupid, parent, type, doctype_id, status, icon, modul, doc_id, titleM
    ) VALUES (M
    4,M
    1,M
    '',M
    'a',M
    '1014',M
    '1',M
    '',M
    '',M
    68,M
    ''M
    )
    68251 Init DB db_ispconfig
    68251 Query INSERT INTO isp_dep (userid, groupid, parent_doc_id, parent_doctype_id, parent_tree_id, child_doc_id, child_doctype_id, child_tree_id, status)M
    VALUES (M
    4,M
    1,M
    4,M
    '1013',M
    17,M
    68,M
    '1014',M
    200,M
    1)
    68251 Init DB db_ispconfig
    68251 Query SELECT * from doctype where doctype_id = '1014'
    68251 Init DB db_ispconfig
    68251 Query SELECT * from isp_server
    68251 Init DB db_ispconfig
    68251 Query select * from isp_isp_user where doc_id = '68'
    68251 Init DB db_ispconfig
    68251 Query SELECT count(doc_id) as doc_count from isp_isp_user where user_username = 'web33_uwe'
    68251 Init DB db_ispconfig
    68251 Query UPDATE isp_isp_user SET user_passwort = '||||:Xjd7M41I4c/eo' where doc_id = '68'


    If I make a user with the webinterface the start of the mysql log is a bit different:

    68245 Query INSERT INTO isp_isp_user (user_name, user_passwort, user_speicher, user_admin, user_shell) VALUES ('Jens Meier', 'test1234', '0', '0', '0')
    68245 Init DB db_ispconfig
    68245 Query INSERT INTO isp_nodes (title, doctype_id, doc_id, type, icon, userid, groupid, status) VALUES ('', '1014', '67', 'a', '', '1', '0', '1')
    68245 Init DB db_ispconfig
    68245 Query Select userid, groupid from isp_nodes where tree_id = '79'
    68245 Init DB db_ispconfig
    68245 Query select * from user_groups where groupid = '2' and userid = '1'
    68245 Init DB db_ispconfig
    68245 Query SELECT * from isp_nodes where tree_id = '79'
    68245 Init DB db_ispconfig
    68245 Query INSERT INTO isp_dep (userid,groupid,parent_doc_id,parent_doctype_id,parent_tree_id,child_doc_id,child_doctype_id,child_tree_id) VALUES
    ('0','2','26','1013','79','67','1014','199')
    68245 Init DB db_ispconfig
    68245 Query SELECT * from sys_config
    68245 Init DB db_ispconfig
    68245 Query UPDATE isp_isp_user SET user_username = 'web33_jens', user_email = 'jens' where doc_id = 67
    68245 Init DB db_ispconfig
    68245 Query SELECT * from isp_server
    68245 Init DB db_ispconfig
    68245 Query select * from isp_isp_user where doc_id = '67'
    68245 Init DB db_ispconfig
    68245 Query SELECT count(doc_id) as doc_count from isp_isp_user where user_username = 'web33_jens'
    68245 Init DB db_ispconfig
    68245 Query UPDATE isp_isp_user SET user_passwort = '||||:]{AMOnrho.08c' where doc_id = '67'

    so it would seem that the 2 operations take different paths in the code, but I have not dug that deep into ispconfig yet.

    Best regards
    Allan Jacobsen
     

Share This Page