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

error building x-road 7.4.2 #2155

Open
mghase opened this issue May 10, 2024 · 29 comments
Open

error building x-road 7.4.2 #2155

mghase opened this issue May 10, 2024 · 29 comments
Labels
question Further information is requested

Comments

@mghase
Copy link

mghase commented May 10, 2024

am getting this error when running ./build_package.sh -d in ubuntu 22.04

dpkg-source --before-build .
fakeroot debian/rules clean
dh clean
dh_clean
debian/rules build
dh build
dh_update_autotools_config
dh_autoreconf
create-stamp debian/debhelper-build-stamp
fakeroot debian/rules binary
dh binary
dh_testroot
dh_prep
dh_install
dh_install: warning: Cannot find (any matches for) "../../../../../addons/proxymonitor/metaservice/build/libs/proxymonitor-metaservice-1.0.jar" (tried in ., debian/tmp)

dh_install: warning: xroad-centralserver-monitoring missing files: ../../../../../addons/proxymonitor/metaservice/build/libs/proxymonitor-metaservice-1.0.jar
dh_install: warning: Cannot find (any matches for) "../../../../../central-server/admin-service/application/build/libs/centralserver-admin-service-1.0.jar" (tried in ., debian/tmp)

dh_install: warning: xroad-center missing files: ../../../../../central-server/admin-service/application/build/libs/centralserver-admin-service-1.0.jar
dh_install: warning: Cannot find (any matches for) "../../../../../common/common-db/build/libs/common-db-1.0.jar" (tried in ., debian/tmp)

dh_install: warning: xroad-base missing files: ../../../../../common/common-db/build/libs/common-db-1.0.jar
dh_install: warning: Cannot find (any matches for) "../../../../../security-server/admin-service/application/build/unpacked-libs/postgresql-42.5.4.jar" (tried in ., debian/tmp)

dh_install: warning: xroad-base missing files: ../../../../../security-server/admin-service/application/build/unpacked-libs/postgresql-42.5.4.jar
dh_install: warning: Cannot find (any matches for) "../../../../../signer/build/libs/signer-1.0.jar" (tried in ., debian/tmp)

dh_install: warning: xroad-signer missing files: ../../../../../signer/build/libs/signer-1.0.jar
dh_install: warning: Cannot find (any matches for) "../../../../../signer-console/build/libs/signer-console-1.0.jar" (tried in ., debian/tmp)

dh_install: warning: xroad-signer missing files: ../../../../../signer-console/build/libs/signer-console-1.0.jar
dh_install: warning: Cannot find (any matches for) "../../../../../lib/libpasswordstore.so" (tried in ., debian/tmp)

dh_install: warning: xroad-signer missing files: ../../../../../lib/libpasswordstore.so
dh_install: warning: Cannot find (any matches for) "../../../../../proxy/build/libs/proxy-1.0.jar" (tried in ., debian/tmp)

dh_install: warning: xroad-proxy missing files: ../../../../../proxy/build/libs/proxy-1.0.jar
dh_install: warning: Cannot find (any matches for) "../../../../../configuration-proxy/build/libs/configuration-proxy-1.0.jar" (tried in ., debian/tmp)

dh_install: warning: xroad-confproxy missing files: ../../../../../configuration-proxy/build/libs/configuration-proxy-1.0.jar
dh_install: warning: Cannot find (any matches for) "../../../../../addons/messagelog/messagelog-addon/build/libs/messagelog-addon.jar" (tried in ., debian/tmp)

dh_install: warning: xroad-addon-messagelog missing files: ../../../../../addons/messagelog/messagelog-addon/build/libs/messagelog-addon.jar
dh_install: warning: Cannot find (any matches for) "../../../../../addons/messagelog/messagelog-archiver/build/libs/messagelog-archiver.jar" (tried in ., debian/tmp)

dh_install: warning: xroad-addon-messagelog missing files: ../../../../../addons/messagelog/messagelog-archiver/build/libs/messagelog-archiver.jar
dh_install: warning: Cannot find (any matches for) "../../../../../addons/messagelog/messagelog-archive-verifier/build/libs/messagelog-archive-verifier.jar" (tried in ., debian/tmp)

