Any one can rectify this issue... 404 /server not available

122 views
Skip to first unread message

Jayachristrayar S

unread,
Nov 11, 2024, 1:19:25 AM11/11/24
to DSpace Technical Support
 I recently attempted to install DSpace-CRIS 7, following the documented steps meticulously. Unfortunately, I encountered an issue when trying to access the server. When I navigate to http://82.112.238.193:8080/server, the page displays a "server not found" error.  Checked all log files to diagnose any errors.
  • All logs indicate no errors, suggesting that the services may be running without issues.
  • However, accessing the server via http://82.112.238.193:8080/server returns a "server not found" error.


 HTTP Status 404 – Not Found

Type Status Report

Message The requested resource [/server/] is not available

Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.


Apache Tomcat/10.1.16 (Ubuntu)

if any one know about these issue kindly update . if you want to check something in our system kindly contact sjayachr...@gmail.com i will provide the ssh server access to you
I used these steps
===============
sudo useradd -m dspace
sudo passwd dspace

sudo usermod -aG sudo dspace 
sudo mkdir /dspace
sudo chown dspace /dspace
sudo apt install wget curl git build-essential mousepad zip unzip -y
sudo apt install openjdk-17-jdk -y
sudo mousepad /etc/environment

Add the following two lines to the file,

JAVA_HOME="/usr/lib/jvm/java-17-openjdk-amd64"
JAVA_OPTS="-Xmx512M -Xms64M -Dfile.encoding=UTF-8"

sudo apt install maven ant -y
sudo apt-get install postgresql postgresql-client postgresql-contrib libpostgresql-jdbc-java -y
sudo pg_ctlcluster 16 main start
sudo systemctl status postgresql
sudo passwd postgres
sudo mousepad /etc/postgresql/16/main/postgresql.conf
Uncomment the line (remove #) listen_addresses = 'localhost' under the connection settings option.
udo mousepad /etc/postgresql/16/main/pg_hba.conf

Add the following lines below it,

#DSpace configuration
host dspace dspace 127.0.0.1 255.255.255.255 md5

sudo systemctl restart postgresql
sudo unzip solr-8.11.4.zip
sudo bash solr-8.11.4/bin/install_solr_service.sh solr-8.11.4.zip
sudo systemctl enable solr
sudo systemctl start solr
sudo systemctl status solr

checked with http://localhost:8983/solr it works fine 
sudo mkdir /build
cd /build
sudo unzip dspace-cris-2023.02.06.zip
sudo chmod 777 -R /build
sudo apt install tomcat10 -y
sudo mousepad /lib/systemd/system/tomcat10.service

Add the following line at the last portion,

ReadWritePaths=/dspace

sudo mousepad /etc/tomcat10/server.xml

Add the following lines below the commented-out lines,

<Connector port="8080" protocol="HTTP/1.1"
minSpareThreads="25"
enableLookups="false"
redirectPort="8443"
connectionTimeout="20000"
disableUploadTimeout="true"
URIEncoding="UTF-8"/>

sudo systemctl daemon-reload
sudo systemctl restart tomcat10.service
sudo su postgres
cd /etc/postgresql/16/main
createuser --username=postgres --no-superuser --pwprompt dspace

createdb --username=postgres --owner=dspace --encoding=UNICODE dspace

psql --username=postgres dspace -c "CREATE EXTENSION pgcrypto;"

exit

cd/build/DSpace-dspace-cris- 2023.02.06  /dspace/config

sudo cp local.cfg.EXAMPLE local.cfg
sudo mousepad local.cfg
DSpace server URL
dspace.server.url = http://localhost:8080/server

DSpace frontend URL
dspace.ui.url = http://localhost:4000

# Name of the site
dspace.name = DSpace at My University

If any changes in the DSpace database username/password, mention them here.

# Database username and password
db.username = dspace
db.password = dspace

Uncomment the following line in the local.cfg file,


sudo su

cd /build/DSpace-dspace-cris-2023.02.06
mvn package
cd dspace/target/dspace-installer
ant fresh_install
exit
sudo cp -R /dspace/webapps/* /var/lib/tomcat10/webapps
sudo cp -R /dspace/solr/* /var/solr/data
sudo chown -R solr:solr /var/solr/data
sudo systemctl restart solr
cd /dspace/bin/
sudo ./dspace database migrate
sudo /dspace/bin/dspace create-administrator.

Creating an initial administrator account
E-mail address: e.g. dspace@localhost
First name: e.g. DSpace
Last name: e.g. MGU
Is the above data correct? (y or n): y
Password will not display on screen.
Password: Enter the password to login DSpace.
Again to confirm: Confirm the password again.
Administrator account created

Change permission of DSpace to Tomcat user

sudo chown -R tomcat:tomcat /dspace/
sudo systemctl restart tomcat10.service

sudo apt install nodejs -y
sudo apt install npm
sudo npm install --global yarn
sudo npm install --global pm2

sudo su
cd /home/dspace

unzip dspace-cris-2023.02.06.zip
cd /home/dspace/dspace-angular-dspace-cris-2023.02.06
yarn install
cd config
cp config.example.yml config.prod.yml
mousepad config.prod.yml
rest:
  ssl: false
  host: localhost
  port: 8080
yarn run build:prod
exit
sudo mousepad /home/dspace/dspace-angular- dspace-cris-2023.02.06  /dspace-ui.json

Copy the following content into the dspace-ui.jason file,

{
    "apps": [
        {
           "name": "dspace-ui",
           "cwd": "/home/dspace/dspace-angular- dspace-cris-2023.02.06  /",
           "script": "dist/server/main.js",
           "instances": "max",
           "exec_mode": "cluster",
           "env": {
              "NODE_ENV": "production"
           }
        }
    ]
}
sudo su
pm2 start /home/dspace/dspace-angular- dspace-cris-2023.02.06  /dspace-ui.json
crontab -e
#Auto start dspace-angular
@reboot bash -ci 'pm2 start /home/dspace/dspace-angular- dspace-cris-2023.02.06  /dspace-ui.json'

Enter the below URL on the browser to start the DSpace front end,

http://localhost:4000

pm2 install pm2-logrotate
pm2 set pm2-logrotate:max_size 1000K
pm2 set pm2-logrotate:compress true
pm2 set pm2-logrotate:rotateInterval 0 0 19 1 1 7


Reply all
Reply to author
Forward
0 new messages