Opened 4 years ago

Last modified 2 years ago

#60871 assigned defect

elasticsearch @7.4.0: User account not created?

Reported by: GarrettAlbright (Garrett Albright) Owned by: gerard.sole@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: chrstphrchvz (Christopher Chavez)
Port: elasticsearch

Description

port load elasticsearch seems to silently fail. Running the launch command in the LanuchDaemon plist, /opt/local/bin/daemondo --label=elasticsearch --start-cmd sudo -u elasticsearch /opt/local/bin/elasticsearch , gives this output:

sudo: runas gid 4294967295: invalid value
sudo: runas_gid=4294967295: invalid value

Grepping for elasticsearch in /etc/passwd returns no results. So from what I can tell, the required elasticsearch user account isn't being created on installation as happens when installing nginx or mariadb or the like.

Change History (7)

comment:1 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: set to gerard.sole@…
Status: newassigned

The user should be getting created. The Portfile does run the add_users command.

/etc/passwd isn't where user accounts are listed on macOS. Try the dscl . -ls /Users command instead.

comment:2 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

4294967295 does seem like an extremely high and unreasonable group ID value. Is your computer configured to use an unusual directory service provider that might be causing such unusual IDs to be used?

comment:3 Changed 4 years ago by GarrettAlbright (Garrett Albright)

/etc/passwd isn't where user accounts are listed on macOS. Try the dscl . -ls /Users command instead.

Okay, I see "elasticsearch" in there. I figured passwd was good enough since I see "www" and "mysql" in there. Should I try deleting this user and group and reinstalling?

4294967295 does seem like an extremely high and unreasonable group ID value. Is your computer configured to use an unusual directory service provider that might be causing such unusual IDs to be used?

Not that I know of. It's just a normal personal laptop and I have the only real human account on it.

comment:4 Changed 4 years ago by chrstphrchvz (Christopher Chavez)

Note: relevance of 4294967295 is that it is 232 - 1, or -1 as a signed 32-bit integer; maybe something is trying to use -1 as the ID for some reason.

comment:5 Changed 4 years ago by chrstphrchvz (Christopher Chavez)

Cc: chrstphrchvz added

comment:6 Changed 4 years ago by GarrettAlbright (Garrett Albright)

Just for the record, I recently upgraded the SSD in my MBP and did a fresh OS install. I just now had a need for elasticsearch again, so I tried installing it with MacPorts again and I'm having the exact same problems, right down to the 4294967295 bit. But this is with the 7.9.0 port this time.

Last edited 4 years ago by GarrettAlbright (Garrett Albright) (previous) (diff)

comment:7 Changed 2 years ago by felipou (Felipe Machado)

I just had this exact same problem when installing the "mongodb" port. The "_mongo" user was created with uid 505, and gid -1 (saw that with the command dscacheutil -q user). I checked the list of groups (with dscacheutil -q group) and saw that the "_mongo" group was correctly created with gid 505. So I just changed the gid of the _mongo user to 505 with the command sudo dscl . -change /Users/_mongo PrimaryGroupID -1 505, and it seems to have worked, I could properly run mongodb after that.

Note: See TracTickets for help on using tickets.