dh_install: warning: xroad-addon-messagelog missing files: ../../../../../addons/messagelog/messagelog-archive-verifier/build/libs/messagelog-archive-verifier.jar
dh_install: warning: Cannot find (any matches for) "../../../../../addons/metaservice/build/libs/metaservice-1.0.jar" (tried in ., debian/tmp)

dh_install: warning: xroad-addon-metaservices missing files: ../../../../../addons/metaservice/build/libs/metaservice-1.0.jar
dh_install: warning: Cannot find (any matches for) "../../../../../addons/proxymonitor/metaservice/build/libs/proxymonitor-metaservice-1.0.jar" (tried in ., debian/tmp)

dh_install: warning: xroad-addon-proxymonitor missing files: ../../../../../addons/proxymonitor/metaservice/build/libs/proxymonitor-metaservice-1.0.jar
dh_install: warning: Cannot find (any matches for) "../../../../../monitor/build/libs/monitor-1.0.jar" (tried in ., debian/tmp)

dh_install: warning: xroad-monitor missing files: ../../../../../monitor/build/libs/monitor-1.0.jar
dh_install: warning: Cannot find (any matches for) "../../../../../addons/wsdlvalidator/build/libs/wsdlvalidator-1.0.jar" (tried in ., debian/tmp)

dh_install: warning: xroad-addon-wsdlvalidator missing files: ../../../../../addons/wsdlvalidator/build/libs/wsdlvalidator-1.0.jar
dh_install: warning: Cannot find (any matches for) "../../../../../addons/op-monitoring/build/libs/op-monitoring-1.0.jar" (tried in ., debian/tmp)

dh_install: warning: xroad-addon-opmonitoring missing files: ../../../../../addons/op-monitoring/build/libs/op-monitoring-1.0.jar
dh_install: warning: Cannot find (any matches for) "../../../../../op-monitor-daemon/build/libs/op-monitor-daemon-1.0.jar" (tried in ., debian/tmp)

dh_install: warning: xroad-opmonitor missing files: ../../../../../op-monitor-daemon/build/libs/op-monitor-daemon-1.0.jar
dh_install: warning: Cannot find (any matches for) "../../../../../security-server/admin-service/application/build/libs/proxy-ui-api-1.0.jar" (tried in ., debian/tmp)

dh_install: warning: xroad-proxy-ui-api missing files: ../../../../../security-server/admin-service/application/build/libs/proxy-ui-api-1.0.jar
dh_install: warning: Cannot find (any matches for) "../../../../../central-server/registration-service/build/libs/centralserver-registration-service-1.0.jar" (tried in ., debian/tmp)

dh_install: warning: xroad-center-registration-service missing files: ../../../../../central-server/registration-service/build/libs/centralserver-registration-service-1.0.jar
dh_install: warning: Cannot find (any matches for) "../../../../../central-server/management-service/application/build/libs/centralserver-management-service-1.0.jar" (tried in ., debian/tmp)

dh_install: warning: xroad-center-management-service missing files: ../../../../../central-server/management-service/application/build/libs/centralserver-management-service-1.0.jar
dh_install: error: missing files, aborting
make: *** [debian/rules:3: binary] Error 255
dpkg-buildpackage: error: fakeroot debian/rules binary subprocess returned exit status 2
*** Error building deb-focal packages.

@raits
Copy link
Contributor

raits commented May 10, 2024

Hello @mghase,

Based on the error it seems that for some reason the jar files have not been built. Could you review the output to see if there were any issues with the build and also check the build directories to see if the jar files have been created.

@raits raits added the question Further information is requested label May 10, 2024
@mghase
Copy link
Author

mghase commented May 10, 2024

Hello @mghase,

Based on the error it seems that for some reason the jar files have not been built. Could you review the output to see if there were any issues with the build and also check the build directories to see if the jar files have been created.

Now am getting this error

[Warning] The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
2024-05-10T14:13:30.946+03:00 INFO 5034 --- [ream-2053697029] tc.signer-int-test : ---> Running in 0bcf8d09e1cf
2024-05-10T14:13:31.192+03:00 INFO 5034 --- [ream-2053697029] tc.signer-int-test : exec /bin/sh: exec format error

@raits
Copy link
Contributor

raits commented May 13, 2024

Unfortunately the ARM architecture is not yet fully supported and part of that is the signer process, which requires native libraries that don't currently support ARM.

