Space not starting up after production configuration

Hi all, 

I'm very new to space on premises and have been trying to install it locally on Ubuntu 22.04 LTS. Please bear with me, because I don't have much experience in this and really need some help, because I'm a bit stumped.

Running docker compose works fine without any issues and I can get to the UI at http://127.0.0.1:8084.

Then configuring space for production and extending it to be accessible outside the network, I used this documentation:
https://www.jetbrains.com/help/space/configure-space-for-docker-compose-production-environment.html

Essentially there is only a few steps to follow concerning the update of the config files and creating a config file for Nginx. I can reach the space site externally after the config updates, but I'm getting a 502 error. All certs are correct and the connection is secure, but Nginx is returning a bad gateway.

I checked the Nginx logs at /var/log/nginx/error.log and I get this error message:

2023/08/15 08:45:15 [error] 340202#340202: *197 connect() failed (111: Unknown error) while connecting to upstream, client: {ommitted}, server: space.securotrax.com, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8084/", host: "space.securotrax.com"

Investigating further, I found that http://127.0.0.1:8084 no longer works. And I don't know why. I also don't know where to find the space logs to try and see where the problem might be and I'm stuck at this stage.

Here is my Nginx config file (/etc/nginx/conf.d/space.conf):

server {

    client_max_body_size 0;

    server_name space.securotrax.com;

    location / {

        proxy_set_header X-Real-IP $remote_addr;

        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

        proxy_set_header Host $http_host;

        proxy_set_header X-NginX-Proxy true;

        proxy_pass http://127.0.0.1:8084/;

        proxy_redirect off;

        proxy_http_version 1.1;

        proxy_set_header Upgrade $http_upgrade;

        proxy_set_header Connection "upgrade";

    }

 

    listen 443 ssl;

    ssl_certificate /opt/space/tls/certs/space-cert.crt;

    ssl_certificate_key /opt/space/tls/keys/space.key;

}

 

server {

    client_max_body_size 0;

    server_name git.securotrax.com;

    location / {

        proxy_set_header X-Real-IP $remote_addr;

        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

        proxy_set_header Host $http_host;

        proxy_set_header X-NginX-Proxy true;

        proxy_pass http://127.0.0.1:8080/;

        proxy_redirect off;

        proxy_http_version 1.1;

        proxy_set_header Upgrade $http_upgrade;

        proxy_set_header Connection "upgrade";

    }

 

    listen 443 ssl;

    ssl_certificate /opt/space/tls/certs/git-cert.crt;

    ssl_certificate_key /opt/space/tls/keys/git.key;

}

 

server {

    client_max_body_size 0;

    server_name packages.securotrax.com;

    location / {

        proxy_set_header X-Real-IP $remote_addr;

        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

        proxy_set_header Host $http_host;

        proxy_set_header X-NginX-Proxy true;

        proxy_pass http://127.0.0.1:8390/;

        proxy_redirect off;

        proxy_http_version 1.1;

        proxy_set_header Upgrade $http_upgrade;

        proxy_set_header Connection "upgrade";

    }

 

    listen 443 ssl;

    ssl_certificate /opt/space/tls/certs/packages-cert.crt;

    ssl_certificate_key /opt/space/tls/keys/packages.key;

}

 

server {

    client_max_body_size 0;

    server_name minio.securotrax.com;

    location / {

        proxy_set_header X-Real-IP $remote_addr;

        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

        proxy_set_header Host $http_host;

        proxy_set_header X-NginX-Proxy true;

        proxy_pass http://127.0.0.1:9000/;

        proxy_redirect off;

        proxy_http_version 1.1;

        proxy_set_header Upgrade $http_upgrade;

        proxy_set_header Connection "upgrade";

    }

 

    listen 443 ssl;

    ssl_certificate /opt/space/tls/certs/packages-cert.crt;

    ssl_certificate_key /opt/space/tls/keys/packages.key;

}

 

# configuring HTTP redirects

server {

    if ($host = space.securotrax.com) {

        return 301 https://$host$request_uri;

    }

 

    server_name space.securotrax.com;

    listen 80;

    return 404;

}

 

server {

    if ($host = git.securotrax.com) {

        return 301 https://$host$request_uri;

    }

 

    server_name git.securotrax.com;

    listen 80;

    return 404;

}

 

server {

    if ($host = packages.securotrax.com) {

        return 301 https://$host$request_uri;

    }

 

    server_name packages.securotrax.com;

    listen 80;

    return 404;

}

 

server {

    if ($host = minio.securotrax.com) {

        return 301 https://$host$request_uri;

    }

 

    server_name minio.securotrax.com;

    listen 80;

    return 404;

}

 

And my space.on-premises.conf file:

