Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bugs]i've installed free5gc in centos8, it was already compiled completely, but when i start test, it reports error #431

Closed
HAIYAA opened this issue Mar 2, 2023 · 4 comments

Comments

@HAIYAA
Copy link

HAIYAA commented Mar 2, 2023

Describe the bug

hi, i've installed free5gc in centos8, i've update its kernel to 5.4.232-1.el8.elrepo.x86_64, and i've install extra-kernel to insist protocol sctp, then i ran "make all" for free5gc, it shows nothing wrong. but when i run the test "./test.sh TestRegistration" ,it was failed.

Log File

### here is the log of after run the "make all"
`Start building amf....
cd NFs/amf/cmd &&
CGO_ENABLED=0 go build -gcflags "" -ldflags "-X github.com/free5gc/util/version.VERSION=v3.2.0 -X github.com/free5gc/util/version.BUILD_TIME=2023-03-02T13:55:42Z -X github.com/free5gc/util/version.COMMIT_HASH=a3bd5358 -X github.com/free5gc/util/version.COMMIT_TIME=2022-05-01T14:58:26Z" -o /home/zzy/free5gc/bin/amf main.go
Start building ausf....
cd NFs/ausf/cmd &&
CGO_ENABLED=0 go build -gcflags "" -ldflags "-X github.com/free5gc/util/version.VERSION=v3.2.0 -X github.com/free5gc/util/version.BUILD_TIME=2023-03-02T13:55:51Z -X github.com/free5gc/util/version.COMMIT_HASH=ee6a571a -X github.com/free5gc/util/version.COMMIT_TIME=2022-05-02T15:25:07Z" -o /home/zzy/free5gc/bin/ausf main.go
Start building nrf....
cd NFs/nrf/cmd &&
CGO_ENABLED=0 go build -gcflags "" -ldflags "-X github.com/free5gc/util/version.VERSION=v3.2.0 -X github.com/free5gc/util/version.BUILD_TIME=2023-03-02T13:55:53Z -X github.com/free5gc/util/version.COMMIT_HASH=+f159dc9 -X github.com/free5gc/util/version.COMMIT_TIME=2021-10-19T09:56:40Z" -o /home/zzy/free5gc/bin/nrf main.go
Start building nssf....
cd NFs/nssf/cmd &&
CGO_ENABLED=0 go build -gcflags "" -ldflags "-X github.com/free5gc/util/version.VERSION=v3.2.0 -X github.com/free5gc/util/version.BUILD_TIME=2023-03-02T13:55:58Z -X github.com/free5gc/util/version.COMMIT_HASH=04037a7a -X github.com/free5gc/util/version.COMMIT_TIME=2022-05-02T15:27:24Z" -o /home/zzy/free5gc/bin/nssf main.go
Start building pcf....
cd NFs/pcf/cmd &&
CGO_ENABLED=0 go build -gcflags "" -ldflags "-X github.com/free5gc/util/version.VERSION=v3.2.0 -X github.com/free5gc/util/version.BUILD_TIME=2023-03-02T13:56:00Z -X github.com/free5gc/util/version.COMMIT_HASH=+9fc9f68 -X github.com/free5gc/util/version.COMMIT_TIME=2022-02-03T16:02:01Z" -o /home/zzy/free5gc/bin/pcf main.go
Start building smf....
cd NFs/smf/cmd &&
CGO_ENABLED=0 go build -gcflags "" -ldflags "-X github.com/free5gc/util/version.VERSION=v3.2.0 -X github.com/free5gc/util/version.BUILD_TIME=2023-03-02T13:56:03Z -X github.com/free5gc/util/version.COMMIT_HASH=de70bf6c -X github.com/free5gc/util/version.COMMIT_TIME=2022-06-28T04:52:40Z" -o /home/zzy/free5gc/bin/smf main.go
Start building udm....
cd NFs/udm/cmd &&
CGO_ENABLED=0 go build -gcflags "" -ldflags "-X github.com/free5gc/util/version.VERSION=v3.2.0 -X github.com/free5gc/util/version.BUILD_TIME=2023-03-02T13:56:06Z -X github.com/free5gc/util/version.COMMIT_HASH=dd730c19 -X github.com/free5gc/util/version.COMMIT_TIME=2022-05-02T15:30:19Z" -o /home/zzy/free5gc/bin/udm main.go
Start building udr....
cd NFs/udr/cmd &&
CGO_ENABLED=0 go build -gcflags "" -ldflags "-X github.com/free5gc/util/version.VERSION=v3.2.0 -X github.com/free5gc/util/version.BUILD_TIME=2023-03-02T13:56:08Z -X github.com/free5gc/util/version.COMMIT_HASH=+7ae84cd -X github.com/free5gc/util/version.COMMIT_TIME=2021-11-11T02:42:59Z" -o /home/zzy/free5gc/bin/udr main.go
Start building n3iwf....
cd NFs/n3iwf/cmd &&
CGO_ENABLED=0 go build -gcflags "" -ldflags "-X github.com/free5gc/util/version.VERSION=v3.2.0 -X github.com/free5gc/util/version.BUILD_TIME=2023-03-02T13:56:10Z -X github.com/free5gc/util/version.COMMIT_HASH=ef87ca50 -X github.com/free5gc/util/version.COMMIT_TIME=2022-05-02T15:25:52Z" -o /home/zzy/free5gc/bin/n3iwf main.go
Start building upf....
cd NFs/upf/cmd &&
CGO_ENABLED=0 go build -gcflags "" -ldflags "-X github.com/free5gc/util/version.VERSION=v3.2.0 -X github.com/free5gc/util/version.BUILD_TIME=2023-03-02T13:56:17Z -X github.com/free5gc/util/version.COMMIT_HASH=4972fffb -X github.com/free5gc/util/version.COMMIT_TIME=2022-06-29T05:46:33Z" -o /home/zzy/free5gc/bin/upf main.go
Start building webconsole....
cd webconsole/frontend &&
yarn install &&
yarn build &&
rm -rf ../public &&
cp -R build ../public
yarn install v1.22.19
warning ../../../package.json: No license field
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] Resolving packages...
success Already up-to-date.
Done in 0.54s.
yarn run v1.22.19
warning ../../../package.json: No license field
$ NODE_PATH=./src node scripts/build.js
Creating an optimized production build...
Deprecation Warning: Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div(15, 16) or calc(15 / 16)

More info and automated migrator: https://sass-lang.com/d/slash-div


2 │ $ct-scales: ((1), (15/16), (8/9), (5/6), (4/5), (3/4), (2/3), (5/8), (1/1.618), (3/5), (9/16), (8/15), (1/2), (2/5), (3/8), (1/3), (1/4)) !default;
│ ^^^^^

src/assets/styles/base/mixins/_chartist.scss 2:20 @import
src/assets/styles/base/_mixins.scss 22:9 @import
stdin 4:9 root stylesheet

Deprecation Warning: Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div(8, 9) or calc(8 / 9)

More info and automated migrator: https://sass-lang.com/d/slash-div


2 │ $ct-scales: ((1), (15/16), (8/9), (5/6), (4/5), (3/4), (2/3), (5/8), (1/1.618), (3/5), (9/16), (8/15), (1/2), (2/5), (3/8), (1/3), (1/4)) !default;
│ ^^^

src/assets/styles/base/mixins/_chartist.scss 2:29 @import
src/assets/styles/base/_mixins.scss 22:9 @import
stdin 4:9 root stylesheet

Deprecation Warning: Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div(5, 6) or calc(5 / 6)

More info and automated migrator: https://sass-lang.com/d/slash-div


2 │ $ct-scales: ((1), (15/16), (8/9), (5/6), (4/5), (3/4), (2/3), (5/8), (1/1.618), (3/5), (9/16), (8/15), (1/2), (2/5), (3/8), (1/3), (1/4)) !default;
│ ^^^

src/assets/styles/base/mixins/_chartist.scss 2:36 @import
src/assets/styles/base/_mixins.scss 22:9 @import
stdin 4:9 root stylesheet

Deprecation Warning: Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div(4, 5) or calc(4 / 5)

More info and automated migrator: https://sass-lang.com/d/slash-div


2 │ $ct-scales: ((1), (15/16), (8/9), (5/6), (4/5), (3/4), (2/3), (5/8), (1/1.618), (3/5), (9/16), (8/15), (1/2), (2/5), (3/8), (1/3), (1/4)) !default;
│ ^^^

src/assets/styles/base/mixins/_chartist.scss 2:43 @import
src/assets/styles/base/_mixins.scss 22:9 @import
stdin 4:9 root stylesheet

Deprecation Warning: Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div(3, 4) or calc(3 / 4)

More info and automated migrator: https://sass-lang.com/d/slash-div


2 │ $ct-scales: ((1), (15/16), (8/9), (5/6), (4/5), (3/4), (2/3), (5/8), (1/1.618), (3/5), (9/16), (8/15), (1/2), (2/5), (3/8), (1/3), (1/4)) !default;
│ ^^^

src/assets/styles/base/mixins/_chartist.scss 2:50 @import
src/assets/styles/base/_mixins.scss 22:9 @import
stdin 4:9 root stylesheet

Warning: 12 repetitive deprecation warnings omitted.

Compiled successfully.

File sizes after gzip:

312.78 KB build/static/js/main.31297141.js

The project was built assuming it is hosted at the server root.
To override this, specify the homepage in your package.json.
For example, add this to build it for GitHub Pages:

"homepage" : "http://myname.github.io/myapp",

The build folder is ready to be deployed.
You may serve it with a static server:

yarn global add serve
serve -s build

Done in 23.82s.
`
### and here is the log of after run the "./test.sh TestRegistration"