You could run ./gradlew build in the src directory with the stacktrace or debug flags to see what the full error is and try to debug there. The easiest way probably would be to use an x86 based system to build and run the software for now.

@majana1
Copy link

majana1 commented May 13, 2024

Unfortunately the ARM architecture is not yet fully supported and part of that is the signer process, which requires native libraries that don't currently support ARM.

You could run ./gradlew build in the src directory with the stacktrace or debug flags to see what the full error is and try to debug there. The easiest way probably would be to use an x86 based system to build and run the software for now.

How about Intel processor does it support?

@raits
Copy link
Contributor

raits commented May 13, 2024

I believe Intel processors should all be x86 based at this time, so it should work.

@majana1
Copy link

majana1 commented May 14, 2024

Sorry, you mean only x86 or even Intel x64 can work?

@raits
Copy link
Contributor

raits commented May 14, 2024

Yes, the 64bit version is recommended.

@mghase
Copy link
Author

mghase commented May 15, 2024

Yes, the 64bit version is recommended.

is there any initial configuration before start buulding the image? we still get error in runing build_package.sh

@majana1
Copy link

majana1 commented May 15, 2024

hello,
after build sucess now we get this error

dpkg-source --before-build .
fakeroot debian/rules clean
dh clean
dh_clean
debian/rules build
dh build
dh_update_autotools_config
dh_autoreconf
create-stamp debian/debhelper-build-stamp
fakeroot debian/rules binary
dh binary
dh_testroot
dh_prep
dh_install
../../../../src/xroad/default-configuration/addons/center-monitoring.ini: 1: content-identifier: not found
../../../../src/xroad/default-configuration/addons/center-monitoring.ini: 2: file-name: not found
/workspace/src/packages/build/xroad/ubuntu/focal/debian/xroad-centralserver-monitoring.install: 3: ../../../../../addons/proxymonitor/metaservice/build/libs/proxymonitor-metaservice-1.0.jar: Exec format error
dh_install: warning: debian/xroad-centralserver-monitoring.install is marked executable but does not appear to an executable config.
dh_install: warning:
dh_install: warning: If debian/xroad-centralserver-monitoring.install is intended to be an executable config file, please ensure it can
dh_install: warning: be run as a stand-alone script/program (e.g. "./debian/xroad-centralserver-monitoring.install")
dh_install: warning: Otherwise, please remove the executable bit from the file (e.g. chmod -x "debian/xroad-centralserver-monitoring.install")
dh_install: warning:
dh_install: warning: Please see "Executable debhelper config files" in debhelper(7) for more information.
dh_install: warning:
dh_install: error: debian/xroad-centralserver-monitoring.install (executable config) returned exit code 2
make: *** [debian/rules:3: binary] Error 255
dpkg-buildpackage: error: fakeroot debian/rules binary subprocess returned exit status 2
*** Error building deb-focal packages.

@raits
Copy link
Contributor

raits commented May 15, 2024

Hey,

Could you clarify the OS you are building on now and if you are trying to build the code available in the repository or has it been modified? Additionally, please provide the command you are using to build as well.

@majana1
Copy link

majana1 commented May 15, 2024

Hey,

Could you clarify the OS you are building on now and if you are trying to build the code available in the repository or has it been modified? Additionally, please provide the command you are using to build as well.

OS:
Distributor ID: Ubuntu
Description: Ubuntu 22.04.3 LTS
Release: 22.04
Codename: jammy

and comand used:
build_package.sh

No any modification made on source code and we use release branch version 7.4.2

@mghase
Copy link
Author

mghase commented May 15, 2024

Hey,
Could you clarify the OS you are building on now and if you are trying to build the code available in the repository or has it been modified? Additionally, please provide the command you are using to build as well.

OS: Distributor ID: Ubuntu Description: Ubuntu 22.04.3 LTS Release: 22.04 Codename: jammy

and comand used: build_package.sh

No any modification made on source code and we use release branch version 7.4.2

and we follow this documentation:

https://github.com/nordic-institute/X-Road/blob/develop/src/BUILD.md
section: Dependency installation and instructions for building natively (without Docker)

also we try with docker we get the same error ./build_package -d

@raits
Copy link
Contributor