ktor {

    deployment {

        environment = production

        port = 8084

        internalPort = 9084

        autoreload = false

        callGroupSize = 8

    }

 

    application {

        modules = [circlet.server.ServerKt.main]

    }

}

 

circlet {

    stackName = "On prem"

    type = "Docker"

 

    server {

        singleOrg = true

        features = [OnPremise]

        enabledFeatureFlags = [PROJECT_PARAMETERS_ANNOTATIONS, PROJECT_PARAMETERS_VAULT_INTEGRATION, GOTO_MENTIONS_NEW_MATCH_ALGORITHM, GOTO_SEARCH_PROFILES_FTS, FULL_TEXT_SEARCH_EXPERIMENTAL_UI, ADVANCED_SEARCH_EXPERIMENTAL_UI, ISSUE_CHAT_CONTENT, POSTPONED_CHANNEL_MESSAGES]

        enabledFeatureFlags += ${?EXTRA_FEATURE_FLAG}

 

        enableSqlTracing = false

        enableExternalApiTracing = false

        enableAutomationInternalsConfiguration = true

        enableActiveAppTracker = true

        dumpStacksOnExit = false

        httpApiTimeout = 60000

        dontFailOnLargeBatches = true

        rpcTimeout = 60000

        permissionCacheCalculationInterval = 2000

        dbCacheCalculationTimeoutMs = 60000

        pidFileName = ".main_app.pid"

        orgInitTimeout = 180000

        processMetricsEnabled = false

    }

 

    onprem {

        jetSalesURL = "https://account.jetbrains.com"

    }

 

    push {

        proxy {

            url = "https://on-premise.service.jetbrains.space"

        }

    }

 

    preload {

        defaultProviders = [PreloadSpaceFeedAdvertiser, PreloadGeneralChannel, PreloadAbsenceReasons, PreloadMainProject]

 

        preloadMainProject = true

 

        builtinAuthModule {

            enabled = true

        }

        admin {

            firstName = "admin"

            lastName = "admin"

            username = omitted

            email = omitted

            password = omitted

        }

    }

 

    masterSecret = omitted

 

    db {

        type = "postgresql"

        schemaPrefix = "crclt_"

        host = "postgres"

        port = 5432

        port = ${?DB_PORT}

        username = "space"

        password = omitted

 

        postgresql {

            driver = "org.postgresql.Driver"

            url = "jdbc:postgresql://"${circlet.db.host}":"${circlet.db.port}"/spacedb"

        }

 

        pool {

            vendor = "hikari"

 

            maxActive = 96

            minIdle = 12

        }

 

        debug {

            similar_queries_count_threshold = 10

            all_queries_count_threshold = 100

        }

    }

 

    bus {

        engine = "redis"

        host = "redis://redis:6379"

        type = "single"

    }

 

    storage {

        aws {

            region = "eu-west-1"

            bucket = "space-local"

            endpoint = "http://minio:9000"

            accessKey = omitted

            secretKey = omitted

        }

 

        elastic {

            enabled = true

            host = "elasticsearch"

            port = 9200

            reIndex = true

        }

    }

 

    audit {

        elastic {

            enabled = true

            host = "elasticsearch"

            port = 9200

        }

    }

 

    perf {

        client {

            enabled = false

        }

        elastic {

            enabled = false

        }

 

        riemann {

            enabled = false

        }

 

        prometheus {

            enabled = false

            jmx = false

        }

    }

 

    metrics {

        fus {

            enabled  = true

            config   = "https://resources.jetbrains.com/storage/fus/config/v4/SP/SPP.json"

            product  = "SPP"

        }

    }

 

    // Circlet as OAuth 2.0 authentication server

    oauth {

        rememberMe {

            // Remember me cookie TTL in seconds

            ttl {

                // If user checked remember me

                userLong = 2592000 // 30 * 24 * 60 * 60

                // If admin checked remember me

                adminLong = 604800 // 7 * 24 * 60 * 60

                // If user or admin unchecked remember me

                short = 3600 // 60 * 60

            }

 

            // Authentication session cache

            cache {

                protectedQueueSize = 100

                probationalQueueSize = 100

            }

        }

 

        accessToken {

            // Access token TTL in seconds

            ttl = 600 // do not use anything longer in production, potential security issue

            // List of client IDs with custom TTL for access_token

            ttlCustom {

                "circlet-ios-app" = 25h

                "circlet-android-app" = 25h

            }

            issuer = "https://jetbrains.com/circlet"

            // RSA512 key pair to sign JWT

            // Use circlet.platform.server.services.oauth.accessToken.AccessTokenKt.main to generate the pair

            rsa {

                // X.509 encoded public key

                public =omitted

 

                // PKCS#8 encoded private key

                private =omitted

            }

        }

 

        message {

            encoding {

                // an example of 128 bit key for AES.

                // openssl rand 16 | base64

                key = omitted

            }

        }

 

        twoFactor {

            // an example of 128 bit key for AES.

            // openssl rand 16 | base64

            encryptionKey = omitted

        }

 

        // 128 bit key for AES.

        encryptionKey = omitted

 

        // 2048-bit public/private key pair for signing/verifying outgoing messages to applications

        // Use circlet.test.framework.application.KeyGenUtilsKt.main to generate the pair

        messageSigning {

            rsa {

                // X.509 encoded public key

                public =omitted

 

                // PKCS#8 encoded private key

                private =omitted

            }

        }

    }

 

    limits {

        perOrg = {

            "totalMembers" = {

                softCap = 9000000

                hardCap = 10000000

            }

        }

        request {

            sessionTTL = 5000

            limits = [

                {

                    type = "bandwidth"

                    capacity = 1000

                    refill {

                        tokens = 400

                        duration = "1 second"

                    }

                },

                {

                    type = "bandwidth"

                    capacity = 10000

                    refill {

                        tokens = 10000

                        duration = "1 minute"

                    }

                }

            ]

        }

    }

 

#     license {

#         key = {{ .Values.space.license.key }}

#     }

 

    vcs {

        url = "http://vcs:8080"

        secret = omitted

 

        identity {

            name = "Space"

            email = "space@jetbrains.com"

            secretKey_base64 = omitted

            passphrase = ""

        }

    }

 

    mail {

        outgoing {

            enabled = true

 

            // SMTP settings

            fromAddress = omitted

            host = omitted

            port = 25

            protocol = "SMTP"

            login = omitted

            password = omitted

            messageQueuePrefix = "mailQueue"

 

            // handling properties

            aggregationDelaySecs = 900

            rateLimitPerSecond = 3

        }

    }

 

    endUserAgreement {

        jetBrains {

            enabled = false

        }

    }

 

    frontend {

        url = "https://space.securotrax.com"

        internalUrl = "http://space:9084"

        internalALB {

            enabled = false

        }

 

        // Alternative URLs for Space

        altUrls = [

            "http://127.0.0.1:8084",

            "https://localhost:8084",

            "https://space.local:8084",

        ]

 

        enableWebdriverTestIds = false

    }

 

    healthcheck {

        username = "healthcheck"

        password = "healthcheck"

    }

 

    webhooks {

        key = omitted

        // Possible options are "Java" and "Apache", unknown values fall back to Java.

        client = "Java"

    }

 

    unfurl {

        // Possible options are "Java" and "Apache", unknown values fall back to Apache.

        client = "Apache"

    }

 

    // external language server. This implementation implies syntax highlight only

    // `client` should be one of `net` or `local`

    language-server {

        client = local

        engine = Java

        host = langservice

        port = 8095

    }

 

    pipelines {

        dsl {

            compilation {

                image = "public.registry.jetbrains.space/p/space/containers/space-automation-dsl-compile:2023.2.0.128"

                storage {

                    aws {

                        region = "eu-west-1"

                        bucket = "automation-dsl-local"

                        endpoint = "http://minio:9000"

                        accessKey = omitted

                        secretKey = omitted

                    }

                }

            }

            runtime {

                mavenRepo {

                    url = "https://maven.pkg.jetbrains.space/public/p/space/maven"

                }

            }

        }

 

        execution {

            type = "docker"

            backends = ["worker"]

 

            # TODO remove when space container is updated

            bootstrap {

                image = "671090787922.dkr.ecr.eu-west-1.amazonaws.com/automation/alpine/git:v2.30.2-jb"

            }

 

            worker {

                image = "public.registry.jetbrains.space/p/space/containers/space-automation-worker:2023.2.0.128"

                # workers won't be updated after installing new on-prem version

                initialVersion = "default"

                dockerBuilderImage = "public.registry.jetbrains.space/p/space/containers/space-automation-docker-builder:2023.2.0.128"

                dslCompileImage = "public.registry.jetbrains.space/p/space/containers/space-automation-dsl-compile:2023.2.0.128"

                extraNetworks = ["space-on-premises_backend-data"]

                extraHosts = ["host.docker.internal:host-gateway"]

            }

 

            terminateLongExecutions {

                maxPendingDuration = 6h

                maxScheduledDuration = 30m

            }

 

            fileshare {

                storage {

                    aws {

                        region = "eu-west-1"

                        bucket = "automation-fileshare-local"

                        endpoint = "http://minio:9000"

                        accessKey = omitted

                        secretKey = omitted

                        s3Presigner {

                            endpoint = "http://minio:9000"

                        }

                    }

                }

            }

        }

 

        serviceMessages {

            storage {

                aws {

                    region = "eu-west-1"

                    bucket = "automation-logs-local"

                    endpoint = "http://minio:9000"

                    accessKey = omitted

                    secretKey = omitted

                }

            }

        }

 

        blockstorage {

            engine = "local-docker"

        }

    }

 

    packages {

        notifications {

            enabled = true

        }

 

        oauth {

            clientId = omitted

            clientSecret = omitted

        }

 

        types {

            maven {

                url = "https://packages.securotrax.com"

                internalUrl = "http://packages:9390"

            }

 

            nuget {

                url = "https://packages.securotrax.com"

                internalUrl = "http://packages:9390"

            }

 

            npm {

                url = "https://packages.securotrax.com"

                internalUrl = "http://packages:9390"

            }

 

            container {

                url = "https://packages.securotrax.com"

                internalUrl = "http://packages:9390"

            }

 

            pypi {

                url = "https://packages.securotrax.com"

                internalUrl = "http://packages:9390"

            }

 

            composer {

                url = "https://packages.securotrax.com"

                internalUrl = "http://packages:9390"

            }

 

            dart {

                url = "https://packages.securotrax.com"

                internalUrl = "http://packages:9390"

            }

 

            files {

                url = "https://packages.securotrax.com"

                internalUrl = "http://packages:9390"

            }

 

            crates {

                url = "https://packages.securotrax.com"

                internalUrl = "http://packages:9390"

            }

        }

    }

 

    attachments {

        useCdn = false

    }

}

