Nodejs.properties file: Changes to the connect.ranges.denied property is not reflecting

Hi Team

By default, the connect.ranges.denied property value is "10.0.0.0/8,192.168.0.0/16,127.0.0.1/32".

Path: /opt/apigee/edge-message-processor-4.17.01-0.0.967/conf/nodejs.properties

I have changed the property value to "192.168.0.0/16,127.0.0.1/32" and restarted the message processor.

Again, the nodejs.properties file doesn't reflect the changes.

Please assist on this.

Thanks,

Bindu

Solved Solved
1 14 444
1 ACCEPTED SOLUTION

@Bindu.Kadiyala,

From 4.16.01 onwards you can't edit the properties file directly, you should use the below procedure

  1. Create a file /opt/apigee/customer/application/message-processor.properties if it does not exist already
  2. Run the below command to ensure that this file is owned by apigee user
    sudo chown apigee:apigee /opt/apigee/customer/application/message-processor.properties
  3. Add/Append the following to the above file and save it.
    conf_nodejs_connect.ranges.denied=192.168.0.0/16,127.0.0.1/32
  4. Restart the Message Processor
    apigee-service edge-message-processor restart
  5. Now check the file /opt/apigee/edge-message-processor-4.17.01-0.0.967/conf/nodejs.properties and see if the property "connect.ranges.denied" has the new value or not.
  6. If it worked, then repeat steps #1 through #5 on all the Message Processors.

Hope this helps.

Regards,

Amar

View solution in original post

14 REPLIES 14

Hi @Bindu.Kadiyala

Please find the details here.

You will need to find the key and set the new value by placing the properties file under /opt/apigee/customer directory and then restart so that it will use this configuration. More info available on the link I provided.

Let me know if that works

Hi @Sai Saran Vaidyanathan,

Thanks for the assistance.

I have copied the nodejs.properties file into /opt/apigee/customer/application and updated that property. Restarted the message message.

I tested the API proxy using the CURL and noticed that it responded with 200 success code and intermittently 504 error.

But, when I comment that connect.ranges.denied then all the API proxy request calls are successfully all the time.

Please assist on this.

Thanks,

Bindu

Hi ,

Please help on this.

I have created nodejs.properties file in /opt/apigee/customer/application and update the file with

conf_nodejs_connect.ranges.denied=192.168.0.0/16,127.0.0.1/32.

Searched for the token

$ apigee-service edge-message-processor configure -search conf_nodejs_connect.ranges.denied Found key conf_nodejs_connect.ranges.denied, with value, 10.0.0.0/8,192.168.0.0/16,127.0.0.1/32, in /opt/apigee/edge-message-processor/token/default.properties

apigee-configutil: edge-message-processor: # OK

I have restarted the message processor and again checked for the token and the value is the default value.

Searched for the token

$ apigee-service edge-message-processor configure -search conf_nodejs_connect.ranges.denied Found key conf_nodejs_connect.ranges.denied, with value, 10.0.0.0/8,192.168.0.0/16,127.0.0.1/32, in /opt/apigee/edge-message-processor/token/default.properties

apigee-configutil: edge-message-processor: # OK

When I run my curl command of API proxy to connect to IP address which starts with 10.*.*.* then it responded with 200 OK for the first time. Later, it responded with 504 Gateway timed out error.

Please let me know whether anything has to be updated.

Thanks,

Bindu

Hi @Sai Saran Vaidyanathan,

Please help on this ASAP.

Thanks,

Bindu

Hi Bindu,

It seems like the code with config change you made did not take effect. One thing to check first is if apigee user can read the file /opt/apigee/customer/application/nodejs.properties.

If the not, please run: sudo chown apigee:apigee /opt/apigee/customer/application/nodejs.properties

Then restart the message processor and see if the change took effect. I verified the token you used and I was able to make the change successfully in my test system.

Please repeat for all Message processors.

Hi Arjav,

Please note that nodejs.properties is under the apigee user as below.

[apigee@application]$ pwd

/opt/apigee/customer/application

[apigee@application]$ ls -ltr

total 46744

-rwx------. 1 apigee apigee 110325760 Jul 19 11:41 core

-rw-rw-r--. 1 apigee apigee 62 Jul 28 10:15 nodejs.properties

