I'm trying to set up a DSpace 5.4 on a local VM to prepare for the upgrade to DSpace 5.5 on another machine.
The setup procedure works fine, but I can't get the solr webapp to work. I deployed it (Using Tomocat 8.0.33 and OpenJDK 1.8.0_60 on OpenSuse Leaf 42.1), and it's returning the following error when called from the VM and from the host:
java.net.UnknownHostException: linux-ai1n: unknown error
java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928)
java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323)
java.net.InetAddress.getLocalHost(InetAddress.java:1500)
org.dspace.solr.filters.LocalHostRestrictionFilter.doFilter(LocalHostRestrictionFilter.java:38)
So when using a discovery related function, this error is returned:
Expected mime type application/octet-stream but got text/html.
Answers I found only suggest to change the solr URL, so I have tried changing the solr URL in config/modules/discovery.cfg from http://localhost:8080/solr/search to http://127.0.0.1:8008/solr/search, but that did not solve the problem.
Any hints what to check next would be very helpful. Could this be an issue with not enough memory available on the virtual machine?
This might be a problem with /etc/hosts. If /etc/hosts does not contain the definition of the hostname it fails. Try adding linux-ai1n to the hosts file, e.g.
127.0.0.1 localhost linux-ai1n