And the packages.on-premises.conf file:

ktor {

    deployment {

        environment = production

        port = 8390

        internalPort = 9390

        autoreload = false

        callGroupSize = 8

    }

 

    application {

        modules = [circlet.packages.server.ServerKt.main]

    }

}

 

circlet {

    bus {

        engine = "redis"

        host = "redis://redis:6379"

        type = "single"

    }

 

    organization {

        name = "JetBrains"

        slogan = "The Drive to Develop"

        schema = "spacedb"

        domain = "jetbrains"

    }

 

    server {

        configurableLogging = false

        processMetricsEnabled = false

    }

 

    masterSecret = omitted

 

    db {

        type = "postgresql"

        schemaPrefix = "crclt_"

        host = "postgres"

        username = "omitted"

        password = "omitted"

 

        postgresql {

            driver = "org.postgresql.Driver"

            url = "jdbc:postgresql://postgres:5432/spacedb"

        }

 

        pool {

            vendor = "hikari"

 

            maxActive = 96

            minIdle = 12

        }

 

        debug {

            similar_queries_count_threshold = 10

            all_queries_count_threshold = 100

        }

    }

 

    packages {

        url = "https://packages.securotrax.com" 

        internalUrl = "http://packages:9390" 

 

        supportedTypes = "container, maven, nuget, npm, pypi, composer, files, dart, crates"

 

        altUrls = [

            "http://localhost:8390",

            "http://localhost:9390",

        ]

 

        oauth {

            clientId = omitted

            clientSecret = omitted

        }

 

        vulnerabilities {

            url = ""

        }

    }

 

    perf {

        client {

            enabled = false

        }

        elastic {

            enabled = false

        }

 

        riemann {

            enabled = false

        }

 

        prometheus {

            enabled = false

            jmx = false

        }

    }

 

    space {

        url = "https://space.securotrax.com"

        orgMode = "SINGLE_ORG"

        internalUrl = "http://space:9084"

    }

 

    storage {

        aws {

            region = "eu-west-1"

            bucket = "packages-local"

            endpoint = "http://minio:9000"

            publicUrl = "https://minio.securotrax.com"

            accessKey = "omitted"

            secretKey = "omitted"

        }

 

        elastic {

            enabled = true

            host = "elasticsearch"

            port = 9200

            reIndex = true

        }

    }

}

