# Problems running the unifi 7 package on new VM



## russellfolk (Sep 23, 2022)

I'm attempting to move off Digital Ocean to a new Vultr instance however, I can’t get the unifi controller to start. I have it installed and ready to roll but when I type 
	
	



```
service unifi start
```
, I will see that it tries to start, has a PID, but after a few moments it dies.
Things I've tried so far:

Transitioned from quarterly packages to latest packages
Tried starting mongod service (didn't have to do this with Digital Ocean but running out of thoughts)
Copying over the version of openjdk8 that I have installed on Digital Ocean (I'm still thinking it's something to do with Java)
Versions of software installed:

unifi 7: 7.2.92
openjdk8: 8.342.07.1_1
mongodb36: 3.6.23_1
Contents of /usr/local/share/java/unifi/logs/server.log:

```
[2022-09-14T04:57:53,285] <launcher> WARN  system - reload system.properties failed: file not found
[2022-09-14T04:57:53,289] <launcher> WARN  system - reload system.properties.bk failed: file not found
[2022-09-14T04:57:53,294] <launcher> INFO  system - *** Running for the first time, creating identity ***
[2022-09-14T04:57:53,294] <launcher> INFO  system - UUID: afb610b8-a638-4601-ba12-738c108b7010
[2022-09-14T04:57:53,294] <launcher> WARN  system - reload system.properties failed: file not found
[2022-09-14T04:57:53,294] <launcher> WARN  system - reload system.properties.bk failed: file not found
[2022-09-14T04:57:53,300] <launcher> INFO  system - Reporter UUID: 09f54be0-c7fc-4283-b9e8-f46dda2a149f
```

/usr/local/share/java/unifi/logs/migration.log is empty

Contents of /usr/local/share/java/unifi/data/system.properties:

```
## system.properties
#
# each unifi instance requires a set of ports:
#
## device inform
# unifi.http.port=8080
## controller UI / API
# unifi.https.port=8443
## portal redirect port for HTTP
# portal.http.port=8880
## portal redirect port for HTTPs
# portal.https.port=8843
## local-bound port for DB server
# unifi.db.port=27117
## UDP port used for STUN
# unifi.stun.port=3478
#
## the IP devices should be talking to for inform
# system_ip=a.b.c.d
## disable mongodb journaling
# unifi.db.nojournal=false
## extra mongod args
# unifi.db.extraargs
#
## HTTPS options
# unifi.https.ciphers=TLS_RSA_WITH_AES_256_CBC_SHA,TLS_RSA_WITH_AES_128_CBC_SHA
# unifi.https.sslEnabledProtocols=TLSv1,SSLv2Hello
# unifi.https.hsts=false
# unifi.https.hsts.max_age=31536000
# unifi.https.hsts.preload=false
# unifi.https.hsts.subdomain=false
#
# Ports reserved for device redirector. There is no need to open
# firewall for these ports on controller, however do NOT set
# controller to use these ports.
#
# portal.redirector.port=8881
# portal.redirector.port.wired=8882
#
# Port used for throughput measurement.
# unifi.throughput.port=6789
#
#Wed Sep 14 04:57:53 GMT 2022
debug.device=warn
debug.mgmt=warn
debug.sdn=warn
debug.setting_preference=auto
debug.system=warn
reporter-uuid=09f54be0-c7fc-4283-b9e8-f46dda2a149f
uuid=afb610b8-a638-4601-ba12-738c108b7010
```

Contents of /etc/rc.conf (pertaining to unifi):

```
unifi_enable="YES"

# for debugging
rc_debug="YES"

mongod_enable="YES"
```


----------



## russellfolk (Sep 23, 2022)

Sorry for posting this in the wrong forum, I figured since I hadn't been able to get the package working it went there.  My mistake!


----------



## russellfolk (Sep 28, 2022)

So, I tried a few things...

Completely uninstalled and deleted /usr/local/shared/java/unifi/
Tried installing then running `sudo service unifi start`
Verifying permissions were `unifi:wheel` for *ALL THE FILES* in /usr/local/shared/java/unifi/
Following the steps in this guide (though I didn't need to do any of the upgrades to 3.6 as it already recognized it as such: https://blog.haraschak.com/freebsd-unifi-mongodb-upgrade/
My logs now are attached…


----------



## SirDice (Sep 28, 2022)

russellfolk said:


> Sorry for posting this in the wrong forum, I figured since I hadn't been able to get the package working it went there. My mistake!


That's ok. I figured this has more to do with configuring the service than actually installing or building it.


----------

