[GH-ISSUE #2] Problems to add Networks #2

Open
opened 2026-02-25 20:30:27 +03:00 by kerem · 1 comment
Owner

Originally created by @enrutador on GitHub (Sep 27, 2016).
Original GitHub issue: https://github.com/alpha-si/vpnman/issues/2

Hi Alpha
I have a problem when i create a network for use VpnServer mapping. When I make the settings, I always get the following error:

"execute query error: Column 'user_id' cannot be null
2016-09-27 15_21_59-vpnman - vpn management platform

2016-09-27 15_31_20-vpnman - vpn management platform

I have users,accounts, and VPNs tunels configured OK. What value need the var "mapped_to" ?

A lot of thanks

Originally created by @enrutador on GitHub (Sep 27, 2016). Original GitHub issue: https://github.com/alpha-si/vpnman/issues/2 Hi Alpha I have a problem when i create a network for use VpnServer mapping. When I make the settings, I always get the following error: "execute query error: Column 'user_id' cannot be null ![2016-09-27 15_21_59-vpnman - vpn management platform](https://cloud.githubusercontent.com/assets/13056292/18875650/e73fa5b4-84c6-11e6-9fde-68b6ef95919c.png) ![2016-09-27 15_31_20-vpnman - vpn management platform](https://cloud.githubusercontent.com/assets/13056292/18875780/7be861ec-84c7-11e6-9198-d0f168636340.png) I have users,accounts, and VPNs tunels configured OK. What value need the var "mapped_to" ? A lot of thanks
Author
Owner

@federico-alphasi commented on GitHub (Sep 28, 2016):

Hi, i confirm the problem.
VPN networks have been designed to be connected to VPN nodes and not directly to VPN server.
To fix the problem you have to remove the 'fk_networks_user_id' foreign key from networks table.
You can use the following SQL script:

ALTER TABLE networks
DROP FOREIGN KEY fk_networks_user_id;
ALTER TABLE networks
CHANGE COLUMN user_id user_id INT(10) UNSIGNED NULL ;

PS: When you create a network, the "Mapped to" field can be left blank.

<!-- gh-comment-id:250096719 --> @federico-alphasi commented on GitHub (Sep 28, 2016): Hi, i confirm the problem. VPN networks have been designed to be connected to VPN nodes and not directly to VPN server. To fix the problem you have to remove the 'fk_networks_user_id' foreign key from networks table. You can use the following SQL script: ALTER TABLE `networks` DROP FOREIGN KEY `fk_networks_user_id`; ALTER TABLE `networks` CHANGE COLUMN `user_id` `user_id` INT(10) UNSIGNED NULL ; PS: When you create a network, the "Mapped to" field can be left blank.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vpnman#2
No description provided.