Get Free Trial

Data Server Connection

Resolved
Scott Oliver asked on June 10, 2021

We are attempting to setup data server for the first time.
 
After installing the CLI and running the command to install/run the FDS, we are receiving an error stating the “Server is unreachable” from the GUI.
 
If we hit localhost:9500 we receive a message saying that the data server is up and running. We haven to altered the JSON file in any capacity, the installation directories are stock

/Users/[Username]/flexmonster-data-server

We are running macOS Mojave 10.14.5 but we have also tried on later versions (on different machines) and had the same results.

17 answers

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster June 11, 2021

Hello, Scott,
 
Thank you for reaching out to us.
 
Could you please provide the exact steps you perform keeping order?
Also, please clarify the following:

  • What command do you run to add the Data Server? Does it include the -r flag? If not, do you agree to install it and start automatically?
  • Do you launch the executable flexmonster-data-server file?

 
Finally, please share with us files containing logs of the Data Server and Flexmonster Admin Panel. Files are named fmlog and adminfmlog. You should be able to find them in the FlexmonsterDataServer\logs directory.
 
Our current assumption is the following: Flexmonster Data Server is accidentally launched as a console application (flexmonster-data-server file). The Data Server as a service is installed but not running because the port is taken by the mentioned console application. As a result, you can access localhost:9500, but Flexmonster Admin Panel is not able to reach the Data Server as a service.
Please make sure the console application is not blocking the service.
 
We are looking forward to hearing your feedback.
 
Kind regards,
Illia

Public
Scott Oliver June 28, 2021

Sorry for the late reply on this one. Our installation procedure was as followed:
 
After downloading and installing NPM, open a terminal session with sufficient privileges:
 

sudo -s

 
Secondly download the command line interface using the below command:
 

npm install -g flexmonster-cli

 
Thirdly install the data server using:
 

flexmonster add fds -r

 
From here the package is installed and run automatically, providing us with a client that shows a message stating that the server is unreachable.
 
If we attempt to hit the local host through port 9500 we receive a message that the browser cannot connect to the server.
 
Next, we start the service by running the following command in our terminal window, whilst the data server application interface is still open:
 

./flexmonster-data-server

 
When refreshing our browser, the server is connected and shows a message that the flex data server is  up and running. If we attempt to reconnect through your graphical user interface, we receive a message showing server is unreachable.

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster June 30, 2021

Hello, Scott,
 
Thank you for the details.
 
We suggest checking if the path to and service-install file contains whitespaces. Please remove whitespaces if any exist. They may lead to internal errors while installing the Data Server as a service.
If this does not help, please send us logs as mentioned in our previous response.
 
Finally, please note that the Admin Panel (graphical user interface) only works with the Data Server as a service (service-install). In its turn, the flexmonster-data-server file represents executable. That is why you can access the specified port in your browser but unable to use the Admin Panel.
 
Looking forward to your feedback.
 
Best regards,
Illia

Public
Scott Oliver June 30, 2021

The directory is:
 

PLIST_FILE=~/Library/LaunchAgents/com.flexmonster.DataServer.plist

 
After stopping the server and running the following command:
 

sh /Users/[Username]/service-install.sh

 
This returns the following response:
 

Flexmonster Data Server service is installed.

 
Finally I started the server once again by running:
 

./flexmonster-data-server

 
When opening up the graphical user interface, the message displays starting server, but then returns that the server is unreachable.

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster July 1, 2021

Hello, Scott,
 
Please do not execute the flexmonster-data-server file if you want to use the Data Server as a service with the Admin Panel.
The Admin Panel (graphical user interface) only works with the Data Server as a service (service-install file).
 
Please send us files with logs of the Data Server and Flexmonster Admin Panel. Files are named fmlog and adminfmlog. You should be able to find them in the FlexmonsterDataServer\logs directory. These logs will help us to investigate the issue.
 
Looking forward to your reply.
 
Kind regards,
Illia

Public
Scott Oliver July 5, 2021

Hello, we only have the attached log. No other logs can be found.

Attachments:
Log Files.zip

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster July 6, 2021

Hello, Scott,
 
Thank you for sending us the logs. It brought some light on the nature of the problem.
 
It seems the reason for the issue is the fact that the DOTNET_BUNDLE_EXTRACT_BASE_DIR environmental variable is not set, and the directory used as a default does not exist or is not accessible.
This is why Flexmonster Data Server as a service cannot be installed. To overcome this, please add DOTNET_BUNDLE_EXTRACT_BASE_DIR to the environmental variables of your machine and specify the path to the accessible folder as its value. Finally, try to install the Data Server as a service (service-install) once again.
 
