Unable to edit ENV
mateodemuynck
PROOP

6 months ago

Hello 👋🏻
I'm trying to edit my Filebeat configuration on my OpenSearch instance. My configuration is saved inside CONFIG environment variable and is copied when the containers starts. There are some modifications I can't save (I think it's because they are breaking the GraphQL request but I can't locate the problem).

Here is my actual configuration (working) :```yaml
filebeat.inputs:

  • type: httpendpoint enable: true listenaddress: 0.0.0.0
    listenport: 8080 secret.header: FilebeatAuth secret.value: ${{AUTHSECRET}}

output.logstash:
hosts: ['${{Logstash.RAILWAYPRIVATEDOMAIN}}:5044']```

And here is the new configuration I'm trying to save (yes I'm just trying to enable debug logging 😄) :```yaml
logging.level: debug
logging.to_files: true
logging.files:
path: /var/log/filebeat
name: debug
keepfiles: 7

filebeat.inputs:

  • type: httpendpoint enable: true listenaddress: 0.0.0.0
    listenport: 8080 secret.header: FilebeatAuth secret.value: ${{AUTHSECRET}}

output.logstash:
hosts: ['${{Logstash.RAILWAYPRIVATEDOMAIN}}:5044']```

Here is the error in the console :

https://backboard.railway.com/graphql/internal?q=stageEnvironmentChanges net::ERR_FAILED 403 (Forbidden)

Thanks for your help 🙂

7 Replies

mateodemuynck
PROOP

6 months ago

188bf912-f6d5-473b-a04c-28fcc7d44154


clashing
HOBBY

6 months ago

Can you provide the build logs, which might have the exact info of the failure


clashing
HOBBY

6 months ago

Just redeploy the service, if there are no build logs

1399324675498180600


mateodemuynck
PROOP

6 months ago

The problem doesn't come from my service but from Railway API itself since I can't even save the variable. This error happens when I try to save my variable


clashing
HOBBY

6 months ago

Do you have a volume attached to the service, which would be used to store the logs


brody
EMPLOYEE

6 months ago

Hello,

The 403 status code does not originate from our API.

Instead, this is Cloudflare blocking the request, likely detecting something it thinks is malicious in that config.

Fortunately, the solution is simple, and involves better practices: save the configuration files into a repo, and have a Dockerfile set to copy them into the image, like this:

https://github.com/railwayapp-templates/elasticsearch/blob/main/Dockerfile#L8-L14


mateodemuynck
PROOP

6 months ago

Ok thanks I will take a look 🙂


Loading...