And also the vcs.on-premises.properties file

 

base.url=https://git.securotrax.com

vcs.git.hosted=true

vcs.ssh.git.hosted=true

vcs.ssh.git.port=2222

circlet.enabled=true

circlet.key={omitted}

data-dir=/home/space/git/vcs-hosting/data

disable-access-log=true

id=VCS-hosting

listen=0.0.0.0

port=8080

logs-dir=logs

presentation-service-name=VCS-hosting

temp-dir=temp

circlet.url.int=http://space:9084

circlet.url.ext=https://space.securotrax.com

vcs.dfs.storage=s3

vcs.dfs.s3_data_bucket_name=vcs-local

vcs.dfs.s3_data_region=eu-west-1

vcs.dfs.s3_data_access_key={omitted}

vcs.dfs.s3_data_secret_key={omitted}

vcs.dfs.s3_endpoint=http://minio:9000

vcs.dfs.s3_offload=false

vcs.dfs.cache.path=/home/space/git/vcs-hosting/cache

vcs.dfs.sql_url=jdbc:postgresql://postgres:5432/spacedb

vcs.dfs.sql_schema=vcsdfs

vcs.dfs.sql_username={omitted}

vcs.dfs.sql_password={omitted}

vcs.dfs.redis=single

vcs.dfs.redis_url=redis://redis:6379

vcs.ssh.server.key.rsa.base64={omitted}

vcs.gpg.public_key.base64={omitted}

 

I think that there might be problem in the configs, but I have no idea what it could be. Any help or suggestions would be greatly appreciated. 

 

 

0
7 comments

Techadmin, thanks for reaching out to us! You're right, as you're getting a 5** error, it's necessary to check if Space works as expected. For this, let's access the logs:

1. get the IDs of Space-related containers: `docker ps`;

2. access logs for space, packages and vcs containers: `docker logs <container_id>`.

Please share the outputs with me and I'll check the details. In case you don't want to share the logs publicly, feel free to submit a support request using this link: https://jb.gg/space-support. Thanks!

 

 

0

Thanks Pavel Boger

It seems like the container starts, but then crashes:

Here is the result of sudo docker ps:

The Space container is the top one and then I rant the sudo docker logs b7f2611f93ca command as suggested. I then saw the two exceptions listed below. Also noticed now that it completely crashes space because running the docker ps command again shows this where the space container is no longer running:

So this surely must be a mistake in the configuration somewhere. I just don't know where? Could you possibly point in a direction? Thanks so much for your help so far!

2023-08-16 10:36:07.291 [main] ERROR r.c.JvmTypeBasedSingletonDescriptor [] - Error creating instance of circlet.packages.container.ContainerRegistryClient

java.lang.reflect.InvocationTargetException: null

at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)

at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)

at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)

at runtime.container.JvmTypeBasedSingletonDescriptor$createInstanceOfImpl$2.invoke(JvmTypeBasedSingletonDescriptor.kt:35)

at libraries.basics.ClassLoaderUtilsKt.withContextClassLoader(ClassLoaderUtils.kt:9)

at runtime.container.JvmTypeBasedSingletonDescriptor.createInstanceOfImpl(JvmTypeBasedSingletonDescriptor.kt:32)

at runtime.container.SingletonDescriptor.createInstanceOf(SingletonDescriptor.kt:128)

at runtime.container.SingletonDescriptor.constructInstance$suspendImpl(SingletonDescriptor.kt:43)

at runtime.container.SingletonDescriptor.constructInstance(SingletonDescriptor.kt)

at runtime.container.ListDescriptor.constructInstance(ListDescriptor.kt:10)

at runtime.container.ResolveKt.bindArguments(Resolve.kt:56)

at runtime.container.JvmTypeBasedSingletonDescriptor.createInstanceOfImpl(JvmTypeBasedSingletonDescriptor.kt:30)

at runtime.container.SingletonDescriptor.createInstanceOf(SingletonDescriptor.kt:128)

at runtime.container.SingletonDescriptor.constructInstance$suspendImpl(SingletonDescriptor.kt:43)

at runtime.container.SingletonDescriptor.constructInstance(SingletonDescriptor.kt)

at runtime.container.ResolveKt.bindArguments(Resolve.kt:56)

at runtime.container.JvmTypeBasedSingletonDescriptor.createInstanceOfImpl(JvmTypeBasedSingletonDescriptor.kt:30)

at runtime.container.SingletonDescriptor.createInstanceOf(SingletonDescriptor.kt:128)

at runtime.container.SingletonDescriptor.constructInstance$suspendImpl(SingletonDescriptor.kt:43)

at runtime.container.SingletonDescriptor.constructInstance(SingletonDescriptor.kt)

at runtime.container.JvmTypeBasedComponentStorage.composeDescriptors(Storage.kt:139)

at runtime.container.JvmTypeBasedComponentStorage.compose(Storage.kt:128)

at runtime.container.StorageComponentContainer.compose(Container.kt:40)

at circlet.platform.a.i.b.a(b.java:40)

at circlet.platform.a.ServerKt.b(ServerKt.java:134)

at circlet.platform.a.ServerKt.a(ServerKt.java:27)

at circlet.platform.a.ServerKt.c(ServerKt.java:86)

at circlet.platform.a.ServerKt$platformMain$1.invokeSuspend(ServerKt$platformMain$1.java:41)

at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)

at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)

at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:280)

at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)

at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)

at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)

at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)

at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)

at circlet.platform.a.ServerKt.a(ServerKt.java:58)

at circlet.platform.a.e.d.a(d.java:83)

at circlet.server.ServerKt.main(Server.kt:1)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)

at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.base/java.lang.reflect.Method.invoke(Method.java:568)

at kotlin.reflect.jvm.internal.calls.CallerImpl$Method.callMethod(CallerImpl.kt:97)

at kotlin.reflect.jvm.internal.calls.CallerImpl$Method$Static.call(CallerImpl.kt:106)

