Removing enterprise instance after switching to community

Sebastian's Avatar

Sebastian

13 Oct, 2016 12:32 PM

Hi,

I have download VM with EE and then I did the switch to community by execution this code:
$ rccontrol import Community ~/.rccontrol/enterprise-1/rhodecode.ini

Now I have 2 instances with enterprise-1 and community-1 and of course if I stop the enterprise-1 version I can access the community dashboard but again after restart of VM both are running and the default dashboard is again the enterprise-1 so I need to stop it manually.

In the https://docs.rhodecode.com/RhodeCode-Control/tasks/switch-editions.html I can only find sentence:
After this you can remove old instance of enterprise-1 or community-1.
Could you explain how to do it? Maybe putting it on your page would be a nice idea :)

In first run I have tried rccontrol uninstall enterprise-1 but that crashed the application since when it was starting it looked for some files in enterprise path and those were not there anymore.

  1. Support Staff 1 Posted by Marcin Kuzminsk... on 13 Oct, 2016 01:38 PM

    Marcin Kuzminski's Avatar

    Hi Sebastian,

    Thanks for your feedback. We actually updated the docs on that section so soon we'll push them live.

    Normally you'd do rccontrol uninstall enterprise-1, but before that please remove a file with name channelstream.ini from ~/.rcccontrol/supervisord

    It infact refers to the EE edition executable, or you could edit that file and point to to your community-1 path then it all should work.

  2. 2 Posted by Sebastian on 14 Oct, 2016 08:14 AM

    Sebastian's Avatar

    Hi Marcin,

    Thank you that seems to do the trick :)
    One thing a bit different was that it was a folder supervisors and the file was rhoodecode_config_channelstream.ini but of course that's just semantic :)

    Thanks again.

  3. 3 Posted by by Sebastian on 14 Oct, 2016 09:23 AM

    by Sebastian 's Avatar

    Hi Marcin

    One thing I have noticed now after hitting ctrl+f5 in browser is that it looks like the dashboard has lost its CSS formatting or there is some other problem in rendering page. I'm attaching print screen.

    Can it be something related to uninstalling enterprise or deleting that previous file?

  4. Support Staff 4 Posted by Marcin Kuzminsk... on 14 Oct, 2016 09:43 AM

    Marcin Kuzminski's Avatar

    Sorry forgot about this, you need to change the static path (_static) inside /etc/nginx/site-enabled files from enterprise-1 to community-1

  5. 5 Posted by Sebastian on 14 Oct, 2016 10:13 AM

    Sebastian 's Avatar

    That has helped, thank you :)

  6. 6 Posted by Sebastian on 14 Oct, 2016 11:42 AM

    Sebastian 's Avatar

    A new problem emerged when I went to Admin->Settings->System Info.
    It freezes the web app and it's not responding anymore and even restarting community instance does not changed that.
    In community log I can see last lines:

    2016-10-14 14:32:14.292 INFO [rhodecode.lib.base] IP: 10.132.233.97 User: <AuthUser('id:2[admin] ip:10.132.233.97 auth:True')> accessed /_admin/settings/system [admin/settings.settings_system]
    2016-10-14 14:32:14.295 INFO [rhodecode.lib.auth] user <AuthUser('id:2[admin] ip:10.132.233.97 auth:True')> authenticating with:RHODECODE_AUTH IS authenticated on func SettingsController:__before__
    2016-10-14 14:32:14.982 INFO [rhodecode.lib.vcs.client] Creating pyro proxy for remote_uri=PYRO:git_remote@localhost:10004

  7. Support Staff 7 Posted by Marcin Kuzminsk... on 14 Oct, 2016 12:21 PM

    Marcin Kuzminski's Avatar

    it looks like pyro4 might be misconfigured.. please check if vcsserver-1 is running, and also please check inside community-1/rhodecode.ini if the vcs.server is configured correctly to port 10004

  8. 8 Posted by Sebastian on 14 Oct, 2016 12:36 PM

    Sebastian 's Avatar

    Well this looks like this:

     - NAME: community-1
     - STATUS: RUNNING
     - TYPE: Community
     - VERSION: 4.3.1
     - VCS: None
     - URL: http://127.0.0.1:10008

     - NAME: vcsserver-1
     - STATUS: RUNNING
     - TYPE: VCSServer
     - VERSION: 4.3.1
     - URL: http://127.0.0.1:10001

    It looks like vcsserver-1 is running on 10001.

    In community-1/rhodecode.ini I have:
    vcs.server = localhost:10004
    supervisor.uri = 127.0.0.1:10001

    In vcssercer-1/vcsserver.ini I have:
    ## COMMON ##
    host = 127.0.0.1
    port = 10004

    Now I have restarted the VM and I have:
     - NAME: community-1
     - STATUS: RUNNING
     - TYPE: Community
     - VERSION: 4.3.1
     - VCS: None
     - URL: http://127.0.0.1:10008

     - NAME: vcsserver-1
     - STATUS: RUNNING
     - TYPE: VCSServer
     - VERSION: 4.3.1
     - URL: http://127.0.0.1:10000

    It look like vcsserver can't start on its configured port.
    From netstat I can see this:
    unix 2 [ ] DGRAM 10004 /run/systemd/journal/syslog

  9. Support Staff 9 Posted by Marcin Kuzminsk... on 14 Oct, 2016 12:39 PM

    Marcin Kuzminski's Avatar

    Hi,

    Please run rccontrol self-update && rccontrol self-upgrade to upgrade to latest version.

    In addition in the VM there's a http backend configured and i just noticed it tries to connect via pyro4.

    Please check this guide to reconfigure it: https://community.rhodecode.com/t/new-high-performance-http-backend/71

    As all other things are already changes as in this post you probably need to fix the

    settings in rhodecode.ini:

    vcs.server.protocol = http
    vcs.scm_app_implementation = rhodecode.lib.middleware.utils.scm_app_http
    vcs.hooks.protocol = http
    

    That should fix it.

  10. 10 Posted by Sebastian on 14 Oct, 2016 01:23 PM

    Sebastian 's Avatar

    update went without problem no I'm doing upgrade but it looks like it frozen on DB changes.

    *************************
    *** SQLA BASE RESET ! ***
    *************************
    2016-10-14 16:10:34,073 INFO sqlalchemy.engine.base.Engine
    ALTER TABLE integrations ADD repo_group_id INTEGER
    2016-10-14 16:10:34,073 INFO sqlalchemy.engine.base.Engine {}
    2016-10-14 16:10:34,147 INFO sqlalchemy.engine.base.Engine COMMIT
    2016-10-14 16:10:34,178 INFO sqlalchemy.engine.base.Engine ALTER TABLE integrations ADD FOREIGN KEY(repo_group_id) REFERENCES groups (group_id)
    2016-10-14 16:10:34,179 INFO sqlalchemy.engine.base.Engine {}

    It's been 15 minutes like that, but I will wait for few more to see if something will change.

  11. 11 Posted by Sebastian on 14 Oct, 2016 01:42 PM

    Sebastian 's Avatar

    Unfortunately system was not responding so after breaking the command (it was showind rolling back) now when I try to do rccontrol-upgreade community-1 I'm getting:

    2016-10-14 16:38:20,302 INFO sqlalchemy.engine.base.Engine ROLLBACK
    Traceback (most recent call last):
    ..
    ..
    sqlalchemy.exc.ProgrammingError: (ProgrammingError) column "repo_group_id" of relation "integrations" already exists
     '\nALTER TABLE integrations ADD repo_group_id INTEGER' {}
    Upgrade of RhodeCode Community failed.
    Rolling back to previous version.
    Auto starting community-1
    Supervisord state is: RUNNING

  12. Support Staff 12 Posted by Marcin Kuzminsk... on 14 Oct, 2016 02:07 PM

    Marcin Kuzminski's Avatar

    ups, sorry about that i think the misconfiguration of vcsserver/community might caused that.

    The VM wasn't really build for migration :( we need to make that easier...

    If you don't have any data inside rhodecode, i'd consider uninstalling vcsserver-1 and community-1 and installing it from 0.

    That should just work...

  13. 13 Posted by Sebastian on 14 Oct, 2016 02:21 PM

    Sebastian 's Avatar

    Ok I will try to do that, I'm just wondering if it didn't crash the postgresql on this VM

    So now I will try:
    rccontrol-uninstall vcsserver-1
    rccontrol-uninstall community-1
    and then
    rccontrol-install VCSServer
    rccontrol-install Community

    Let's see what it will bring up :)

  14. 14 Posted by Sebastian on 14 Oct, 2016 02:53 PM

    Sebastian 's Avatar

    I have done all installation and of course after that I have tried to reconfigure backend.

    No I have:
    ➜ ~ rccontrol-status

     - NAME: community-1
     - STATUS: RUNNING
     - TYPE: Community
     - VERSION: 4.4.1
     - VCS: None
     - URL: http://127.0.0.1:10002

     - NAME: vcsserver-1
     - STATUS: RUNNING
     - TYPE: VCSServer
     - VERSION: 4.4.1
     - URL: http://127.0.0.1:10000

    In VCSServer logs it looks ok:
    [2016-10-14 17:42:26 +0000] [1559] [INFO] Starting gunicorn 19.6.0
    [2016-10-14 17:42:26 +0000] [1559] [INFO] Listening at: http://127.0.0.1:9900 (1559)
    [2016-10-14 17:42:26 +0000] [1559] [INFO] Using worker: sync
    [2016-10-14 17:42:26 +0000] [1578] [INFO] Booting worker with pid: 1578
    [2016-10-14 17:42:26 +0000] [1579] [INFO] Booting worker with pid: 1579
    2016-10-14 17:42:30.318 INFO [vcsserver.http_main] Settings locale: `LC_ALL` to en_US.UTF-8
    2016-10-14 17:42:30.321 INFO [vcsserver.http_main] Locale set to language code "en_US" with encoding "UTF-8".
    2016-10-14 17:42:30.322 INFO [vcsserver.http_main] Initializing beaker cache: {'expire': None, 'log_file': None, 'cache_regions': {'repo_object': {'expire': 300, 'max_items': '100', 'type': 'memorylru', 'lock_dir': None, 'key_length': 250, 'enabled': True, 'data_dir': None}}, 'type': 'memory', 'enabled': True, 'data_dir': None}
    2016-10-14 17:42:30.322 INFO [vcsserver.http_main] Settings locale: `LC_ALL` to en_US.UTF-8
    2016-10-14 17:42:30.325 INFO [vcsserver.http_main] Locale set to language code "en_US" with encoding "UTF-8".
    2016-10-14 17:42:30.325 INFO [vcsserver.http_main] Initializing beaker cache: {'expire': None, 'log_file': None, 'cache_regions': {'repo_object': {'expire': 300, 'max_items': '100', 'type': 'memorylru', 'lock_dir': None, 'key_length': 250, 'enabled': True, 'data_dir': None}}, 'type': 'memory', 'enabled': True, 'data_dir': None}

    At community log it looks also ok:
    [2016-10-14 17:36:24 +0000] [1565] [INFO] Starting gunicorn 19.6.0
    [2016-10-14 17:36:24 +0000] [1565] [INFO] Listening at: http://127.0.0.1:10002 (1565)
    [2016-10-14 17:36:24 +0000] [1565] [INFO] Using worker: sync
    [2016-10-14 17:36:24 +0000] [1588] [INFO] Booting worker with pid: 1588
    2016-10-14 17:36:30.322 INFO [rhodecode.model] initializing db for postgresql://postgres:[email blocked].0.1:5432/rhodecode
    2016-10-14 17:36:30.323 INFO [rhodecode.config.environment] Enabled VCS backends: ['git', 'svn', 'hg']
    2016-10-14 17:36:32.381 INFO [rhodecode.lib.auth] getting information about all available permissions
    [2016-10-14 17:42:03 +0000] [1588] [INFO] Worker exiting (pid: 1588)
    [2016-10-14 17:42:03 +0000] [1565] [INFO] Handling signal: term
    [2016-10-14 17:42:03 +0000] [1565] [INFO] Shutting down: Master
    [2016-10-14 17:42:27 +0000] [1560] [INFO] Starting gunicorn 19.6.0
    [2016-10-14 17:42:27 +0000] [1560] [INFO] Listening at: http://127.0.0.1:10002 (1560)
    [2016-10-14 17:42:27 +0000] [1560] [INFO] Using worker: sync
    [2016-10-14 17:42:27 +0000] [1609] [INFO] Booting worker with pid: 1609
    2016-10-14 17:42:33.113 INFO [rhodecode.model] initializing db for postgresql://postgres:[email blocked].0.1:5432/rhodecode
    2016-10-14 17:42:33.114 INFO [rhodecode.config.environment] Enabled VCS backends: ['git', 'svn', 'hg']
    2016-10-14 17:42:35.116 INFO [rhodecode.lib.auth] getting information about all available permissions

    One problem is that when I try to connect to dashboard via http://10.132.236.252/ I'm getting 502 Bad Gateway | Backend server is unreachable with nice RhodeCode icon :)

    One additional thing that I would like to ask why rccontrol-status shows port 10000 for vcsservice when in configurations and logs I can see that it properly starts at port 9900.

  15. 15 Posted by Sebastian on 14 Oct, 2016 03:03 PM

    Sebastian 's Avatar

    I have managed to deal with that bad gateway by changing the proxy_pass but my question regarding the port is still actual :)

  16. Support Staff 16 Posted by Marcin Kuzminsk... on 14 Oct, 2016 05:53 PM

    Marcin Kuzminski's Avatar

    We'll check that, it looks like a bug initially.

    You have reconfigured the instances to run on http mode right ?

  17. 17 Posted by Sebastian on 14 Oct, 2016 06:18 PM

    Sebastian's Avatar

    Yes I think I have changed all needed things from the post you have showed to run on http.

  18. Support Staff 18 Posted by Marcin Kuzminsk... on 14 Oct, 2016 06:21 PM

    Marcin Kuzminski's Avatar

    We checked, and in both cases a mixed http and pyro4 mode ports show fine, can you attach your rhodecode.ini and vcsserver.ini

    Cheers

  19. 19 Posted by Sebastian on 14 Oct, 2016 06:37 PM

    Sebastian's Avatar

    I was already preparing them :)

    Maybe I have missed something...

  20. 20 Posted by Sebastian on 14 Oct, 2016 06:42 PM

    Sebastian's Avatar

    I have attached all 5 configuration files with vcsserver_http.ini because as I understand now configuration should be read from this file not from vcsserver.ini when in fact port 1000 is configured.

  21. Support Staff 21 Posted by Marcin Kuzminsk... on 14 Oct, 2016 06:44 PM

    Marcin Kuzminski's Avatar

    Ahh, that's the problem. By default it always reads from vcsserver.ini and not the file configured in supervisord.

    SO if you replace the vcsserver_http.ini with vcsserver.ini it all should work. We'll update the intructions

  22. 22 Posted by Sebastian on 14 Oct, 2016 07:28 PM

    Sebastian's Avatar

    Ok I will wait for some info :)

    Just for test I have ranamed the vcsserver.ini to vcsserver_old.iniold and restarted my server but now it shows port 10001 so it had to take it from different place :)

    I see 10001 port in rhodecode.ini
    supervisor.uri = 127.0.0.1:10001

    And in supervisord.ini
    serverurl = http://127.0.0.1:10001
    port = 127.0.0.1:10001
    _port = 10001

    rccontrol-status

     - NAME: vcsserver-1
     - STATUS: RUNNING
     - TYPE: VCSServer
     - VERSION: 4.4.1
     - URL: http://127.0.0.1:10001

  23. 23 Posted by Sebastian on 17 Oct, 2016 08:59 AM

    Sebastian's Avatar

    It looks like we are still having some problems.
    After migrating one of our repos for testing we can see it in Dashboard but when cloning with source tree to local computer nothing happens and Dashboard freezes. We are unable to open it.

    Last logs from community:
    2016-10-17 11:12:24.877 INFO [rhodecode.lib.middleware.simplevcs] pull action on git repo "CC/SS" by "default" from 10.132.233.97
    2016-10-17 11:12:24.878 INFO [rhodecode.lib.middleware.simplevcs] Using custom implementation of scm_app: rhodecode.lib.middleware.utils.scm_app_http
    2016-10-17 11:12:24.880 INFO [requests.packages.urllib3.connectionpool] Resetting dropped connection: 127.0.0.1
    2016-10-17 11:12:24.896 INFO [rhodecode.lib.middleware.request_wrapper] IP: 10.132.233.97 Request to /CC/SS/info/refs time: 0.258s
    2016-10-17 11:12:25.332 INFO [rhodecode.lib.middleware.simplevcs] Access for IP:10.132.233.97 allowed
    2016-10-17 11:12:25.516 INFO [rhodecode.lib.middleware.simplevcs] pull action on git repo "CC/SS" by "default" from 10.132.233.97
    2016-10-17 11:12:25.517 INFO [rhodecode.lib.middleware.simplevcs] Using custom implementation of scm_app: rhodecode.lib.middleware.utils.scm_app_http
    2016-10-17 11:12:25.519 INFO [requests.packages.urllib3.connectionpool] Resetting dropped connection: 127.0.0.1
    2016-10-17 11:12:42.172 INFO [rhodecode.lib.utils] Logging action:`pull` on repo:`CC/SS` by user:<User('id:1:default')> ip:10.132.233.97
    2016-10-17 11:12:42.279 INFO [rhodecode.lib.middleware.request_wrapper] IP: 10.132.233.97 Request to /CC/SS/git-upload-pack time: 17.001s

    Last logs from vcsserver:
    2016-10-17 11:12:24.666 DEBUG [vcsserver.svn] Invalid Subversion path /home/rcdev/repos/CC/SS
    2016-10-17 11:12:25.301 DEBUG [vcsserver.base] GET GitFactory@/home/rcdev/repos/CC/SSwith cache:True. Context: 0cdd1b16-8e4b-4320-bf8b-d74c4bb82689
    2016-10-17 11:12:25.301 DEBUG [vcsserver.base] FETCH GitFactory@/home/rcdev/repos/CC/SSrepo object from cache. Context: 0cdd1b16-8e4b-4320-bf8b-d74c4bb82689
    2016-10-17 11:12:25.303 DEBUG [beaker.container] lock_createfunc (waiting)
    2016-10-17 11:12:25.303 DEBUG [beaker.container] lock_createfunc (waited)
    2016-10-17 11:12:25.303 DEBUG [beaker.container] get_value creating new value
    2016-10-17 11:12:25.304 DEBUG [beaker.container] set_value stored time 1476695545.30448 expire time 300
    2016-10-17 11:12:25.304 DEBUG [beaker.container] released create lock
    2016-10-17 11:12:25.308 DEBUG [vcsserver.svn] Invalid Subversion path /home/rcdev/repos/CC/SS
    2016-10-17 11:12:25.585 DEBUG [vcsserver.pygrack] handling cmd ['git', u'upload-pack', '--stateless-rpc', '/home/rcdev/repos/CC/SS']

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

17 Oct, 2018 03:22 PM
15 Oct, 2018 12:10 PM
15 Oct, 2018 05:20 AM
10 Oct, 2018 08:11 AM
03 Oct, 2018 01:16 PM

 

01 Oct, 2018 08:41 AM
28 Sep, 2018 10:12 AM
26 Sep, 2018 04:34 AM
21 Sep, 2018 04:40 PM
18 Sep, 2018 03:30 PM
11 Sep, 2018 09:12 AM