-rw-rw-r--. 1 apigee apigee 39 Jul 28 10:17 router.properties

For testing purpose, I have created router.properties and changed the Request Limit to 8k conf_router_HTTP.request.line.limit=8k

When I search for the token for the router request line limit property then it displays the path of the customer/application as below

[apigee@application]$ /opt/apigee/apigee-service/bin/apigee-service edge-router configure -search conf_router_HTTP.request.line.limit

Found key conf_router_HTTP.request.line.limit, with value, 4k, in /opt/apigee/edge-router/token/default.properties

Found key conf_router_HTTP.request.line.limit, with value, 8k, in /opt/apigee/customer//application/router.properties apigee-configutil: edge-router: # OK

But when I search for the token for nodejs connect.ranges.denied property then it doesn't display the path of customer/application as below

[apigee@application]$ apigee-service edge-message-processor configure -search conf_nodejs_connect.ranges.denied

Found key conf_nodejs_connect.ranges.denied, with value, 10.0.0.0/8,192.168.0.0/16,127.0.0.1/32, in /opt/apigee/edge-message-processor/token/default.properties

apigee-configutil: edge-message-processor: # OK

Please let me know why the customer/application path is not displayed when searched for nodejs connect.ranges.denied property.

Kindly assist on this ASAP.

Thanks,

Bindu

Hi Bindu,

The file ownership attributes look correct for the nodejs.properties file. The change is clearly not taking effect for some reason.

Another thing to check is if there is any extra space in the file or any DOS characters. Please check manually and remove any spaces etc. Also, please run dos2unix on the file to remove if there are any DOS characters.

Please let us know if that helped or not.

Hi @Arjav Goswami,


I have checked the file and there were no extra space as below.


[apigee@rhldcapimmpcs703 application]$ cat nodejs.properties conf_nodejs_connect.ranges.denied=192.168.0.0/16,127.0.0.1/32

Also, I have run dos2unix on that file and restarted the message-processor, still the updated property value is not getting set.

[apigee@application]$ dos2unix nodejs.properties

dos2unix: converting file nodejs.properties to Unix format ...

[apigee@application]$


[apigee@ application]$ apigee-service edge-message-processor configure -search conf_nodejs_connect.ranges.denied

Found key conf_nodejs_connect.ranges.denied, with value, 10.0.0.0/8,192.168.0.0/16,127.0.0.1/32, in /opt/apigee/edge-message-processor/token/default.properties

apigee-configutil: edge-message-processor: # OK


Kindly assist on this.

Thanks,

Bindu

Hi Bindu,

1. Please run dos2unix like this: dos2unix nodejs.properties nodejs.properties

2. Please restart message processor and check again.

Hi @Arjav Goswami ,

Now, I have executed the steps you have mentioned.

Still, this property is not getting reflected.

Kindly assist on this.

Thanks,

Bindu


Hi Bindu,

Did you resolve this issue? I'm facing the same thing.

Thanks, Sam

@Bindu.Kadiyala,

From 4.16.01 onwards you can't edit the properties file directly, you should use the below procedure

  1. Create a file /opt/apigee/customer/application/message-processor.properties if it does not exist already
  2. Run the below command to ensure that this file is owned by apigee user
    sudo chown apigee:apigee /opt/apigee/customer/application/message-processor.properties
  3. Add/Append the following to the above file and save it.
    conf_nodejs_connect.ranges.denied=192.168.0.0/16,127.0.0.1/32
  4. Restart the Message Processor
    apigee-service edge-message-processor restart
  5. Now check the file /opt/apigee/edge-message-processor-4.17.01-0.0.967/conf/nodejs.properties and see if the property "connect.ranges.denied" has the new value or not.
  6. If it worked, then repeat steps #1 through #5 on all the Message Processors.

Hope this helps.

Regards,

Amar

Hi @AMAR DEVEGOWDA ,

Thanks for your support.

It worked 🙂

Just small change: file name should be message-processor.properties instead of edge-message-processor.properties.

Thanks,

Bindu

@Bindu.Kadiyala,

Thanks for confirming that it worked.

Oops you are right, that's a typo mistake from my side, I will get that corrected right away.