at kotlin.reflect.jvm.internal.KCallableImpl.callDefaultMethod$kotlin_reflection(KCallableImpl.kt:188)

at kotlin.reflect.jvm.internal.KCallableImpl.callBy(KCallableImpl.kt:111)

at io.ktor.server.engine.internal.CallableUtilsKt.callFunctionWithInjection(CallableUtils.kt:119)

at io.ktor.server.engine.internal.CallableUtilsKt.executeModuleFunction(CallableUtils.kt:36)

at io.ktor.server.engine.ApplicationEngineEnvironmentReloading$launchModuleByName$1.invoke(ApplicationEngineEnvironmentReloading.kt:331)

at io.ktor.server.engine.ApplicationEngineEnvironmentReloading$launchModuleByName$1.invoke(ApplicationEngineEnvironmentReloading.kt:330)

at io.ktor.server.engine.ApplicationEngineEnvironmentReloading.avoidingDoubleStartupFor(ApplicationEngineEnvironmentReloading.kt:355)

at io.ktor.server.engine.ApplicationEngineEnvironmentReloading.launchModuleByName(ApplicationEngineEnvironmentReloading.kt:330)

at io.ktor.server.engine.ApplicationEngineEnvironmentReloading.access$launchModuleByName(ApplicationEngineEnvironmentReloading.kt:32)

at io.ktor.server.engine.ApplicationEngineEnvironmentReloading$instantiateAndConfigureApplication$1.invoke(ApplicationEngineEnvironmentReloading.kt:311)

at io.ktor.server.engine.ApplicationEngineEnvironmentReloading$instantiateAndConfigureApplication$1.invoke(ApplicationEngineEnvironmentReloading.kt:309)

at io.ktor.server.engine.ApplicationEngineEnvironmentReloading.avoidingDoubleStartup(ApplicationEngineEnvironmentReloading.kt:337)

at io.ktor.server.engine.ApplicationEngineEnvironmentReloading.instantiateAndConfigureApplication(ApplicationEngineEnvironmentReloading.kt:309)

at io.ktor.server.engine.ApplicationEngineEnvironmentReloading.createApplication(ApplicationEngineEnvironmentReloading.kt:150)

at io.ktor.server.engine.ApplicationEngineEnvironmentReloading.start(ApplicationEngineEnvironmentReloading.kt:276)

at io.ktor.server.jetty.JettyApplicationEngineBase.start(JettyApplicationEngineBase.kt:52)

at io.ktor.server.jetty.JettyApplicationEngine.start(JettyApplicationEngine.kt:24)

at io.ktor.server.jetty.JettyApplicationEngine.start(JettyApplicationEngine.kt:15)

at io.ktor.server.engine.ApplicationEngine$DefaultImpls.start$default(ApplicationEngine.kt:78)

at circlet.platform.a.e.a.d(a.java:17)

at circlet.server.SpaceServer.main(Server.kt:7)

Caused by: com.typesafe.config.ConfigException$Missing: /home/space/circlet-server-onprem/config/space.on-premises.conf: 416: No configuration setting found for key 'circlet.packages.url'

at com.typesafe.config.impl.SimpleConfig.findKeyOrNull(SimpleConfig.java:157)

at com.typesafe.config.impl.SimpleConfig.findOrNull(SimpleConfig.java:175)

at com.typesafe.config.impl.SimpleConfig.findOrNull(SimpleConfig.java:181)

at com.typesafe.config.impl.SimpleConfig.findOrNull(SimpleConfig.java:181)

at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:189)

at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:194)

at com.typesafe.config.impl.SimpleConfig.getString(SimpleConfig.java:251)

at circlet.server.packages.PackageRepositoryClientBase.<init>(PackageRepositoryClientBase.kt:244)

at circlet.server.packages.VersionedPackageRepositoryClientBase.<init>(VersionedPackageRepositoryClientBase.kt:454)

at circlet.server.packages.VersionedPackageRepositoryClientBase.<init>(VersionedPackageRepositoryClientBase.kt:62)

at circlet.packages.container.ContainerRegistryClient.<init>(ContainerRegistryClient.kt:1)

 

2023-08-16 10:36:07.304 [main] ERROR circlet.server.SpaceServer [] - Failed to start circlet

java.lang.reflect.InvocationTargetException: null

at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)

at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)

at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)

at runtime.container.JvmTypeBasedSingletonDescriptor$createInstanceOfImpl$2.invoke(JvmTypeBasedSingletonDescriptor.kt:35)

at libraries.basics.ClassLoaderUtilsKt.withContextClassLoader(ClassLoaderUtils.kt:9)

at runtime.container.JvmTypeBasedSingletonDescriptor.createInstanceOfImpl(JvmTypeBasedSingletonDescriptor.kt:32)

at runtime.container.SingletonDescriptor.createInstanceOf(SingletonDescriptor.kt:128)

