Discuss.FOLIO.org is no longer used. This is a static snapshot of the website as of February 14, 2023.

Error in installation of single server with container

vkybits
7 Dec '21

Hi Everyone,
I am following installation given in the below link;

I need some assistance in installing OKAPI
I edited the file and added local private IP address

  • Edit file /etc/folio/okapi/okapi.conf to reflect the following changes:
    role=“dev”
    port_end=“9250”
    host="<YOUR_IP_ADRESS>"
    storage=“postgres”
    okapiurl=“http://<YOUR_IP_ADDRESS>:9130”
    docker_registries – See explanation in okapi.conf file. Default is unauthenticated.
  1. Restarted Okapi
  2. And when I tried Pull module descriptors from the central registry by using below instruction
curl -w '\n' -D - -X POST -H "Content-type: application/json" \
  -d @registry.json \
  http://localhost:9130/_/proxy/pull/modules

**I am getting an below error **
cuils@cuils:~$ curl -w '\n' -D - -X POST -H "Content-type: application/json" \
>   -d @registry.json \
>   http://localhost:9130/_/proxy/pull/modules
Warning: Couldn't read data from file "registry.json", this makes an empty
Warning: POST.
curl: (7) Failed to connect to localhost port 9130: Connection refused
https://folio-registry.dev.folio.org does not show up any thing

I am now stuck here and cannot move. I am not the one who stuck here. 
Please someone can send full detailed instruction to perform local installation.
Thanks
Vivek
Nils_Olof_Paulsson
7 Dec '21

Morning.

Looks like you have two problems, actually.
Anyway, you need to create registry.json first. The paragraph below the curl command in the guide. However, it should contain:

{
“urls”: [
http://folio-registry.dev.folio.org
]
}

Second, looks like okpai does not answer on localhost. Use http://<YOUR_IP_ADDRESS>:9130/_/proxy/pull/modules
instead.

vkybits
9 Dec '21

Thanks Nils_Olof_Paulsson,
I created registry.json file and saved under /etc/folio/okapi directory.
I also tried with localhost and local ip address in curl, but got the same error;
uils@cuils:~$ curl -w ‘\n’ -D - -X POST -H “Content-type: application/json” \

-d @registry.json
http://localhost:9130/_/proxy/pull/modules
Warning: Couldn’t read data from file “registry.json”, this makes an empty
Warning: POST.
curl: (7) Failed to connect to localhost port 9130: Connection refused

cuils@cuils:~$ curl -w ‘\n’ -D - -X POST -H “Content-type: application/json” \

-d @registry.json
http://172.17.3.254:9130/_/proxy/pull/modules
Warning: Couldn’t read data from file “registry.json”, this makes an empty
Warning: POST.
curl: (7) Failed to connect to 172.17.3.254 port 9130: No route to host
Please guide me where to place registry.json file.
I also disabled the firewall but got the same error.
Any other clue how this issue can be resolved?

Nils_Olof_Paulsson
9 Dec '21

Morning,

You are not on the host on which okapi is running, right ?

Try


ssh 172.17.3.254
cd /etc/folio/okapi


and then your curl should work.
The 172.17… . kind of hints that you mignt be running a VirtualBox guest ?
In that case you could use the console.

Nils_Olof_Paulsson
9 Dec '21

Just a couple of quick notes:
The single-server instruction requires that every command is run on the host okapi is installed on.
curl … -d @ … sends the contents of the file, so you could specify a path. And there is no need for the file to be in /etc/folio/okapi. I had a work dir. where i put such filers, and also had the platform-complets repo there.

vkybits
9 Dec '21

Thanks,
-I installed ubuntu 20.04 server in my laptop and plugged to the network and configured static IP 172.17.3.254
-I followed instructions given in Single server with containers | FOLIO Documentation and reached up to Install and configure Okapi point no:4 Pull module descriptors from the central registry. link of Module Descriptor is published to the FOLIO Registry at https://folio-registry.dev.folio.org. shows error
image
It was not clear in the documentation where to create and keep registry.json file and from which path curl to run.
I am very thankful to your assistance.

pmarguier
8 Feb '22

hello

I run into the same issue maybe you just need to use “./registry.json” and not just “@registry.json” on the curl call use:
curl -w ‘\n’ -D - -X POST -H “Content-type: application/json” -d @./registry.json http://localhost:9130/_/proxy/pull/modules

after that it works fine for me. I waited a bit and got JSON feedback with modules id and names.