Can't modify ip address for UI dspace 7.5

64 views
Skip to first unread message

PROTOS tecnologia (PROTOS TECNOLOGIA)

unread,
Apr 29, 2023, 12:29:19 AM4/29/23
to DSpace Technical Support
Hello, i am trying to change the IP address in order to access to my UI for dspace 7.5.

The goal is to access the UI through a local IP (LAN) of the computer that contains both the front end and the back end. For example, to enter the UI I would like to put: http://192.168.1.10:4000 (where 192.168.1.10 is the IP address of the computer that contains the front end and the back end)

As default in the backend  (in local.cfg)  UI set as:
dspace.ui.url = http://localhost:4000

I would like the UI URL to have address:  http://192.168.1.10:4000
so i open the local.cfg and i edit it, now the ip address for my UI is:
dspace.ui.url = http://192.168.1.10:4000

After making changes to the local.cfg file, i have to re-run mvn package command in the ~/dspace-backend directory as well as the ant fresh_install command
in the ~/dspace-backend/dspace/target/dspace-installer directory.

When i start with the re-run for mvn package command,  it completed successfully , but when i start with the re-run for ant fresh_install command,  it ends in an error, the error says:
----------------------------------------------------------------------------------------------------------------------
init_installation:

prepare_configs:
    [mkdir] Created dir: /home/kali/dspace-backend/dspace/target/dspace-installer/config-temp
     [copy] Copying 221 files to /home/kali/dspace-backend/dspace/target/dspace-installer/config-temp
     [copy] Copying 1 file to /home/kali/dspace-backend/dspace/target/dspace-installer/config-temp
     [copy] Copying 14 files to /home/kali/dspace-backend/dspace/target/dspace-installer/config-temp

init_configs:
     [copy] Copying 2 files to /dspace/config
     [copy] Failed to copy /home/kali/dspace-backend/dspace/target/dspace-installer/config-temp/ant.properties to /dspace/config/ant.properties due to org.apache.tools.ant.util.ResourceUtils$ReadOnlyTargetFileException can't write to read-only destination file /dspace/config/ant.properties
     [copy] Failed to copy /home/kali/dspace-backend/dspace/target/dspace-installer/config-temp/local.cfg to /dspace/config/local.cfg due to org.apache.tools.ant.util.ResourceUtils$ReadOnlyTargetFileException can't write to read-only destination file /dspace/config/local.cfg
   [delete] Deleting directory /home/kali/dspace-backend/dspace/target/dspace-installer/config-temp

BUILD FAILED
/home/kali/dspace-backend/dspace/target/dspace-installer/build.xml:757: org.apache.tools.ant.util.ResourceUtils$ReadOnlyTargetFileException: can't write to read-only destination file /dspace/config/ant.properties
        at org.apache.tools.ant.util.ResourceUtils.copyResource(ResourceUtils.java:390)
        at org.apache.tools.ant.taskdefs.Echo.execute(Echo.java:64)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:299)
        at jdk.internal.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
        at org.apache.tools.ant.Task.perform(Task.java:350)
        at org.apache.tools.ant.Target.execute(Target.java:449)
        at org.apache.tools.ant.Target.performTasks(Target.java:470)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1401)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1374)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1264)
        at org.apache.tools.ant.Main.runBuild(Main.java:818)
        at org.apache.tools.ant.Main.startAnt(Main.java:223)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:284)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:101)

Total time: 2 seconds
 ----------------------------------------------------------------------------------------------------

Because ant fresh_install error, the server (back end) doesnt works and I can't change the IP to access the UI.

Any kind of help will be welcome, thank you.

DSpace Technical Support

unread,
May 1, 2023, 11:04:49 AM5/1/23
to DSpace Technical Support
Hi,

If you've already run "ant fresh_install" before, then there is no need to run it again.  That command is used to perform a brand new installation.  If you are trying to simply update an existing installation, use the "ant update" command instead.

It also sounds like you might have a directory permissions error in /dspace/config/, as the error above says "can't write to read-only destination".  So, you may want to verify that directory is not read-only to the user which is running "ant update".

If you have more questions, let us know on this list.

Tim

Protos

unread,
May 1, 2023, 10:27:47 PM5/1/23
to DSpace Technical Support
Hi tim, thanks to answer my question.

Fortunatelly, your advice (use ant update) works like a charm. 

Regarding the editing permission error in the directory, it did not appear. possibly because when I ran the ant update statement, I did it using the sudo ant update statement. But I'm not sure if that was the reason.

Now, I only have one question to solve, which is to be able to change the way to access the ui. I would like to be able to access through a local IP, and not through localhost. Should I change the IP configuration in the local.cfg file (backend) or in config.prod.yml (frontend) or both? After that, should I do a re-run maven and an ant update, and also run the yarn build:prod statement?

Thank you very mucho for your help.

Sebastian.













--
All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
---
You received this message because you are subscribed to a topic in the Google Groups "DSpace Technical Support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dspace-tech/IB20sryTId0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dspace-tech...@googlegroups.com.

To view this discussion on the web visit
https://groups.google.com/d/msgid/dspace-tech/0ac1e8ce-a417-4e17-bbe0-1929aaa3e0dbn%40googlegroups.com
.
Reply all
Reply to author
Forward
0 new messages