Please let us know if it works for you.
 
Kind regards,
Illia

Public
Scott Oliver July 30, 2021

Just a quick update, we noticed that there was an obscure folder security issue on one of the directories that data server was attempting to access. Modifying the permissions fixed the issues and we were able to get up and running.

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster July 30, 2021

Hello, Scott,
 
Thank you for sharing your feedback. We are happy to hear you found the solution.
 
Feel free to contact us if other questions arise.
 
Kind regards,
Illia

Public
Scott Oliver September 7, 2021

Hi Illia,
 
We hope you are travelling well. We have decided to push on with Flexmonster Data Server, specifically integrating it with a quick SQL server that we have run up.
 
When attempting to externally run our report, we are met with the following: “Unable to connect to custom data source API endpoint ‘http://[address]:9500/fields'”. Where address is our URL specified in the data source of the report.
 
We do not receive this message internally and the report works as expected.
 
The environment consists of a server running a 2019 SQL server through docker running on port 1433. The same server is also running Flexmonster data server which has an index that is successfully connected (we have tried using both the DNS and the IP address followed by a comma and the port).
 
We also receive this message (when we access externally) if we use the sample-index provided by yourselves.
 
Do you have any suggestions, or can provide any assistance so that we can get this up and running? We would be happy to provide more details or access, if we can exchange messages privately.

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster September 7, 2021

Hello,
 
Thank you for your question.
 
Please note that you will need to expose and publish all the ports that need to be accessed outside the Docker container. We suggest referring to the Docker documentation and the dedicated post on Bealdung for details.
 
Let us know if it works for you.
Looking forward to your response.
 
Kind regards,
Illia

Public
Scott Oliver September 7, 2021

Hi Illia,
 
Yes, I agree. The issue however is that we receive the same problem when using your sample CSV index.
 
If we put the SQL source to one side, we cannot access our Flexmonster Data Server from remote locations.

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster September 8, 2021

Hello,

Please note that the Data Server availability outside of the Docker container is not determined by the data source it uses (SQL database, CSV, etc.).
 
If we understand correctly, both Flexmonster Data Server and Microsoft SQL Server database are isolated within a single container. In this case, port 1433 of your database is available for the Data Server by default. In its turn, port 9500, where the Data Server is launched, needs to be exposed and published manually as mentioned in our previous response.
 
If we did not understand your configuration correctly, please provide additional details on this point.
Looking forward to hearing from you.
 
Kind regards,
Illia

Public
Scott Oliver September 8, 2021

Hello,
 
My apologies, I think I may have confused things by bringing up docker. To answer your question, docker is housing only a SQL server container on a machine. We are using this to run the SQL server on Mac OS. The same machine also is running Flexmonster data server natively.
 
Ignoring docker, when we use the sample index provided (or a custom JSON index too) we can get our reports to access the data when inside our local network.
 
To rephrase, running any report inside of our local network, on any index, works.
 
When accessing the same reports on an external connection, we receive the error above. Port 9500 is being published, we have also attempted turning on DMZ and have the same result.
 
Again, to rephrase. When accessing any report external to our network, using any index, through the data server as the data source, we receive the endpoint error message.
 
Our issue (for now) appears to have nothing to do with SQL or docker.

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster September 10, 2021

Hello, Scott,

Thank you for the clarification.
 
If Flexmonster Data Server is accessible within your internal network, we can assume it is operating correctly. Inability to reach its port (9500) from the outside is likely not to be connected with the Data Server itself. Flexmonster Data Server is only responsible for listening on the specified port within the network it was launched in. It does not control or affect exposing this port to an external network in any way.
 
You can make sure if the issue is really produced by the Data Server by creating a sample application listening within the same local network on a different port that would respond with a simple string. Next, publish the used port similar to port 9500 and try connecting from the external network.
 
If you make sure the problem only appears when using Flexmonster Data Server, please provide us with additional details about local, external networks, and tools used to publish the port.
 
Looking forward to your response.
 
Kind regards,
Illia

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster 2 days ago

Hello, Scott,
 
We are wondering if you found a way to resolve the issue with port availability.
 
Looking forward to hearing from you.
 
Kind regards,
Illia

Public
Scott Oliver 10 hours ago

I do apologise, yes, it was a network issue, I have had our administrator rectify the problem. Thank you for your support!

Please login or Register to Submit Answer