raits commented May 16, 2024

Hello,

  1. Data from one institution to another goes directly from one Security Server to the other. The connection between Security Servers in authenticated and encrypted as well as the contents of the message being signed, the client and sender systems don't need to implement it themselves. To increase security between the local Security Server and client information system, it is possible to additionally use mTLS or just regular HTTPS.
  2. As said in the previous point, the data exchange is direct. Additionally, cached OCSP responses are shared between the Security Servers directly more information about the network ports used is available in the Security Server documentation.

The Central Server acts as an administrative node for the instance as well as a configuration store and a sort of address book for the Security Servers. It does not play an active role in the data exchange itself.

I suggest taking a look at the free courses in the X-Road academy to get a better understanding of the system: https://x-road.thinkific.com/

Regarding the original question, have you now been able to build the software? If not could you please provide the full log of the build as a text file?

@mghase
Copy link
Author

mghase commented May 16, 2024

hello @

hello, after build sucess now we get this error

dpkg-source --before-build . fakeroot debian/rules clean dh clean dh_clean debian/rules build dh build dh_update_autotools_config dh_autoreconf create-stamp debian/debhelper-build-stamp fakeroot debian/rules binary dh binary dh_testroot dh_prep dh_install ../../../../src/xroad/default-configuration/addons/center-monitoring.ini: 1: content-identifier: not found ../../../../src/xroad/default-configuration/addons/center-monitoring.ini: 2: file-name: not found /workspace/src/packages/build/xroad/ubuntu/focal/debian/xroad-centralserver-monitoring.install: 3: ../../../../../addons/proxymonitor/metaservice/build/libs/proxymonitor-metaservice-1.0.jar: Exec format error dh_install: warning: debian/xroad-centralserver-monitoring.install is marked executable but does not appear to an executable config. dh_install: warning: dh_install: warning: If debian/xroad-centralserver-monitoring.install is intended to be an executable config file, please ensure it can dh_install: warning: be run as a stand-alone script/program (e.g. "./debian/xroad-centralserver-monitoring.install") dh_install: warning: Otherwise, please remove the executable bit from the file (e.g. chmod -x "debian/xroad-centralserver-monitoring.install") dh_install: warning: dh_install: warning: Please see "Executable debhelper config files" in debhelper(7) for more information. dh_install: warning: dh_install: error: debian/xroad-centralserver-monitoring.install (executable config) returned exit code 2 make: *** [debian/rules:3: binary] Error 255 dpkg-buildpackage: error: fakeroot debian/rules binary subprocess returned exit status 2 *** Error building deb-focal packages.

@raits still we get this error

@majana1
Copy link

majana1 commented May 16, 2024

Hello,

  1. Data from one institution to another goes directly from one Security Server to the other. The connection between Security Servers in authenticated and encrypted as well as the contents of the message being signed, the client and sender systems don't need to implement it themselves. To increase security between the local Security Server and client information system, it is possible to additionally use mTLS or just regular HTTPS.
  2. As said in the previous point, the data exchange is direct. Additionally, cached OCSP responses are shared between the Security Servers directly more information about the network ports used is available in the Security Server documentation.

The Central Server acts as an administrative node for the instance as well as a configuration store and a sort of address book for the Security Servers. It does not play an active role in the data exchange itself.

I suggest taking a look at the free courses in the X-Road academy to get a better understanding of the system: https://x-road.thinkific.com/

Regarding the original question, have you now been able to build the software? If not could you please provide the full log of the build as a text file?

X-Road-ErrorLogs.txt

@raits
Copy link
Contributor

raits commented May 16, 2024

I am having a bit of trouble reproducing this, could you please also share the output of git status and try running ./gradlew clean in the src directory and then attempt to build again.

@majana1
Copy link

majana1 commented May 16, 2024

ubuntu@DESKTOP:~/X-Road/src$ git status
On branch master
Your branch is up to date with 'origin/master'.

Untracked files:
(use "git add ..." to include in what will be committed)
../ansible/group_vars/demo-server.yml
../ansible/hosts/demo_hosts.txt

nothing added to commit but untracked files present (use "git add" to track)

@raits
Copy link
Contributor

raits commented May 17, 2024

Could you also provide the output of ./gradlew clean build as a text file?

