Error setting up Postgres database on Mattermost v3.7.2

Summary

Error creating database tables: pq: syntax error at or near “not”

Steps to reproduce

I am using mattermostV3.2.0 and postgres9.5
I used https://docs.mattermost.com/install/prod-ubuntu.html documentation link to setup mattermost.
I am trying to install in centos 6.6

Expected behavior

It should start mattermost server

Observed behavior

The current config is
{
“ServiceSettings”: {
“ListenAddress”: “:8065”,
“MaximumLoginAttempts”: 10,
“SegmentDeveloperKey”: “”,
“GoogleDeveloperKey”: “”,
“EnableOAuthServiceProvider”: false,
“EnableIncomingWebhooks”: true,
“EnableOutgoingWebhooks”: true,
“EnableCommands”: true,
“EnableOnlyAdminIntegrations”: true,
“EnablePostUsernameOverride”: false,
“EnablePostIconOverride”: false,
“EnableTesting”: false,
“EnableDeveloper”: false,
“EnableSecurityFixAlert”: true,
“EnableInsecureOutgoingConnections”: false,
“EnableMultifactorAuthentication”: false,
“AllowCorsFrom”: “”,
“SessionLengthWebInDays”: 30,
“SessionLengthMobileInDays”: 30,
“SessionLengthSSOInDays”: 30,
“SessionCacheInMinutes”: 10,
“WebsocketSecurePort”: 443,
“WebsocketPort”: 80,
“WebserverMode”: “gzip”,
“EnableCustomEmoji”: false,
“RestrictCustomEmojiCreation”: “all”
},
“TeamSettings”: {
“SiteName”: “Mattermost”,
“MaxUsersPerTeam”: 50,
“EnableTeamCreation”: true,
“EnableUserCreation”: true,
“EnableOpenServer”: false,
“RestrictCreationToDomains”: “”,
“RestrictTeamNames”: true,
“EnableCustomBrand”: false,
“CustomBrandText”: “”,
“RestrictDirectMessage”: “any”,
“RestrictTeamInvite”: “all”,
“RestrictPublicChannelManagement”: “all”,
“RestrictPrivateChannelManagement”: “all”
},
“SqlSettings”: {
“DriverName”: “postgres”,
“DataSource”: “postgres://mmuser:mmuser_password@127.0.0.1:5432/mattermost?sslmode=disable&connect_timeout=10”,
“DataSourceReplicas”: [],
“MaxIdleConns”: 10,
“MaxOpenConns”: 10,
“Trace”: false,
“AtRestEncryptKey”: “7rAh6iwQCkV4cA1Gsg3fgGOXJAQ43QVg”
},
“LogSettings”: {
“EnableConsole”: true,
“ConsoleLevel”: “DEBUG”,
“EnableFile”: true,
“FileLevel”: “INFO”,
“FileFormat”: “”,
“FileLocation”: “”,
“EnableWebhookDebugging”: true
},
“PasswordSettings”: {
“MinimumLength”: 5,
“Lowercase”: false,
“Number”: false,
“Uppercase”: false,
“Symbol”: false
},
“FileSettings”: {
“MaxFileSize”: 52428800,
“DriverName”: “local”,
“Directory”: “./data/”,
“EnablePublicLink”: false,
“PublicLinkSalt”: “A705AklYF8MFDOfcwh3I488G8vtLlVip”,
“ThumbnailWidth”: 120,
“ThumbnailHeight”: 100,
“PreviewWidth”: 1024,
“PreviewHeight”: 0,
“ProfileWidth”: 128,
“ProfileHeight”: 128,
“InitialFont”: “luximbi.ttf”,
“AmazonS3AccessKeyId”: “”,
“AmazonS3SecretAccessKey”: “”,
“AmazonS3Bucket”: “”,
“AmazonS3Region”: “”,
“AmazonS3Endpoint”: “”,
“AmazonS3BucketEndpoint”: “”,
“AmazonS3LocationConstraint”: false,
“AmazonS3LowercaseBucket”: false
},
“EmailSettings”: {
“EnableSignUpWithEmail”: true,
“EnableSignInWithEmail”: true,
“EnableSignInWithUsername”: true,
“SendEmailNotifications”: false,
“RequireEmailVerification”: false,
“FeedbackName”: “”,
“FeedbackEmail”: “”,
“FeedbackOrganization”: “”,
“SMTPUsername”: “”,
“SMTPPassword”: “”,
“SMTPServer”: “”,
“SMTPPort”: “”,
“ConnectionSecurity”: “”,
“InviteSalt”: “bjlSR4QqkXFBr7TP4oDzlfZmcNuH9YoS”,
“PasswordResetSalt”: “vZ4DcKyVVRlKHHJpexcuXzojkE5PZ5eL”,
“SendPushNotifications”: false,
“PushNotificationServer”: “”,
“PushNotificationContents”: “generic”
},
“RateLimitSettings”: {
“EnableRateLimiter”: true,
“PerSec”: 10,
“MemoryStoreSize”: 10000,
“VaryByRemoteAddr”: true,
“VaryByHeader”: “”
},
“PrivacySettings”: {
“ShowEmailAddress”: true,
“ShowFullName”: true
},
“SupportSettings”: {
“TermsOfServiceLink”: “https://about.mattermost.com/default-terms/”,
“PrivacyPolicyLink”: “https://about.mattermost.com/default-privacy-policy/”,
“AboutLink”: “https://about.mattermost.com/default-about/”,
“HelpLink”: “https://about.mattermost.com/default-help/”,
“ReportAProblemLink”: “https://about.mattermost.com/default-report-a-problem/”,
“SupportEmail”: "feedback@mattermost.com"
},
“GitLabSettings”: {
“Enable”: false,
“Secret”: “”,
“Id”: “”,
“Scope”: “”,
“AuthEndpoint”: “”,
“TokenEndpoint”: “”,
“UserApiEndpoint”: “”
},
“GoogleSettings”: {
“Enable”: false,
“Secret”: “”,
“Id”: “”,
“Scope”: “”,
“AuthEndpoint”: “”,
“TokenEndpoint”: “”,
“UserApiEndpoint”: “”
},
“LdapSettings”: {
“Enable”: false,
“LdapServer”: “”,
“LdapPort”: 389,
“ConnectionSecurity”: “”,
“BaseDN”: “”,
“BindUsername”: “”,
“BindPassword”: “”,
“UserFilter”: “”,
“FirstNameAttribute”: “”,
“LastNameAttribute”: “”,
“EmailAttribute”: “”,
“UsernameAttribute”: “”,
“NicknameAttribute”: “”,
“IdAttribute”: “”,
“SyncIntervalMinutes”: 60,
“SkipCertificateVerification”: false,
“QueryTimeout”: 60,
“MaxPageSize”: 0,
“LoginFieldName”: “”
},
“ComplianceSettings”: {
“Enable”: false,
“Directory”: “./data/”,
“EnableDaily”: false
},
“LocalizationSettings”: {
“DefaultServerLocale”: “en”,
“DefaultClientLocale”: “en”,
“AvailableLocales”: “”
},
“SamlSettings”: {
“Enable”: false,
“Verify”: false,
“Encrypt”: false,
“IdpUrl”: “”,
“IdpDescriptorUrl”: “”,
“AssertionConsumerServiceURL”: “”,
“IdpCertificateFile”: “”,
“PublicCertificateFile”: “”,
“PrivateKeyFile”: “”,
“FirstNameAttribute”: “”,
“LastNameAttribute”: “”,
“EmailAttribute”: “”,
“UsernameAttribute”: “”,
“NicknameAttribute”: “”,
“LocaleAttribute”: “”,
“LoginButtonText”: “With SAML”
}
}

