Closed rohitrana-git closed 2 years ago
I've just run through the build of the Dockerfile.aceonly
docker file and it completed successfully. For me though, the call to RUN /opt/ibm/ace-12/ace make registry global accept license silently ...
is step 42 of 50. Are you building the vanilla Dockerfile.aceonly
file or a modified version of it?
If I exec into the final image and poke around, there is no /lib/ld64.so.1
file either (and there isn't in registry.access.redhat.com/ubi8/ubi-minimal
either) so the error is accurate, but I'm not sure what is trying to use that file in the compound RUN
statement. It might be the useradd
call as that does try to use a /lib/ld-...
library but in a different place
ldd /usr/sbin/useradd
linux-vdso.so.1 (0x00007ffe82798000)
libaudit.so.1 => /lib64/libaudit.so.1 (0x00007fce65902000)
libselinux.so.1 => /lib64/libselinux.so.1 (0x00007fce656d8000)
libsemanage.so.1 => /lib64/libsemanage.so.1 (0x00007fce65497000)
libacl.so.1 => /lib64/libacl.so.1 (0x00007fce6528e000)
libattr.so.1 => /lib64/libattr.so.1 (0x00007fce65088000)
libc.so.6 => /lib64/libc.so.6 (0x00007fce64cc3000)
libcap-ng.so.0 => /lib64/libcap-ng.so.0 (0x00007fce64abd000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fce6489d000)
libpcre2-8.so.0 => /lib64/libpcre2-8.so.0 (0x00007fce64619000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007fce64415000)
/lib64/ld-linux-x86-64.so.2 (0x00007fce65d57000)
libsepol.so.1 => /lib64/libsepol.so.1 (0x00007fce64163000)
libbz2.so.1 => /lib64/libbz2.so.1 (0x00007fce63f52000)
Or it might be the su
call. I don't think anything else is a linked executable
It's almost like the ubi8/ubi-minimal
you're building from is somehow corrupted (or something other than ubi8/ubi-minimal
).
Things you can try:
RUN
command is run separately to narrow down which one is triggering the error. Or you could only build up to the line before this failing RUN
, then exec in and run each command separately - that might be better for poking around to see what's wrongThanks @andyedwardsibm , this is resolved now. It was due to an incorrect tar file.
I can now successfully build an ace12 image and run on my mac. But I am still facing some issues in deploying that on cloud infrastructure. We are trying to migrate from ace 11 to 12. Any idea on this error?
panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x722086]
goroutine 1 [running]: github.com/ot4i/ace-docker/common/logger.(*Logger).Debugf(0x0, 0x136280a, 0x1f, 0xc0001242e0, 0x1, 0x1) /go/src/github.com/ot4i/ace-docker/common/logger/logger.go:150 +0x26 main.logTermination(0xc000185ee8, 0x1, 0x1) /go/src/github.com/ot4i/ace-docker/cmd/runaceserver/logging.go:36 +0x105 main.doMain(0x80e00, 0xc0000b2058) /go/src/github.com/ot4i/ace-docker/cmd/runaceserver/main.go:42 +0x140 main.main() /go/src/github.com/ot4i/ace-docker/cmd/runaceserver/main.go:244 +0x22
Investigation There are two things to consider here...
In the general case, it's failing while it's trying to shut down and log the reason for that shutdown. You might be able to pin down how far the code has got through https://github.com/ot4i/ace-docker/blob/master/cmd/runaceserver/main.go by checking if there are any other log messages. You can also try setting the env var DEBUG
to 1
and see if the logs are more verbose, but I don't think that helps in this immediate case (see below).
That SIGSEGV shouldn't happen. It's basically a memory violation being hit at this line https://github.com/ot4i/ace-docker/blob/4c250831a9c9b2c4bbff8b7950c8d0c0b199779b/cmd/runaceserver/logging.go#L36
The line numbers suggest it's failing really early on, and that it's hitting the following...
then line 36 in https://github.com/ot4i/ace-docker/blob/4c250831a9c9b2c4bbff8b7950c8d0c0b199779b/cmd/runaceserver/logging.go#L32-L42
then line 150 in https://github.com/ot4i/ace-docker/blob/4c250831a9c9b2c4bbff8b7950c8d0c0b199779b/common/logger/logger.go#L149-L153
...and I think this is the big clue. It's failing during creation of the logger, so that when it then tries to log the error it hits the SIGSEGV. That means it must be the call to name, nameErr := name.GetIntegrationServerName()
that is failing. Looking at that piece of code...
https://github.com/ot4i/ace-docker/blob/4c250831a9c9b2c4bbff8b7950c8d0c0b199779b/internal/name/name.go#L49-L61
So either the env var ACE_SERVER_NAME
is not set or the call to os.Hostname()
is failing for some reason
Steps to prove and investigate further Could you try one of the following:
ACE_SERVER_NAME
to something like "ace-server" and see if that avoids the problem?configureLogger
in https://github.com/ot4i/ace-docker/blob/4c250831a9c9b2c4bbff8b7950c8d0c0b199779b/cmd/runaceserver/logging.go#L71-L75 that calls something like fmt.Println(name)
so we can see what it thinks the server's name is. GetIntegrationServerName
function as I think that's where it's failing to get a server name, and failing to set a default https://github.com/ot4i/ace-docker/blob/4c250831a9c9b2c4bbff8b7950c8d0c0b199779b/internal/name/name.go#L49 Steps to fix I suspect that the above debugging will reveal a solution to your problem, but there is still technically a bug in the code whereby your failure produces a situation where we can't even log what's wrong, so do please let us know if you find a root cause and we can improve the code
Closing this as resolved
PR(https://github.com/ot4i/ace-docker/issues/164 ) fixed the error but now giving error
=> [stage-1 16/19] COPY ubi/generic_invalid/application.descriptor /home/aceuser/temp 0.0s => ERROR [stage-1 17/19] RUN /opt/ibm/ace-12/ace make registry global accept license silently && useradd -u 1000 -d /home/aceuser -G mqbrkrs,wheel aceuser && mkdir -p /var/mqsi && mkdir -p /home/aceuser/initial-config && su - -c '. /opt/ibm/ace-12/server 0.3s
Originally posted by @rranagit in https://github.com/ot4i/ace-docker/issues/164#issuecomment-904735977