at runtime.container.SingletonDescriptor.constructInstance$suspendImpl(SingletonDescriptor.kt:43)

at runtime.container.SingletonDescriptor.constructInstance(SingletonDescriptor.kt)

at runtime.container.ListDescriptor.constructInstance(ListDescriptor.kt:10)

at runtime.container.ResolveKt.bindArguments(Resolve.kt:56)

at runtime.container.JvmTypeBasedSingletonDescriptor.createInstanceOfImpl(JvmTypeBasedSingletonDescriptor.kt:30)

at runtime.container.SingletonDescriptor.createInstanceOf(SingletonDescriptor.kt:128)

at runtime.container.SingletonDescriptor.constructInstance$suspendImpl(SingletonDescriptor.kt:43)

at runtime.container.SingletonDescriptor.constructInstance(SingletonDescriptor.kt)

at runtime.container.ResolveKt.bindArguments(Resolve.kt:56)

at runtime.container.JvmTypeBasedSingletonDescriptor.createInstanceOfImpl(JvmTypeBasedSingletonDescriptor.kt:30)

at runtime.container.SingletonDescriptor.createInstanceOf(SingletonDescriptor.kt:128)

at runtime.container.SingletonDescriptor.constructInstance$suspendImpl(SingletonDescriptor.kt:43)

at runtime.container.SingletonDescriptor.constructInstance(SingletonDescriptor.kt)

at runtime.container.JvmTypeBasedComponentStorage.composeDescriptors(Storage.kt:139)

at runtime.container.JvmTypeBasedComponentStorage.compose(Storage.kt:128)

at runtime.container.StorageComponentContainer.compose(Container.kt:40)

at circlet.platform.a.i.b.a(b.java:40)

at circlet.platform.a.ServerKt.b(ServerKt.java:134)

at circlet.platform.a.ServerKt.a(ServerKt.java:27)

at circlet.platform.a.ServerKt.c(ServerKt.java:86)

at circlet.platform.a.ServerKt$platformMain$1.invokeSuspend(ServerKt$platformMain$1.java:41)

at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)

at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)

at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:280)

at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)

at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)

at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)

at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)

at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)

at circlet.platform.a.ServerKt.a(ServerKt.java:58)

at circlet.platform.a.e.d.a(d.java:83)

at circlet.server.ServerKt.main(Server.kt:1)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)

at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.base/java.lang.reflect.Method.invoke(Method.java:568)

at kotlin.reflect.jvm.internal.calls.CallerImpl$Method.callMethod(CallerImpl.kt:97)

at kotlin.reflect.jvm.internal.calls.CallerImpl$Method$Static.call(CallerImpl.kt:106)

at kotlin.reflect.jvm.internal.KCallableImpl.callDefaultMethod$kotlin_reflection(KCallableImpl.kt:188)

at kotlin.reflect.jvm.internal.KCallableImpl.callBy(KCallableImpl.kt:111)

at io.ktor.server.engine.internal.CallableUtilsKt.callFunctionWithInjection(CallableUtils.kt:119)

at io.ktor.server.engine.internal.CallableUtilsKt.executeModuleFunction(CallableUtils.kt:36)

at io.ktor.server.engine.ApplicationEngineEnvironmentReloading$launchModuleByName$1.invoke(ApplicationEngineEnvironmentReloading.kt:331)

at io.ktor.server.engine.ApplicationEngineEnvironmentReloading$launchModuleByName$1.invoke(ApplicationEngineEnvironmentReloading.kt:330)

at io.ktor.server.engine.ApplicationEngineEnvironmentReloading.avoidingDoubleStartupFor(ApplicationEngineEnvironmentReloading.kt:355)

at io.ktor.server.engine.ApplicationEngineEnvironmentReloading.launchModuleByName(ApplicationEngineEnvironmentReloading.kt:330)

at io.ktor.server.engine.ApplicationEngineEnvironmentReloading.access$launchModuleByName(ApplicationEngineEnvironmentReloading.kt:32)

at io.ktor.server.engine.ApplicationEngineEnvironmentReloading$instantiateAndConfigureApplication$1.invoke(ApplicationEngineEnvironmentReloading.kt:311)

at io.ktor.server.engine.ApplicationEngineEnvironmentReloading$instantiateAndConfigureApplication$1.invoke(ApplicationEngineEnvironmentReloading.kt:309)

at io.ktor.server.engine.ApplicationEngineEnvironmentReloading.avoidingDoubleStartup(ApplicationEngineEnvironmentReloading.kt:337)

at io.ktor.server.engine.ApplicationEngineEnvironmentReloading.instantiateAndConfigureApplication(ApplicationEngineEnvironmentReloading.kt:309)

at io.ktor.server.engine.ApplicationEngineEnvironmentReloading.createApplication(ApplicationEngineEnvironmentReloading.kt:150)