@majana1
Copy link

majana1 commented May 20, 2024

Thanks for your support. We are now able to run the project using ansible. But we could not find the port numbers for CS and SS Servers listed with ip addresses

@raits
Copy link
Contributor

raits commented May 20, 2024

Hello,

I am glad you were able to run it.

I am not quite sure what your question is related to the ports and IP addresses. The IP addresses you would have had to set up yourself with ansible (or if you used LXD, then you can just use the command to list LXD containers to view them). As for the different ports that are in use, please refer to the Central Server and Security Server manuals, as they are documented there.

@majana1
Copy link

majana1 commented May 20, 2024

running lxc commands shows the ip address for CA, CS and ss1 and ss2. But when I put into browser the ip address does not run and we believe we are not using correct ports.

@majana1
Copy link

majana1 commented May 21, 2024

screen12
We have used ansible and we expected to get the Test CA certificate inside /home/ca/CA but the directory seem to be empty.
Can you please assist from here

@raits
Copy link
Contributor

raits commented May 23, 2024

Hello, that's strange. Did you have any errors or issues with running the Ansible command? Also please clarify the command you used to set the environment up.

As I wrote previously, the ports can be found in the manuals:

The user interface uses port 4000 on both the Central Server and the Security Server.

@mghase
Copy link
Author

mghase commented May 23, 2024

Unfortunately the ARM architecture is not yet fully supported and part of that is the signer process, which requires native libraries that don't currently support ARM.

You could run ./gradlew build in the src directory with the stacktrace or debug flags to see what the full error is and try to debug there. The easiest way probably would be to use an x86 based system to build and run the software for now.

@raits Can I know what native library you use in signer that support only amd processor?

@raits
Copy link
Contributor

raits commented May 27, 2024

It is the PKCS11 wrapper we use for communicating with HSM-s. It's not that it only supports AMD, it should support any processor (including Intel) that uses the x86-64 instruction set.

The library itself is located here in the source code: https://github.com/nordic-institute/X-Road/tree/develop/src/libs

As a comment, if you just want to try running the development version of the code, then the simplest way would be to use the Docker compose environment as documented here: https://github.com/nordic-institute/X-Road/tree/develop/Docker/xrd-dev-stack

It uses pre-built images from GitHub and also does the initial setup process. Just mind the port mappings in the compose file to figure see how port mappings work.

@majana1
Copy link

majana1 commented May 27, 2024

XROAD-ERROR BUILD.txt

Hello, we are building using dev so as to build imeaes locally. Can you please assist what is the error according to attached error messages

@raits
Copy link
Contributor

raits commented May 27, 2024

Based on the error it seems like you have built X-Road as one user and are now trying to package it using another user, but the user rights for the build results don't allow you to copy the file.

@mghase
Copy link
Author

mghase commented May 28, 2024

Based on the error it seems like you have built X-Road as one user and are now trying to package it using another user, but the user rights for the build results don't allow you to copy the file.

after giving it permission to the file due to the permission denied we get this error now -exc format error
dh clean
dh_clean
debian/rules build
dh build
dh_update_autotools_config
dh_autoreconf
create-stamp debian/debhelper-build-stamp
debian/rules binary
dh binary
dh_testroot
dh_prep
dh_install
../../../../src/xroad/default-configuration/addons/center-monitoring.ini: 1: content-identifier: not found
../../../../src/xroad/default-configuration/addons/center-monitoring.ini: 2: file-name: not found
/workspace/src/packages/build/xroad/ubuntu/focal/debian/xroad-centralserver-monitoring.install: 3: ../../../../../addons/proxymonitor/metaservice/build/libs/proxymonitor-metaservice-1.0.jar: Exec format error

@raits
Copy link
Contributor

raits commented May 28, 2024

Most likely it is not enough to change the permissions on a single file. The error probably stems from the fact that you are building the source as one user and then trying to package it under another.

Probably the simplest thing to do would be to start from scratch and make sure you use the same user to clone, build and package the source code.

So please try to delete your current source folder, clone the code again and try running the build_packages.sh script under your own user (not the root user). To simplify things, it would also be best to try with the develop branch code first as the 7.4.2 version state probably would require updating the NPM packages for it to pass the audit.

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

No branches or pull requests

3 participants