Issue in frontend connecting to backend

Tried both the ways, docker and rpm installation but issue in frontend connecting to backend.

Hi @mandyjack
and welcome to our community!

Port 27017 is normally the default MongoDB connection port. You can also see in your screenshot that Mongo4.2 listens on tcp/27017.

Datagerry started its internal HTTP server on port 4000 by default, alternatively you can change the port in your configuration file (etc/cmdb.conf).

However, Docker should normally take this setting automatically. Did you change anything in the compose file when installing via Docker?

Hello brother,

No I didnt change anything in compose file.
But still its not able to connect. I have hosted it on aws ec2 server with keeping security group open to internet.Do you want to see any config files which I can share?

Ok, I just launched an EC2 instance (RHEL-8.3.0_HVM-20201031-x86_64). It works fine for now.
Only with the security groups I had to make a setting. At first I had no connection to the Nginx server. When you say you use the security group “open” - I assume you use the default launch-wizard-X group.

This usually has only SSH enabled on port 22 in the inbound rules.
Here you have to add HTTP or HTTPS (if used). Thereby refer to the Nginx port.

But at your screenshot the connection page is shown. Are you using a different instance for the frontend? Normally it should not be shown if there is no connection to Nginx. Alternatively, if it was the same hostname, it can happen that there is still an instance in the browser cache because the frontend is executed completely independently in the browser.

I hope this could solve your problem.

Hi @mandyjack,

the following settings should be correct for your environment, if you get the connection page:

Just fill in the settings on the left side, click on “try to connect” and after that on “Use connection”.

The connection page should only be shown, if the connection to the DATAGERRY backend was interrupted. This could be due to an error in DATAGERRY or connection issues in your environment. So at first, try to reload the DATAGERRY frontend (use the base url without the “/connect” endpoint). If that doesn’t help, just have a look at the log of the datagerry container with docker logs root_datagerry_1

Thank you, will try this and update you.

Hello,

I tried it and was able to connect. But, when I try to upload any csv or json file, and go next, it agains shows the same page.
I think connection to the database is not constant.

And adding to above, below are the container logs.

tabase_manager.py)
[2021-01-11 14:23:07][ERROR ] — Exception on /import/type/create/ [POST] (app.py)
Traceback (most recent call last):
File “flask/app.py”, line 2447, in wsgi_app
File “flask/app.py”, line 1952, in full_dispatch_request
File “flask_cors/extension.py”, line 165, in wrapped_function
File “flask/app.py”, line 1821, in handle_user_exception
File “flask/_compat.py”, line 39, in reraise
File “flask/app.py”, line 1950, in full_dispatch_request
File “flask/app.py”, line 1936, in dispatch_request
File “cmdb/interface/route_utils.py”, line 85, in decorated
File “cmdb/interface/rest_api/importer_routes/importer_type_routes.py”, line 55, in add_type
File “cmdb/framework/models/type.py”, line 289, in from_data
File “cmdb/framework/models/type.py”, line 171, in from_data
File “cmdb/framework/models/type.py”, line 46, in from_data
AttributeError: ‘NoneType’ object has no attribute ‘get’
[2021-01-11 14:29:59][ERROR ] — Exception on /import/type/create/ [POST] (app.py)
Traceback (most recent call last):
File “flask/app.py”, line 2447, in wsgi_app
File “flask/app.py”, line 1952, in full_dispatch_request
File “flask_cors/extension.py”, line 165, in wrapped_function
File “flask/app.py”, line 1821, in handle_user_exception
File “flask/_compat.py”, line 39, in reraise
File “flask/app.py”, line 1950, in full_dispatch_request
File “flask/app.py”, line 1936, in dispatch_request
File “cmdb/interface/route_utils.py”, line 85, in decorated
File “cmdb/interface/rest_api/importer_routes/importer_type_routes.py”, line 55, in add_type
File “cmdb/framework/models/type.py”, line 289, in from_data
File “cmdb/framework/models/type.py”, line 171, in from_data
File “cmdb/framework/models/type.py”, line 46, in from_data
AttributeError: ‘NoneType’ object has no attribute ‘get’
[2021-01-11 14:31:12][ERROR ] — ‘utf-8’ codec can’t decode byte 0xae in position 265: invalid start byte (parser_object.py)
[2021-01-11 14:34:54][ERROR ] — ‘utf-8’ codec can’t decode byte 0xae in position 265: invalid start byte (parser_object.py)
[2021-01-11 14:38:00][ERROR ] — Exception on /import/type/create/ [POST] (app.py)
Traceback (most recent call last):
File “flask/app.py”, line 2447, in wsgi_app
File “flask/app.py”, line 1952, in full_dispatch_request
File “flask_cors/extension.py”, line 165, in wrapped_function
File “flask/app.py”, line 1821, in handle_user_exception
File “flask/_compat.py”, line 39, in reraise
File “flask/app.py”, line 1950, in full_dispatch_request
File “flask/app.py”, line 1936, in dispatch_request
File “cmdb/interface/route_utils.py”, line 85, in decorated
File “cmdb/interface/rest_api/importer_routes/importer_type_routes.py”, line 55, in add_type
File “cmdb/framework/models/type.py”, line 289, in from_data
File “cmdb/framework/models/type.py”, line 171, in from_data
File “cmdb/framework/models/type.py”, line 46, in from_data
AttributeError: ‘NoneType’ object has no attribute ‘get’
[root@ip-172-31-44-108 ~]#