Jetbrains的团队工具设置

时间:2016-08-06 14:46:12

标签: nginx http-proxy upsource jetbrains-hub

我曾尝试安装 Jetbrains的团队工具几次,取得了一些成功,但大部分功能都无法使用。

这次我出于几个原因购买了一台单独的服务器,包括其他任何无法使其工作的服务器。但我认为真正的问题是我不了解如何正确设置它。

我做了什么:

我正在使用Linode运行Ubuntu 16.04服务器且安装了nginx

我已在此问题中使用 example.com 更改了我的真实域名

安装集线器

  1. /opt/hub/

  2. 中下载并解压缩了Jetbrains的中心
  3. 创建代理以访问/etc/nginx/sites-enabled/jetbrains

  4. 下的网页
    
        ## Hub
        server {
            listen 2222;
            server_name hub.example.com;
    
            location / {
               proxy_set_header X-Forwarded-Host $http_host;
               proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
               proxy_set_header X-Forwarded-Proto $scheme;
               proxy_http_version 1.1;
    
               proxy_pass http://localhost:1111;
            }
        }
    
    
    1. 配置集线器并运行它
    2. 
          /opt/hub/bin/hub.sh configure --listen-port 1111 --base-url http://hub.example.com:2222
      
          /opt/hub/bin/hub.sh run --no-browser
      
      
      1. 已打开http://hub.example.com:2222并进行设置。

      2. 到目前为止一切都很好。所以我从现在开始使用它自己运行Hub服务。

      3. 
            /opt/hub/bin/hub.sh start
        
        

        Upsource的相同过程:

        1. /opt/upsource/

        2. 中下载并解压缩了Jetbrains的Upsource
        3. 创建代理以访问同一档案下的网页/etc/nginx/sites-enabled/jetbrains

        4. 
              ## Hub
              server {
                 ...
              }
          
              ## Upsource
              server {
                  listen 2222;
                  server_name upsource.example.com;
          
                  location / {
                     proxy_set_header X-Forwarded-Host $http_host;
                     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                     proxy_set_header X-Forwarded-Proto $scheme;
                     proxy_http_version 1.1;
          
                     # to proxy WebSockets in nginx
                     proxy_set_header Upgrade $http_upgrade;
                     proxy_set_header Connection "upgrade";
                     proxy_pass_header Sec-Websocket-Extensions;
          
                     proxy_pass http://localhost:1112;
                  }
              }
          
          
          1. 已配置并运行
          2. 
                /opt/upsource/bin/upsource.sh configure --listen-port 1112 --base-url http://upsource.example.com:2222
            
                /opt/upsource/bin/upsource.sh run --no-browser
            
            
            1. 已打开http://upsource.example.com:2222并进行设置。

            2. 当被问到Hub时,我选择了外部版本并填入http://hub.example.com:2222并进行了验证。

            3. 之后,当尝试使用以下日志启动Upsource Frontend时,您将获得引导页面停止的位置:

              
                  * Starting Upsource Frontend 
                  upsource-frontend: [Upsource Frontend Error] log4j:WARN No such property [maxBackupIndex] in org.apache.log4j.FileAppender.
                  upsource-frontend: [Upsource Frontend Error] log4j:WARN No such property [maxBackupIndex] in org.apache.log4j.FileAppender.
                  upsource-frontend: [Upsource Frontend Error] [2016-08-06 13:54:51,067] ERROR APP-WRAPPER] Proxy 1                 er.auth.api.AuthManagerFactory - Cannot configure Authentication module. HubUrlExt=http://hub.example.com:2222/hub, HubUrlInt=http://hub.example.com:2222/hub 
                  upsource-frontend: [Upsource Frontend Error] javax.ws.rs.client.ResponseProcessingException: Failed to convert a response into an exception.
                  upsource-frontend: [Upsource Frontend Error]    at org.glassfish.jersey.client.JerseyInvocation.convertToException(JerseyInvocation.java:1033)
                  upsource-frontend: [Upsource Frontend Error]    at org.glassfish.jersey.client.JerseyInvocation.translate(JerseyInvocation.java:816)
                  upsource-frontend: [Upsource Frontend Error]    at org.glassfish.jersey.client.JerseyInvocation.access$700(JerseyInvocation.java:92)
                  upsource-frontend: [Upsource Frontend Error]    at org.glassfish.jersey.client.JerseyInvocation$2.call(JerseyInvocation.java:700)
                  upsource-frontend: [Upsource Frontend Error]    at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
                  upsource-frontend: [Upsource Frontend Error]    at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
                  upsource-frontend: [Upsource Frontend Error]    at org.glassfish.jersey.internal.Errors.process(Errors.java:228)
                  upsource-frontend: [Upsource Frontend Error]    at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:444)
                  upsource-frontend: [Upsource Frontend Error]    at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:696)
                  upsource-frontend: [Upsource Frontend Error]    at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:420)
                  upsource-frontend: [Upsource Frontend Error]    at org.glassfish.jersey.client.JerseyInvocation$Builder.get(JerseyInvocation.java:316)
                  upsource-frontend: [Upsource Frontend Error]    at jetbrains.jetpass.client.oauth2.OAuth2Client.getHubScope(OAuth2Client.java:54)
                  upsource-frontend: [Upsource Frontend Error]    at jetbrains.jetpass.client.hub.HubClient.getAccountsClient(HubClient.java:118)
                  upsource-frontend: [Upsource Frontend Error]    at com.jetbrains.upsource.server.auth.impl.HubProviderImpl.createAccountsClient(HubProviderImpl.java:392)
                  upsource-frontend: [Upsource Frontend Error]    at com.jetbrains.upsource.server.auth.impl.HubProviderImpl.(HubProviderImpl.java:102)
                  upsource-frontend: [Upsource Frontend Error]    at com.jetbrains.upsource.server.auth.api.AuthManagerFactory.createAuthManager(AuthManagerFactory.java:49)
                  upsource-frontend: [Upsource Frontend Error]    at com.jetbrains.upsource.backend.server.facade.UpsourceApplicationEnvironment.buildMainContainer(UpsourceApplicationEnvironment.java:261)
                  upsource-frontend: [Upsource Frontend Error]    at com.jetbrains.upsource.backend.server.facade.UpsourceApplicationEnvironment.(UpsourceApplicationEnvironment.java:97)
                  upsource-frontend: [Upsource Frontend Error]    at com.jetbrains.upsource.backend.cli.UpsourceApplicationEnvironmentDaemonBase.startDaemon(UpsourceApplicationEnvironmentDaemonBase.java:13)
                  upsource-frontend: [Upsource Frontend Error]    at com.jetbrains.upsource.backend.cli.UpsourceDaemonBase.start(UpsourceDaemonBase.java:144)
                  upsource-frontend: [Upsource Frontend Error]    at com.jetbrains.upsource.backend.cli.UpsourceDaemonBase.start(UpsourceDaemonBase.java:234)
                  upsource-frontend: [Upsource Frontend Error]    at com.jetbrains.upsource.frontend.server.UpsourceFrontendDaemon.start(UpsourceFrontendDaemon.java:83)
                  upsource-frontend: [Upsource Frontend Error]    at com.jetbrains.launcher.AppProxy$6$1.call(AppProxy.java:99)
                  upsource-frontend: [Upsource Frontend Error]    at com.jetbrains.launcher.AppProxy$6$1.call(AppProxy.java:97)
                  upsource-frontend: [Upsource Frontend Error]    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
                  upsource-frontend: [Upsource Frontend Error]    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
                  upsource-frontend: [Upsource Frontend Error]    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
                  upsource-frontend: [Upsource Frontend Error]    at java.lang.Thread.run(Thread.java:745)
                  upsource-frontend: [Upsource Frontend Error] Caused by: java.lang.IllegalStateException: Entity input stream has already been closed.
                  upsource-frontend: [Upsource Frontend Error]    at org.glassfish.jersey.message.internal.EntityInputStream.ensureNotClosed(EntityInputStream.java:228)
                  upsource-frontend: [Upsource Frontend Error]    at org.glassfish.jersey.message.internal.InboundMessageContext.bufferEntity(InboundMessageContext.java:886)
                  upsource-frontend: [Upsource Frontend Error]    at org.glassfish.jersey.client.InboundJaxrsResponse.bufferEntity(InboundJaxrsResponse.java:161)
                  upsource-frontend: [Upsource Frontend Error]    at org.glassfish.jersey.client.JerseyInvocation.convertToException(JerseyInvocation.java:987)
                  upsource-frontend: [Upsource Frontend Error]    ... 27 more
              
              

              非常感谢任何想要提供帮助的人。

              更新

              我在不使用外部集线器的情况下设置了upsource,它仍然崩溃了。 现在我在开始启动upsource-monitor时收到错误消息。

              重要的是第2行

              
                  upsource-cluster-init: [Upsource Cluster Initialize Service Error] log4j:WARN No such property [maxBackupIndex] in org.apache.log4j.FileAppender.
                  upsource-cluster-init: [Upsource Cluster Initialize Service Error] log4j:WARN No such property [maxBackupIndex] in org.apache.log4j.FileAppender.
              
              

1 个答案:

答案 0 :(得分:0)

问题是我正在运行2GB RAM服务器而不是8GB RAM,如文档所述。 8GB显然是必须的,服务太重而不能用。