2023-03-02T22:07:06+08:00 [INFO][UPF][Main] UPF version:
free5GC version: v3.2.0
build time: 2023-03-02T13:56:17Z
commit hash: 4972fffb
commit time: 2022-06-29T05:46:33Z
go version: go1.17 linux/amd64
2023-03-02T22:07:06+08:00 [INFO][UPF][Cfg] Read config from [./config/upfcfg.test.yaml]
2023-03-02T22:07:06+08:00 [INFO][UPF][Cfg] ==================================================
2023-03-02T22:07:06+08:00 [INFO][UPF][Cfg] (*factory.Config)(0xc00009b540)({
Version: (string) (len=5) "1.0.3",
Description: (string) (len=31) "UPF initial local configuration",
Pfcp: (*factory.Pfcp)(0xc000469140)({
Addr: (string) (len=14) "10.200.200.101",
NodeID: (string) (len=14) "10.200.200.101",
RetransTimeout: (time.Duration) 1s,
MaxRetrans: (uint8) 3
}),
Gtpu: (*factory.Gtpu)(0xc0004692f0)({
Forwarder: (string) (len=5) "gtp5g",
IfList: ([]factory.IfInfo) (len=1 cap=1) {
(factory.IfInfo) {
Addr: (string) (len=14) "10.200.200.102",
Type: (string) (len=2) "N3",
Name: (string) "",
IfName: (string) ""
}
}
}),
DnnList: ([]factory.DnnList) (len=1 cap=1) {
(factory.DnnList) {
Dnn: (string) (len=8) "internet",
Cidr: (string) (len=12) "10.60.0.0/16",
NatIfName: (string) ""
}
},
Logger: (*factory.Logger)(0xc0004705c0)({
Enable: (bool) true,
Level: (string) (len=4) "info",
ReportCaller: (bool) false
})
})
2023-03-02T22:07:06+08:00 [INFO][UPF][Cfg] ==================================================
2023-03-02T22:07:06+08:00 [INFO][UPF][Main] Log level is set to [info] level
2023-03-02T22:07:06+08:00 [INFO][UPF][Main] starting Gtpu Forwarder [gtp5g]
2023-03-02T22:07:06+08:00 [INFO][UPF][Main] GTP Address: "10.200.200.102:2152"
2023-03-02T22:07:06+08:00 [INFO][UPF][Buff] buff server started
2023-03-02T22:07:06+08:00 [INFO][UPF][Pfcp][10.200.200.101:8805] starting pfcp server
2023-03-02T22:07:06+08:00 [INFO][UPF][Pfcp][10.200.200.101:8805] pfcp server started
2023-03-02T22:07:06+08:00 [INFO][UPF][Main] UPF started