While I am trying to run platform then its giving error Error creating database tables: pq: syntax error at or near "not"

This is the link for screenshot http://pasteboard.co/gn5k15s7n.png

Hi @sumanmaity112, could you try upgrading to the latest version of Mattermost to see if this solves your issue?

Same error here. Just installed latest version of Mattermost on a Redhat server and received the same error.

I’m also getting the same error: any updates on this one ?
centos 6.6 64
postgres 8.4

udo -u mattermost ./platform
[2017/03/18 07:16:30 PDT] [INFO] Loaded system translations for 'en' from '/opt/mattermost/i18n/en.json'
[2017/03/18 07:16:30 PDT] [INFO] Current version is 3.7.0 (3.7.2/Fri Mar 17 19:07:10 UTC 2017/f4473cf312d09a53a57312745963aee334e251cb/c737afff891a25ee3b011c0d4b1392adc3dcc622)
[2017/03/18 07:16:30 PDT] [INFO] Enterprise Enabled: true
[2017/03/18 07:16:30 PDT] [INFO] Current working directory is /opt/mattermost/bin
[2017/03/18 07:16:30 PDT] [INFO] Loaded config file from /opt/mattermost/config/config.json
[2017/03/18 07:16:30 PDT] [INFO] Server is initializing...
[2017/03/18 07:16:30 PDT] [INFO] Pinging SQL master database
[2017/03/18 07:16:30 PDT] [CRIT] Error creating database tables: pq: syntax error at or near "not"

were you able to resolve this error somehow?

Hi @UmbrellaProject,

Could you let us know which version of Mattermost you have installed? If you haven’t already, you can install the latest v3.7.2 here.

Please let us know if this solves your issue?

Hi, I’ve installed both 3.7.0 and 3.7.2 both shows error when setting up with postgres, they work fine with mysql.

Thanks @UmbrellaProject,

I’ll ask one of our technical support people to have a look at the issue and post back here with some suggestions…

Hi @UmbrellaProject. Unfortunately, we don’t support Postgres 8.4. You’ll need to upgrade to at least Postgres 9.4 to run Mattermost.

thank you, i’ll try to install with 9.4, maybe it should be pointed out in the requirements, i have not seen anything stating that in the install docs. centos 6.6 base install is 8.4.

Hi @UmbrellaProject

You can see documentation for installing on RHEL 6.6 - these instructions will probably be the same as for CentOS - here https://docs.mattermost.com/install/install-rhel-66.html#installing-postgresql-database