at io.ktor.server.engine.ApplicationEngineEnvironmentReloading.start(ApplicationEngineEnvironmentReloading.kt:276)

at io.ktor.server.jetty.JettyApplicationEngineBase.start(JettyApplicationEngineBase.kt:52)

at io.ktor.server.jetty.JettyApplicationEngine.start(JettyApplicationEngine.kt:24)

at io.ktor.server.jetty.JettyApplicationEngine.start(JettyApplicationEngine.kt:15)

at io.ktor.server.engine.ApplicationEngine$DefaultImpls.start$default(ApplicationEngine.kt:78)

at circlet.platform.a.e.a.d(a.java:17)

at circlet.server.SpaceServer.main(Server.kt:7)

Caused by: com.typesafe.config.ConfigException$Missing: /home/space/circlet-server-onprem/config/space.on-premises.conf: 416: No configuration setting found for key 'circlet.packages.url'

at com.typesafe.config.impl.SimpleConfig.findKeyOrNull(SimpleConfig.java:157)

at com.typesafe.config.impl.SimpleConfig.findOrNull(SimpleConfig.java:175)

at com.typesafe.config.impl.SimpleConfig.findOrNull(SimpleConfig.java:181)

at com.typesafe.config.impl.SimpleConfig.findOrNull(SimpleConfig.java:181)

at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:189)

at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:194)

at com.typesafe.config.impl.SimpleConfig.getString(SimpleConfig.java:251)

at circlet.server.packages.PackageRepositoryClientBase.<init>(PackageRepositoryClientBase.kt:244)

at circlet.server.packages.VersionedPackageRepositoryClientBase.<init>(VersionedPackageRepositoryClientBase.kt:454)

at circlet.server.packages.VersionedPackageRepositoryClientBase.<init>(VersionedPackageRepositoryClientBase.kt:62)

at circlet.packages.container.ContainerRegistryClient.<init>(ContainerRegistryClient.kt:1)

0

Techadmin I believe you unintentionally removed a `circlet.packages.internalUrl = "http://packages:9390"` from the `space.on-premises.conf` file. Could you put it back and try to start Space again?

0

Thanks so much Pavel Boger

Just to confirm... should it look like this?

    packages {

        internalUrl = "http://packages:9390"

 

        notifications {

            enabled = true

        }

 

        oauth {

            clientId = omitted

            clientSecret = omitted

        }

 

        types {

            maven {

                url = "https://packages.securotrax.com"

                internalUrl = "http://packages:9390"

            }

 

            nuget {

                url = "https://packages.securotrax.com"

                internalUrl = "http://packages:9390"

            }

 

            npm {

                url = "https://packages.securotrax.com"

                internalUrl = "http://packages:9390"

            }

 

            container {

                url = "https://packages.securotrax.com"

                internalUrl = "http://packages:9390"

            }

 

            pypi {

                url = "https://packages.securotrax.com"

                internalUrl = "http://packages:9390"

            }

 

            composer {

                url = "https://packages.securotrax.com"

                internalUrl = "http://packages:9390"

            }

 

            dart {

                url = "https://packages.securotrax.com"

                internalUrl = "http://packages:9390"

            }

 

            files {

                url = "https://packages.securotrax.com"

                internalUrl = "http://packages:9390"

            }

 

            crates {

                url = "https://packages.securotrax.com"

                internalUrl = "http://packages:9390"

            }

        }

    }

0

Pavel Boger You're right... I did remove it, but now can't remember exactly where to place it back :) 

I removed it because the jetbrains documentation did not have it in. Here is a copy from the docs:

circlet { frontend { url = "https://space.example.com" internalUrl = "http://space:9084" } packages { notifications { enabled = true } types { maven { url = "https://packages.example.com" internalUrl = "http://packages:9390" } nuget { url = "https://packages.example.com" internalUrl = "http://packages:9390" } npm { url = "https://packages.example.com" internalUrl = "http://packages:9390" } container { url = "https://packages.example.com" internalUrl = "http://packages:9390" } pypi { url = "https://packages.example.com" internalUrl = "http://packages:9390" } composer { url = "https://packages.example.com" internalUrl = "http://packages:9390" } dart { url = "https://packages.example.com" internalUrl = "http://packages:9390" } files { url = "https://packages.example.com" internalUrl = "http://packages:9390" } } } }

Sorry it looks a bit messy, but that's how it copies from the site. The above does not have it in there and as a result, I thought it had to be removed.

 

0

Techadmin, right, it should be like this:

circlet {
...
    packages {
        internalUrl = "http://packages:9390"
        ...
        }
    }

 

0

Thanks Pavel Boger, I've made the change and it's working correctly now! Thanks so much for all your help!

0

Please sign in to leave a comment.