test_test [test.test]

./ngsetup_test.go:43:2: cannot use &"github.com/free5gc/nrf/pkg/service".NRF{} (type *"github.com/free5gc/nrf/pkg/service".NRF) as type app.NetworkFunction in slice literal:
*"github.com/free5gc/nrf/pkg/service".NRF does not implement app.NetworkFunction (missing SetLogLevel method)
have "github.com/free5gc/nrf/pkg/service".setLogLevel()
want SetLogLevel()
./ngsetup_test.go:46:2: cannot use &"github.com/free5gc/udr/pkg/service".UDR{} (type *"github.com/free5gc/udr/pkg/service".UDR) as type app.NetworkFunction in slice literal:
*"github.com/free5gc/udr/pkg/service".UDR does not implement app.NetworkFunction (missing SetLogLevel method)
have "github.com/free5gc/udr/pkg/service".setLogLevel()
want SetLogLevel()
./ngsetup_test.go:47:2: cannot use &"github.com/free5gc/pcf/pkg/service".PCF{} (type *"github.com/free5gc/pcf/pkg/service".PCF) as type app.NetworkFunction in slice literal:
*"github.com/free5gc/pcf/pkg/service".PCF does not implement app.NetworkFunction (missing SetLogLevel method)
have "github.com/free5gc/pcf/pkg/service".setLogLevel()
want SetLogLevel()
FAIL test [build failed]
2023-03-02T22:07:11+08:00 [INFO][UPF][Main] Shutdown UPF ...
2023-03-02T22:07:11+08:00 [INFO][UPF][Pfcp][10.200.200.101:8805] Stopping pfcp server
2023-03-02T22:07:11+08:00 [ERRO][UPF][Pfcp][10.200.200.101:8805] read udp 10.200.200.101:8805: use of closed network connection
2023-03-02T22:07:11+08:00 [INFO][UPF][Pfcp][10.200.200.101:8805] pfcp reciver stopped
2023-03-02T22:07:11+08:00 [INFO][UPF][Pfcp][10.200.200.101:8805] pfcp server stopped
2023-03-02T22:07:11+08:00 [INFO][UPF][Buff] buff server stopped
2023-03-02T22:07:11+08:00 [INFO][UPF][Main] Terminating UPF...
2023-03-02T22:07:11+08:00 [INFO][UPF][Main] UPF terminated
2023-03-02T22:07:11+08:00 [INFO][UPF][Main] UPF exited`

Environment (please complete the following information):

  • free5GC Version: 3.2.0
  • OS: centos8
  • Kernel version: 5.4.232-1.el8.elrepo.x86_64
  • go version: 1.14.4
  • c compiler version (Option): 8.5.0 20210514 (Red Hat 8.5.0-4) (GCC)

i dont know how to solve this problem, is there any suggestion that i can follow? please.

@YouShengLiu
Copy link
Contributor

Hi @HAIYAA:

According to your log, it seems that your go version is go1.17 not go1.14.4.
Is it possible the problem?

@YouShengLiu
Copy link
Contributor

Hi @HAIYAA:

Can you provide the version of each NFs that you used?
The test case will not report any errors when I use nrf@v1.1.1. However, it reports the same errors as you provided after I switched the nrf from v1.1.1 to v1.1.0.
Therefore, I think your problem is that your use the wrong version of NFs.

Here is my environment:

  • free5GC Version: 3.2.0
  • OS: centos8
  • Kernel version: 5.4.244-1.el8.elrepo.x86_64
  • Go version: 1.14.4
  • C compiler version: 8.5.0 20210514 (Red Hat 8.5.0-19) (GCC)

Here is the version of each NFs:

  • a3bd5358ec55215e2b2f86f7744609f17bbc6991 NFs/amf (v1.1.1)
  • ee6a571ae39ef3f31353ebce24c160a78f4a83a0 NFs/ausf (v1.1.1)
  • ef87ca505cd576d999eafacc5299a72d18b9716c NFs/n3iwf (v1.1.1)
  • 35bbb553b90188d8d195a16e8fcb686dd440a8f0 NFs/nrf (v1.1.1)
  • 04037a7a806515c0527a74c55ed1f35e076ec527 NFs/nssf (v1.1.1)
  • 97ddbbd6d9264ee2aea678bc5c1170b8a7f919c6 NFs/pcf (v1.1.1)
  • de70bf6cffa14eae582373e5010c8695dffb2f8d NFs/smf (v1.1.1)
  • dd730c193e4f2fefc6d4f9620f2a2452c89f93fd NFs/udm (v1.1.1)
  • ea22acef0b3c35f82895ebc7f3f6ca8371497aee NFs/udr (v1.1.1)
  • 4972fffb016a092d569273d00c191a28d7afac26 NFs/upf (v1.0.0)
  • 69864fe682f4d92056ee2714336472612c6955d6 webconsole (v1.1.1)

@HAIYAA
Copy link
Author

HAIYAA commented Jun 1, 2023

Hi, dear yushung. Thank you. yes, it is caused by NFs' version, I fixed it some days ago. And actually, the version of Go doesn't matter, I used Go of version 1.17, it can run well. And, there's one thing, I used to able to notice the NFs' version problems when I installed free5GC in Ubuntu20, cause if I downloaded the wrong version NFs, I can't install free5GC successfully. But when I installed free5GC in Centos, it didn't give me any warning. It's a little weird, maybe it is because of the features of Centos.

@free5gc-org
Copy link
Contributor

This issue has been mentioned on free5GC. There might be relevant details there:

http://forum.free5gc.org/t/free5gc-installation-on-centos/2173/3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants