Startup Fails with "No such file or directory" for sql queries.conf
Hi, I am attempting to use the FreeRADIUS Docker container, but when I try to include the mysql configuration the server fails to start with the following errors: .... including configuration file /etc/freeradius/mods-enabled/sql including configuration file /etc/freeradius/mods-config/sql/main/mysql/queries.conf} Unable to open file "/etc/freeradius/mods-config/sql/main/mysql/queries.conf}": No such file or directory Errors reading or parsing /etc/freeradius/radiusd.conf -------------------------- Here's what I've confirmed: 1. I am using a totally vanilla configuration from the Docker quick start instructions with no changes except to enable MySQL as the datastore. 2. The queries.conf file is present and permissions are correct. 3. Confirmed the database sql has been created with the schema under mods-config/sql/main/mysql/schema.sql 4. Confirmed the MySQL database is accessible with configuration parameters in the mod-available/sql file. Used mysql client to confirm with radius user and grants to all tables in the radius database. 5. In the mods-enabled/sql (linked to mods-available/sql)I have changed: * driver = "rlm_sql_null" to driver = "rlm_sql_mysql" * commented out the TLS section under mysql * confirmed the connection parameters for server, port, login, and password (see #4 above) * confirmed radius_db is set to the correct database name (I used "radius"). * uncommented read_clients = yes * ensured client_table = "nas" is uncommented * confirmed Dockerfile ------------- FROM freeradius/freeradius-server:latest COPY raddb/ /etc/freeradius/ Build ------- docker build -t freeradius -f Dockerfile . docker-compose.yml ---------------------------- version: "3" services: freeradius: image: freeradius:latest container_name: freeradius hostname: freeradius restart: always environment: - TZ="America/Los_Angeles" volumes: - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro
On Jan 25, 2024, at 3:38 PM, Timothy Weaver <timothyweaver@gmail.com> wrote:
I am attempting to use the FreeRADIUS Docker container, but when I try to include the mysql configuration the server fails to start with the following errors:
.... including configuration file /etc/freeradius/mods-enabled/sql including configuration file /etc/freeradius/mods-config/sql/main/mysql/queries.conf}
Why is there an extra "}" after the file name?
Here's what I've confirmed:
You've edited the configuration files and broken them. Don't do that. Instead of the mods-enabled/sql file ending with: $INCLUDE ${modconfdir}/${.:name}/main/${dialect}/queries.conf } It's been edited to: $INCLUDE ${modconfdir}/${.:name}/main/${dialect}/queries.conf} Put the "}" on the next line, and it will work. Alan DeKok.
participants (2)
-
Alan DeKok -
Timothy Weaver