The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Problem setting up cPanelSync Server...

Discussion in 'cPanel Developers' started by mtylerb, Dec 23, 2012.

  1. mtylerb

    mtylerb Well-Known Member

    Joined:
    Nov 10, 2007
    Messages:
    57
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Warburg, AB, Canada
    cPanel Access Level:
    Root Administrator
    I've followed the, somewhat unclear, instructions over at Distributing Your Addons, but I'm getting the following error from WHM when I try to add myself as a vendor:

    I've run the cpanelsync_build_addons_dir script, I have my vendor files in the appropriate directories. I have the addon in the vendor subfolder. The only thing I'm not clear on 100% is what I'm supposed to name the file referred to in Distributing your software, subheading to the first link. It says
    but doesn't state what default name the script is looking for ... if such thing exists. I've even tried directing right to the file like https://www.********.net/cpaddons/cPAddon.pm", but still nothing. I've even tried regular http instead of https.

    Any help? I've spent the last hour and a half working on this with no luck.

    Thanks.

    EDIT: WHM is 11.34.1 Build 5. Not sure if you need any other information.
     
    #1 mtylerb, Dec 23, 2012
    Last edited: Dec 23, 2012
  2. cPanelDavidN

    cPanelDavidN Integration Developer
    Staff Member

    Joined:
    Dec 17, 2009
    Messages:
    571
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Hi mtylerb,

    In the second section, Distributing your software, the "URL of this script" is referring to the public URL that one would use to have Apache render the script. So, take that example script (modding the values as the document specifies for your server) and place it in an Apache docroot. This script is essentially a manifest. Other servers that hit this URL will be cause the script to print the relative info, like the md5 of our Vendor.pm file and the directory path of the actual cPanel sync tree (served on the same domain)

    For example:

    A) I have a cPanel account name dave who has a main domain called dave-software.net
    B) I place the modified script into /home/dave/public_html/dave_cpanel_sync.cgi
    C) I can use http://dave-software.net/dave_cpanel_sync.cgi as my cPanel sync address
    D.1) When a cPanel server requests cPAddon info and availability of 'dave', it will make an HTTP request of the .cgi script
    D.2) the .cgi will print info related to 'dave' software
    D.3) the request server will then make more requests the will sync down the cPAddon files within dave-software.net/the/cpanel/sync/location/printed/by/script/ (aka: /home/dave/public_html/the/cpanel/sync/location/printed/by/script/)

    Regards,
    -DavidN
     
  3. mtylerb

    mtylerb Well-Known Member

    Joined:
    Nov 10, 2007
    Messages:
    57
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Warburg, AB, Canada
    cPanel Access Level:
    Root Administrator
    Ok, so improvements have been made. Now I can at least connect to the server, but now I'm getting a bunch of 301 errors. The error output is below. The URLs in the errors are correct, copying and pasting them into my browser brought up the pm file. So I'm a little confused why it couldn't fetch the files.

    Code:
    Adding Vendor mtylerb to your config...
    Fetching http://www.********.net/cpaddons/cPAddonsAvailable/mtylerb.pm (connected:0).......(request attempt 1/12)...Resolving http://forums.cpanel.net/f42/www.********.net...(resolve attempt 1/65)......connecting to 199.***.***.125...@199.***.***.125......connected......receiving...Error 301 while fetching URL http://www.********.net//cpaddons/cPAddonsAvailable/mtylerb.pm ...skipping 199.***.***.125......server closed connection......(request attempt 2/12)......connecting to 199.***.***.125...@199.***.***.125......connected......receiving...Error 301 while fetching URL http://www.********.net//cpaddons/cPAddonsAvailable/mtylerb.pm ...skipping 199.***.***.125......server closed connection......(request attempt 3/12)......connecting to 199.***.***.125...@199.***.***.125......connected......receiving...Error 301 while fetching URL http://www.********.net//cpaddons/cPAddonsAvailable/mtylerb.pm ...skipping 199.***.***.125......server closed connection......(request attempt 4/12)......connecting to 199.***.***.125...@199.***.***.125......connected......receiving...Error 301 while fetching URL http://www.********.net//cpaddons/cPAddonsAvailable/mtylerb.pm ...skipping 199.***.***.125......server closed connection......(request attempt 5/12)......connecting to 199.***.***.125...@199.***.***.125......connected......receiving...Error 301 while fetching URL http://www.********.net//cpaddons/cPAddonsAvailable/mtylerb.pm ...skipping 199.***.***.125......server closed connection......(request attempt 6/12)......connecting to 199.***.***.125...@199.***.***.125......connected......receiving...Error 301 while fetching URL http://www.********.net//cpaddons/cPAddonsAvailable/mtylerb.pm ...skipping 199.***.***.125......server closed connection......(request attempt 7/12)......connecting to 199.***.***.125...@199.***.***.125......connected......receiving...Error 301 while fetching URL http://www.********.net//cpaddons/cPAddonsAvailable/mtylerb.pm ...skipping 199.***.***.125......server closed connection......(request attempt 8/12)......connecting to 199.***.***.125...@199.***.***.125......connected......receiving...Error 301 while fetching URL http://www.********.net//cpaddons/cPAddonsAvailable/mtylerb.pm ...skipping 199.***.***.125......server closed connection......(request attempt 9/12)......connecting to 199.***.***.125...@199.***.***.125......connected......receiving...Error 301 while fetching URL http://www.********.net//cpaddons/cPAddonsAvailable/mtylerb.pm ...skipping 199.***.***.125......server closed connection......(request attempt 10/12)......connecting to 199.***.***.125...@199.***.***.125......connected......receiving...Error 301 while fetching URL http://www.********.net//cpaddons/cPAddonsAvailable/mtylerb.pm ...skipping 199.***.***.125......server closed connection......(request attempt 11/12)......connecting to 199.***.***.125...@199.***.***.125......connected......receiving...Error 301 while fetching URL http://www.********.net//cpaddons/cPAddonsAvailable/mtylerb.pm ...skipping 199.***.***.125......server closed connection......(request attempt 12/12)......connecting to 199.***.***.125...@199.***.***.125......connected......receiving...Error 301 while fetching URL http://www.********.net//cpaddons/cPAddonsAvailable/mtylerb.pm ...skipping 199.***.***.125......server closed connection......Done Fetching http://www.********.net/cpaddons/cPAddonsMD5/mtylerb.pm (connected:0).......(request attempt 1/12)...Resolving http://forums.cpanel.net/f42/www.********.net...(resolve attempt 1/65)......connecting to 199.***.***.125...@199.***.***.125......connected......receiving...Error 301 while fetching URL http://www.********.net//cpaddons/cPAddonsMD5/mtylerb.pm ...skipping 199.***.***.125......server closed connection......(request attempt 2/12)......connecting to 199.***.***.125...@199.***.***.125......connected......receiving...Error 301 while fetching URL http://www.********.net//cpaddons/cPAddonsMD5/mtylerb.pm ...skipping 199.***.***.125......server closed connection......(request attempt 3/12)......connecting to 199.***.***.125...@199.***.***.125......connected......receiving...Error 301 while fetching URL http://www.********.net//cpaddons/cPAddonsMD5/mtylerb.pm ...skipping 199.***.***.125......server closed connection......(request attempt 4/12)......connecting to 199.***.***.125...@199.***.***.125......connected......receiving...Error 301 while fetching URL http://www.********.net//cpaddons/cPAddonsMD5/mtylerb.pm ...skipping 199.***.***.125......server closed connection......(request attempt 5/12)......connecting to 199.***.***.125...@199.***.***.125......connected......receiving...Error 301 while fetching URL http://www.********.net//cpaddons/cPAddonsMD5/mtylerb.pm ...skipping 199.***.***.125......server closed connection......(request attempt 6/12)......connecting to 199.***.***.125...@199.***.***.125......connected......receiving...Error 301 while fetching URL http://www.********.net//cpaddons/cPAddonsMD5/mtylerb.pm ...skipping 199.***.***.125......server closed connection......(request attempt 7/12)......connecting to 199.***.***.125...@199.***.***.125......connected......receiving...Error 301 while fetching URL http://www.********.net//cpaddons/cPAddonsMD5/mtylerb.pm ...skipping 199.***.***.125......server closed connection......(request attempt 8/12)......connecting to 199.***.***.125...@199.***.***.125......connected......receiving...Error 301 while fetching URL http://www.********.net//cpaddons/cPAddonsMD5/mtylerb.pm ...skipping 199.***.***.125......server closed connection......(request attempt 9/12)......connecting to 199.***.***.125...@199.***.***.125......connected......receiving...Error 301 while fetching URL http://www.********.net//cpaddons/cPAddonsMD5/mtylerb.pm ...skipping 199.***.***.125......server closed connection......(request attempt 10/12)......connecting to 199.***.***.125...@199.***.***.125......connected......receiving...Error 301 while fetching URL http://www.********.net//cpaddons/cPAddonsMD5/mtylerb.pm ...skipping 199.***.***.125......server closed connection......(request attempt 11/12)......connecting to 199.***.***.125...@199.***.***.125......connected......receiving...Error 301 while fetching URL http://www.********.net//cpaddons/cPAddonsMD5/mtylerb.pm ...skipping 199.***.***.125......server closed connection......(request attempt 12/12)......connecting to 199.***.***.125...@199.***.***.125......connected......receiving...Error 301 while fetching URL http://www.********.net//cpaddons/cPAddonsMD5/mtylerb.pm ...skipping 199.***.***.125......server closed connection......Done Url "http://www.********.net/cpaddons" did not work or was otherwise invalid.
    EDIT: Accessing http://www.********.net/cpaddons/ displays just "mtylerb" on the screen. Checking in /usr/local/cpanel/cpaddons/cPAddonsConf.pm correctly shows:

    Code:
     'mtylerb' => {
            'vndinf' => 'https://www.********.net/cpaddons',
            'cphost' => 'www.********.net',
            'cphuri' => '/cpaddons',
            'palmd5' => '10c7c48d9db2e2c9f9bd94b774c18b60',
        },
    Although nothing has been added in the subfolders for the new vendor.
     
    #3 mtylerb, Dec 30, 2012
    Last edited: Dec 30, 2012
  4. cPDan

    cPDan cPanel Staff
    Staff Member

    Joined:
    Mar 9, 2004
    Messages:
    711
    Likes Received:
    4
    Trophy Points:
    18
    Hello,

    I suspect it is something simple but without actually seeing it I can;t do much. Could you open a ticket “ATTN Dan” so I can have a look?

    thanks!
     
  5. colink

    colink Member

    Joined:
    Sep 24, 2012
    Messages:
    10
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Hillsboro, OR
    cPanel Access Level:
    DataCenter Provider
    Those 301 errors in your output are usually caused by people making requests to the regular port (port 80) instead of the SSL port. They can also be caused by bad URL rewriting code in your apache configs.
     
  6. mtylerb

    mtylerb Well-Known Member

    Joined:
    Nov 10, 2007
    Messages:
    57
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Warburg, AB, Canada
    cPanel Access Level:
    Root Administrator
    As requested:

    Your Request id is: 3589023.

    - - - Updated - - -

    I've tried with both https and http, but the system automatically strips the 's' from the SSL link and uses plain HTTP. It's true that I have .htaccess forcing HTTPS.
     
  7. cPDan

    cPDan cPanel Staff
    Staff Member

    Joined:
    Mar 9, 2004
    Messages:
    711
    Likes Received:
    4
    Trophy Points:
    18
    specifics in case but the situation is:
    1. .htaccess redirects (i.e. via HTTP 301) all http:// to https://
    2. SSL has CRT error
     
Loading...

Share This Page