Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Solved Jingo LDAP problem

    Jingo
    3
    5
    254
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      tadeas last edited by

      Hi, I installed Jingo, it runs fine. When I edit the config.yaml in /data through the terminal and then restart the app, the settings are applied. However, when I log out and then want to log back in, I get Cloudron's "something went wrong" error page. In the logs, I see:

      May 12 20:56:40 Generating config file
      May 12 20:56:41 Starting jingo
      May 12 20:56:41 Sun May 12 2019 20:56:41 GMT+0000 (UTC) - Jingo server v1.8.5 listening on port 6067
      May 12 20:56:44 /app/code/node_modules/ldapjs/lib/url.js:16
      May 12 20:56:44 throw new TypeError(urlStr + ' is an invalid LDAP url (protocol)');
      May 12 20:56:44 ^
      May 12 20:56:44
      May 12 20:56:44 TypeError: ##LDAP_URL is an invalid LDAP url (protocol)

      When I remove the config file, I can log in without problems. I have repeated this process a few times and cannot get over it. It seems like a problem with the config rewrite on cloudron's side.

      Thanks. T.

      1 Reply Last reply Reply Quote 0
      • fbartels
        fbartels App Dev last edited by

        Hi @tadeas,

        I am not really familiar with Jingo but you probably get more helpful replies if you include a copy of your changed config.yaml in your post.

        1 Reply Last reply Reply Quote 0
        • T
          tadeas last edited by

          Thanks. The way you can replicate it is this: set up jingo instance - login works. Open terminal, copy config.yaml.template from /code/ into data/config.yaml then restart app - login doesn't work. Remove config.yaml, restart app - login works.

          Should I be changing the LDAP settings manually? I think not. In the template config.yaml, there is this:

          ldap:
          enabled: true
          url: "##LDAP_URL"
          bindDn: "##LDAP_BIND_DN"
          bindCredentials: "##LDAP_BIND_PASSWORD"
          searchBase: "##LDAP_USERS_BASE_DN"
          searchFilter: "(|(username={{username}})(mail={{username}}))"

          I thought that the ## parts are replaced by cloudron automatically when app is restarted? That doesn't seem to be happening.

          Thanks. T.

          1 Reply Last reply Reply Quote 0
          • nebulon
            nebulon Staff last edited by

            Hi there. The config file handling in then jingo app package can be seen at https://git.cloudron.io/cloudron/jingo-app/blob/master/start.sh#L18
            So the main config file from the template will get generated by Cloudron on every restart. That one already includes the ldap settings. The one for customizations is /app/data/config.yaml which, as far as I understand, allows to override settings from the main config file. What that means is, that you should be able to only put the custom values you want to override into that file, not all the options.

            1 Reply Last reply Reply Quote 0
            • T
              tadeas last edited by

              OK, thanks. So the problem was that I needed to put only but no less than the -sections- with the changed settings into the config file.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Powered by NodeBB