Skip to content

Instantly share code, notes, and snippets.

@kofj
Created April 9, 2019 09:33
Show Gist options
  • Save kofj/4ee882796eb41569b3e2c506f8f8df74 to your computer and use it in GitHub Desktop.
Save kofj/4ee882796eb41569b3e2c506f8f8df74 to your computer and use it in GitHub Desktop.
API server listening at: [::]:2345
2019-04-09T09:26:33Z info layer=debugger launching process with args: [/go/debug -c /etc/jobservice/config.yml]
2019-04-09T09:27:20Z debug layer=debugger continuing
2019-04-09T09:27:20Z [INFO] the factory for adapter harbor registered
2019-04-09T09:27:20Z [INFO] the factory for adapter native registered
2019-04-09T09:27:20Z [INFO] get configuration from url: http://core:8080/api/internal/configurations
2019-04-09T09:27:20Z [INFO] 0 outdated log entries are sweepped by sweeper *sweeper.FileSweeper
2019-04-09T09:27:20Z [INFO] Registering database: type-PostgreSQL host-postgresql port-5432 databse-registry sslmode-"disable"
2019-04-09T09:27:21Z [INFO] Register database completed
2019-04-09T09:27:21Z [INFO] Register job *impl.DemoJob with name DEMO
2019-04-09T09:27:21Z [INFO] Register job *scan.All with name IMAGE_SCAN_ALL
2019-04-09T09:27:21Z [INFO] Register job *replication.Transfer with name IMAGE_TRANSFER
2019-04-09T09:27:21Z [INFO] Register job *replication.Deleter with name IMAGE_DELETE
2019-04-09T09:27:21Z [INFO] Register job *replication.Replicator with name IMAGE_REPLICATE
2019-04-09T09:27:21Z [INFO] Register job *gc.GarbageCollector with name IMAGE_GC
2019-04-09T09:27:21Z [INFO] Register job *ng.Replication with name REPLICATION
2019-04-09T09:27:21Z [INFO] Register job *scheduler.Scheduler with name SCHEDULER
2019-04-09T09:27:21Z [INFO] Register job *scan.ClairJob with name IMAGE_SCAN
2019-04-09T09:27:21Z [INFO] Message server is started
2019-04-09T09:27:21Z [INFO] Server is started at :8080 with http
2019-04-09T09:27:21Z [INFO] OP commands sweeper is started
2019-04-09T09:27:21Z [INFO] Redis job stats manager is started
2019-04-09T09:27:21Z [INFO] Subscribe redis channel {harbor_job_service_namespace}:period:policies:notifications
2019-04-09T09:27:21Z [INFO] Load 0 periodic job policies
2019-04-09T09:27:21Z [INFO] Periodic enqueuer is started
2019-04-09T09:27:21Z [INFO] Redis scheduler is started
2019-04-09T09:27:21Z [INFO] Redis worker pool is started
2019-04-09T09:27:42Z debug layer=debugger halting
2019-04-09T09:27:42Z debug layer=debugger continuing
2019-04-09T09:28:14Z [INFO] Receive event 'register_hook' with data(unformatted): map[string]interface {}{"job_id":"93b288175333dd03971e14e7", "hook_url":"http://core:8080/service/notifications/jobs/replication/task/37"}
2019-04-09T09:28:17Z [INFO] Job incoming: REPLICATION:93b288175333dd03971e14e7
2019-04-09T09:28:17Z [INFO] get configuration from url: http://core:8080/api/internal/configurations
2019-04-09T09:28:17Z [INFO] get configuration from url: http://core:8080/api/internal/configurations
2019-04-09T09:28:17Z [INFO] client for source registry [type: harbor, URL: http://registry:5000, insecure: true] created
2019-04-09T09:28:17Z [INFO] client for destination registry [type: native, URL: http://harbor.local:5000, insecure: true] created
2019-04-09T09:28:17Z [INFO] copying test/alpine:[latest](source registry) to native/alpine:[latest](destination registry)...
2019-04-09T09:28:17Z [INFO] copying test/alpine:latest(source registry) to native/alpine:latest(destination registry)...
2019-04-09T09:28:17Z [INFO] pulling the manifest of image test/alpine:latest ...
DefaultImageRegistry.getClient "test/alpine"
DefaultImageRegistry.get map[string]*registry.Repository{}
DefaultImageRegistry.get repository: test/alpine client: (*registry.Repository)(nil) clients: map[string]*registry.Repository{}
DefaultImageRegistry.create: test/alpine map[string]*registry.Repository{}
DefaultImageRegistry.create client:(*registry.Repository)(nil) &adapter.DefaultImageRegistry{RWMutex:sync.RWMutex{w:sync.Mutex{state:1, sema:0x0}, writerSem:0x0, readerSem:0x0, readerCount:-1073741824, readerWait:0}, client:(*http.Client)(0xc000168a80), url:"http://registry:5000", clients:map[string]*registry.Repository{}}
DefaultImageRegistry.create client:&registry.Repository{Name:"test/alpine", Endpoint:(*url.URL)(0xc0004b0f00), client:(*http.Client)(0xc000168a80)} &adapter.DefaultImageRegistry{RWMutex:sync.RWMutex{w:sync.Mutex{state:1, sema:0x0}, writerSem:0x0, readerSem:0x0, readerCount:-1073741824, readerWait:0}, client:(*http.Client)(0xc000168a80), url:"http://registry:5000", clients:map[string]*registry.Repository{"test/alpine":(*registry.Repository)(0xc0005a4ea0)}}
2019-04-09T09:28:17Z [INFO] the manifest of image test/alpine:latest pulled
2019-04-09T09:28:17Z [INFO] check the existence of the image on the destination registry: native/alpine:latest
ManifestExist.client
DefaultImageRegistry.getClient "native/alpine"
2019-04-09T09:28:17Z [ERROR] [redis_job_wrapper.go:93]: Runtime error happened when executing job REPLICATION:93b288175333dd03971e14e7: goroutine 95 [running]:
github.com/goharbor/harbor/src/jobservice/pool.(*RedisJob).Run.func2(0xc0005b3150, 0xc000272000, 0xc000363c40)
/go/src/github.com/goharbor/harbor/src/jobservice/pool/redis_job_wrapper.go:92 +0x173
panic(0x163af80, 0x2469e40)
/usr/local/go/src/runtime/panic.go:513 +0x1e6
github.com/goharbor/harbor/src/replication/ng/adapter.(*DefaultImageRegistry).get(0x0, 0xc0001cfb80, 0xd, 0x0)
/go/src/github.com/goharbor/harbor/src/replication/ng/adapter/image_registry.go:113 +0x46
github.com/goharbor/harbor/src/replication/ng/adapter.(*DefaultImageRegistry).getClient(0x0, 0xc0001cfb80, 0xd, 0x0, 0x0, 0x0)
/go/src/github.com/goharbor/harbor/src/replication/ng/adapter/image_registry.go:104 +0x15a
github.com/goharbor/harbor/src/replication/ng/adapter.(*DefaultImageRegistry).ManifestExist(0x0, 0xc0001cfb80, 0xd, 0xc0001cfb90, 0x6, 0xbf23374c5b25f700, 0x0, 0x0, 0x0, 0x0)
/go/src/github.com/goharbor/harbor/src/replication/ng/adapter/image_registry.go:152 +0xb9
github.com/goharbor/harbor/src/replication/ng/transfer/repository.(*transfer).exist(0xc00042b600, 0xc0001cfb80, 0xd, 0xc0001cfb90, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0)
/go/src/github.com/goharbor/harbor/src/replication/ng/transfer/repository/transfer.go:215 +0xb8
github.com/goharbor/harbor/src/replication/ng/transfer/repository.(*transfer).copy(0xc00042b600, 0xc0005b2ec0, 0xc0005b2e98, 0x0, 0x0, 0x0)
/go/src/github.com/goharbor/harbor/src/replication/ng/transfer/repository/transfer.go:156 +0x9f8
github.com/goharbor/harbor/src/replication/ng/transfer/repository.(*transfer).Transfer(0xc00042b600, 0xc00042b4c0, 0xc00042b580, 0x0, 0x0)
/go/src/github.com/goharbor/harbor/src/replication/ng/transfer/repository/transfer.go:84 +0x300
github.com/goharbor/harbor/src/jobservice/job/impl/replication/ng.(*Replication).Run(0x24a1030, 0x19d9f00, 0xc0002def00, 0xc000168270, 0x0, 0x0)
/go/src/github.com/goharbor/harbor/src/jobservice/job/impl/replication/ng/replication.go:83 +0x74a
github.com/goharbor/harbor/src/jobservice/pool.(*RedisJob).Run(0xc000363c40, 0xc000272000, 0x0, 0x0)
/go/src/github.com/goharbor/harbor/src/jobservice/pool/redis_job_wrapper.go:131 +0x330
github.com/goharbor/harbor/src/jobservice/pool.(*GoCraftWorkPool).RegisterJob.func1(0xc000272000, 0x0, 0x0)
/go/src/github.com/goharbor/harbor/src/jobservice/pool/redis_pool.go:250 +0x46
github.com/goharbor/harbor/src/vendor/github.com/gocraft/work.runJob.func1(0x0, 0x0)
/go/src/github.com/goharbor/harbor/src/vendor/github.com/gocraft/work/run.go:31 +0x492
github.com/goharbor/harbor/src/jobservice/pool.(*RedisPoolContext).logJob(0x24a1030, 0xc000272000, 0xc0002deeb0, 0x0, 0x0)
/go/src/github.com/goharbor/harbor/src/jobservice/pool/redis_pool.go:701 +0x15a
reflect.Value.call(0x162e560, 0x1810578, 0x13, 0x1779425, 0x4, 0xc000249cd8, 0x3, 0x3, 0x0, 0x0, ...)
/usr/local/go/src/reflect/value.go:447 +0xbb4
reflect.Value.Call(0x162e560, 0x1810578, 0x13, 0xc000249cd8, 0x3, 0x3, 0x0, 0x0, 0x0)
/usr/local/go/src/reflect/value.go:308 +0xca
github.com/goharbor/harbor/src/vendor/github.com/gocraft/work.runJob.func1(0x0, 0x0)
/go/src/github.com/goharbor/harbor/src/vendor/github.com/gocraft/work/run.go:23 +0x347
github.com/goharbor/harbor/src/vendor/github.com/gocraft/work.runJob(0xc000272000, 0x19e8500, 0x16397e0, 0xc00000e2c8, 0x1, 0x1, 0xc0003c87e0, 0xc00003f320, 0x56, 0xc00056be80, ...)
/go/src/github.com/goharbor/harbor/src/vendor/github.com/gocraft/work/run.go:51 +0x278
github.com/goharbor/harbor/src/vendor/github.com/gocraft/work.(*worker).processJob(0xc00012fa40, 0xc000272000)
/go/src/github.com/goharbor/harbor/src/vendor/github.com/gocraft/work/worker.go:198 +0x22a
github.com/goharbor/harbor/src/vendor/github.com/gocraft/work.(*worker).loop(0xc00012fa40)
/go/src/github.com/goharbor/harbor/src/vendor/github.com/gocraft/work/worker.go:119 +0x314
created by github.com/goharbor/harbor/src/vendor/github.com/gocraft/work.(*worker).start
/go/src/github.com/goharbor/harbor/src/vendor/github.com/gocraft/work/worker.go:78 +0x3f
2019-04-09T09:28:17Z [ERROR] [redis_job_wrapper.go:70]: Job 'REPLICATION:93b288175333dd03971e14e7' exit with error: Runtime error: runtime error: invalid memory address or nil pointer dereference
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment